Skip to content

Neos 9 compatibility #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Classes/Security/Model/HashAndRoles.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class HashAndRoles
protected $rolesHash;

/**
* @ORM\Column(type="json_array")
* @ORM\Column(type="flow_json_array", nullable=true)
* @var array
*/
protected $roles = [];

/**
* @ORM\Column(type="json_array")
* @ORM\Column(type="flow_json_array", nullable=true)
* @var array
*/
protected $settings = [];
Expand Down
1 change: 1 addition & 0 deletions Migrations/Mysql/Version20190626125740.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ public function down(Schema $schema): void
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');

$this->addSql('DROP TABLE flownative_tokenauthentication_security_model_hashandroles');

}
}
48 changes: 48 additions & 0 deletions Migrations/Mysql/Version20250403223549.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php
namespace Neos\Flow\Persistence\Doctrine\Migrations;

use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
* Adjust table for token authentication
*/
class Version20250403223549 extends AbstractMigration
{

/**
* @return string
*/
public function getDescription(): string
{
return 'Adjust table for token authentication';
}

/**
* @param Schema $schema
* @return void
*/
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');

$this->addSql('ALTER TABLE flownative_tokenauthentication_security_model_hashandroles
MODIFY roles JSON NOT NULL COMMENT \'(DC2Type:flow_json_array)\',
MODIFY settings JSON NOT NULL COMMENT \'(DC2Type:flow_json_array)\'');

}

/**
* @param Schema $schema
* @return void
*/
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');

$this->addSql('ALTER TABLE flownative_tokenauthentication_security_model_hashandroles
MODIFY roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json_array)\',
MODIFY settings LONGTEXT NOT NULL COMMENT \'(DC2Type:json_array)\'');

}
}
52 changes: 52 additions & 0 deletions Migrations/Postgresql/Version20250403223550.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php
namespace Neos\Flow\Persistence\Doctrine\Migrations;

use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
* Adjust table for token authentication
*/
class Version20250403223550 extends AbstractMigration
{

/**
* @return string
*/
public function getDescription(): string
{
return 'Adjust table for token authentication.';
}

/**
* @param Schema $schema
* @return void
*/
public function up(Schema $schema): void
{
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\PostgreSQL100Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\PostgreSQL100Platform'."
);
$this->addSql('COMMENT ON COLUMN flownative_tokenauthentication_security_model_hashandroles.roles IS \'(DC2Type:flow_json_array)\'');
$this->addSql('COMMENT ON COLUMN flownative_tokenauthentication_security_model_hashandroles.settings IS \'(DC2Type:flow_json_array)\'');


}

/**
* @param Schema $schema
* @return void
*/
public function down(Schema $schema): void
{
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\PostgreSQL100Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\PostgreSQL100Platform'."
);
$this->addSql('COMMENT ON COLUMN flownative_tokenauthentication_security_model_hashandroles.roles IS \'(DC2Type:json_array)\'');
$this->addSql('COMMENT ON COLUMN flownative_tokenauthentication_security_model_hashandroles.settings IS \'(DC2Type:json_array)\'');


}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"ext-json": "*",
"neos/flow": "^5.0 || ^6.0 || ^7.0 || ^8.0"
"neos/flow": "^8.0 || ^9.0"
},
"autoload": {
"psr-4": {
Expand Down