From ca5a96cfdee28e37da0f2b0a8175487a0e303287 Mon Sep 17 00:00:00 2001 From: Masoud Hedayati Date: Mon, 20 Sep 2021 18:37:36 +0200 Subject: [PATCH 1/5] package version adjustments --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index e69e549..d58aa40 100644 --- a/composer.json +++ b/composer.json @@ -3,10 +3,10 @@ "type": "neos-package", "description": "A content lifecycle task manager for Neos CMS", "require": { - "neos/neos": "~5.0", - "neos/fusion": "~5.0", - "neos/content-repository": "~5.0", - "neos/fusion-afx": "~1.4", + "neos/neos": "~5.0 || ~7.0", + "neos/fusion": "~5.0 || ~7.0", + "neos/content-repository": "~5.0 || ~7.0", + "neos/fusion-afx": "~1.4 || ~7.0", "doctrine/dbal": "*", "doctrine/migrations": "*", "neos/content-repository-dimensionspace": "dev-master" From 976e2cda1d888320ebc42b2be9d8eae23b0df5fc Mon Sep 17 00:00:00 2001 From: Masoud Hedayati Date: Mon, 20 Sep 2021 21:51:08 +0200 Subject: [PATCH 2/5] debug doctrine migrates --- Migrations/Mysql/Version20190902163126.php | 6 +++--- Migrations/Mysql/Version20200707164857.php | 6 +++--- Migrations/Mysql/Version20200707184200.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Migrations/Mysql/Version20190902163126.php b/Migrations/Mysql/Version20190902163126.php index 32488df..37b5a17 100644 --- a/Migrations/Mysql/Version20190902163126.php +++ b/Migrations/Mysql/Version20190902163126.php @@ -3,7 +3,7 @@ namespace Neos\Flow\Persistence\Doctrine\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -16,7 +16,7 @@ public function getDescription(): string return 'The migration for providing the basic task table structure'; } - public function up(Schema $schema) + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".'); @@ -24,7 +24,7 @@ public function up(Schema $schema) $this->addSql('CREATE TABLE sitegeist_bitzer_domain_task_task (identifier VARCHAR(40) NOT NULL, classname VARCHAR(255) NOT NULL, properties TEXT NOT NULL, scheduledtime DATETIME NOT NULL, actionstatus VARCHAR(255) NOT NULL, agent VARCHAR(255) NOT NULL, object VARCHAR(255) NULL, target VARCHAR(255) NULL, PRIMARY KEY(identifier), INDEX `OBJECT` (`object`), INDEX `CLASSNAME_OBJECT_STATUS` (`classname`, `object`, `actionstatus`)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".'); diff --git a/Migrations/Mysql/Version20200707164857.php b/Migrations/Mysql/Version20200707164857.php index e660bf8..4dc2d5c 100644 --- a/Migrations/Mysql/Version20200707164857.php +++ b/Migrations/Mysql/Version20200707164857.php @@ -3,7 +3,7 @@ namespace Neos\Flow\Persistence\Doctrine\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -16,7 +16,7 @@ public function getDescription(): string return 'The migration for adding the agenttype field to basic task table structure'; } - public function up(Schema $schema) + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".'); @@ -25,7 +25,7 @@ public function up(Schema $schema) $this->addSql('UPDATE sitegeist_bitzer_domain_task_task SET agenttype = 1'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".'); diff --git a/Migrations/Mysql/Version20200707184200.php b/Migrations/Mysql/Version20200707184200.php index b87f30e..7cd52a1 100644 --- a/Migrations/Mysql/Version20200707184200.php +++ b/Migrations/Mysql/Version20200707184200.php @@ -3,7 +3,7 @@ namespace Neos\Flow\Persistence\Doctrine\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -16,7 +16,7 @@ public function getDescription(): string return 'The migration for removing the agenttype field and adds a "role:" prefix to the agent field in the basic task table structure'; } - public function up(Schema $schema) + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".'); @@ -25,7 +25,7 @@ public function up(Schema $schema) $this->addSql('UPDATE sitegeist_bitzer_domain_task_task SET agent = concat("role:", agent)'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".'); From c9f4f2ba9e1426100698d4cc5b7ec7169e85610e Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt Date: Mon, 27 Sep 2021 16:12:30 +0200 Subject: [PATCH 3/5] Use role label for providers --- Classes/Domain/Agent/Agent.php | 2 +- composer.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Classes/Domain/Agent/Agent.php b/Classes/Domain/Agent/Agent.php index cc7eb6c..0130973 100644 --- a/Classes/Domain/Agent/Agent.php +++ b/Classes/Domain/Agent/Agent.php @@ -44,7 +44,7 @@ public static function fromRole(Role $role): self { return new self( $role->getIdentifier(), - $role->getName(), + $role->getLabel(), AgentType::role() ); } diff --git a/composer.json b/composer.json index d58aa40..b726f9c 100644 --- a/composer.json +++ b/composer.json @@ -3,10 +3,10 @@ "type": "neos-package", "description": "A content lifecycle task manager for Neos CMS", "require": { - "neos/neos": "~5.0 || ~7.0", - "neos/fusion": "~5.0 || ~7.0", - "neos/content-repository": "~5.0 || ~7.0", - "neos/fusion-afx": "~1.4 || ~7.0", + "neos/neos": "~7.0", + "neos/fusion": "~7.0", + "neos/content-repository": "~7.0", + "neos/fusion-afx": "~7.0", "doctrine/dbal": "*", "doctrine/migrations": "*", "neos/content-repository-dimensionspace": "dev-master" From 3664c6821e585402f9fad63fef20b78e0f3ef7a1 Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt Date: Mon, 27 Sep 2021 17:28:31 +0200 Subject: [PATCH 4/5] Adjust translations --- Resources/Private/Fusion/Application/Index.fusion | 2 +- Resources/Private/Translations/de/Module.Bitzer.xlf | 2 +- Resources/Private/Translations/en/Module.Bitzer.xlf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Private/Fusion/Application/Index.fusion b/Resources/Private/Fusion/Application/Index.fusion index f9534d9..3baf344 100644 --- a/Resources/Private/Fusion/Application/Index.fusion +++ b/Resources/Private/Fusion/Application/Index.fusion @@ -21,7 +21,7 @@ prototype(Sitegeist.Bitzer:Application.Index) < prototype(Neos.Fusion:Component)
diff --git a/Resources/Private/Translations/de/Module.Bitzer.xlf b/Resources/Private/Translations/de/Module.Bitzer.xlf index 1847a68..fe9fcd9 100644 --- a/Resources/Private/Translations/de/Module.Bitzer.xlf +++ b/Resources/Private/Translations/de/Module.Bitzer.xlf @@ -1,6 +1,6 @@ - + Schedule diff --git a/Resources/Private/Translations/en/Module.Bitzer.xlf b/Resources/Private/Translations/en/Module.Bitzer.xlf index dd09793..b952d62 100644 --- a/Resources/Private/Translations/en/Module.Bitzer.xlf +++ b/Resources/Private/Translations/en/Module.Bitzer.xlf @@ -1,6 +1,6 @@ - + Schedule From 233bf89340b89899f7140139d2cd610e4b553301 Mon Sep 17 00:00:00 2001 From: Bernhard Schmitt Date: Fri, 8 Oct 2021 10:11:53 +0200 Subject: [PATCH 5/5] Properly type attemptedValue in AgentTypeIsInvalid --- Classes/Domain/Agent/AgentTypeIsInvalid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Agent/AgentTypeIsInvalid.php b/Classes/Domain/Agent/AgentTypeIsInvalid.php index 9809f5b..1926b9b 100644 --- a/Classes/Domain/Agent/AgentTypeIsInvalid.php +++ b/Classes/Domain/Agent/AgentTypeIsInvalid.php @@ -13,7 +13,7 @@ */ final class AgentTypeIsInvalid extends \DomainException { - public static function becauseAgentTypeHasInvalidValue(int $attemptedValue, array $validValues): self + public static function becauseAgentTypeHasInvalidValue(string $attemptedValue, array $validValues): self { return new self('"' . $attemptedValue . '" is no valid value for AgentType, must be one of '.join(', ', $validValues), 1591622975); }