Skip to content
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

Neos7compatibility #11

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Classes/Domain/Agent/Agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function fromRole(Role $role): self
{
return new self(
$role->getIdentifier(),
$role->getName(),
$role->getLabel(),
AgentType::role()
);
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Agent/AgentTypeIsInvalid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions Migrations/Mysql/Version20190902163126.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Neos\Flow\Persistence\Doctrine\Migrations;

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

/**
Expand All @@ -16,15 +16,15 @@ 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".');

$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".');
Expand Down
6 changes: 3 additions & 3 deletions Migrations/Mysql/Version20200707164857.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Neos\Flow\Persistence\Doctrine\Migrations;

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

/**
Expand All @@ -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".');
Expand All @@ -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".');
Expand Down
6 changes: 3 additions & 3 deletions Migrations/Mysql/Version20200707184200.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Neos\Flow\Persistence\Doctrine\Migrations;

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

/**
Expand All @@ -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".');
Expand All @@ -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".');
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Fusion/Application/Index.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ prototype(Sitegeist.Bitzer:Application.Index) < prototype(Neos.Fusion:Component)
<div class="widget-header">
<i class="fas fa-clipboard-list neos-pull-left"></i>
<h3>
<a href={scheduleUri}>{${Translation.translate('schedule.label', null, [], 'Module.Bitzer', 'Sitegeist.Bitzer')}}</a>
<a href={scheduleUri}>{${Translation.translate('schedule.label', null, [], 'Module/Bitzer', 'Sitegeist.Bitzer')}}</a>
</h3>
</div>
<div class="widget-body">
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Translations/de/Module.Bitzer.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="Module.Bitzer" product-name="Sitegeist.Bitzer" source-language="en" datatype="plaintext">
<file original="Module/Bitzer" product-name="Sitegeist.Bitzer" source-language="en" target-language="de" datatype="plaintext">
<body>
<trans-unit id="schedule.label" xml:space="preserve" approved="yes">
<source>Schedule</source>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Translations/en/Module.Bitzer.xlf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="Module.Bitzer" product-name="Sitegeist.Bitzer" source-language="en" datatype="plaintext">
<file original="Module/Bitzer" product-name="Sitegeist.Bitzer" source-language="en" datatype="plaintext">
<body>
<trans-unit id="schedule.label" xml:space="preserve" approved="yes">
<source>Schedule</source>
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "~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"
Expand Down