diff --git a/Controller/SingleTaskController.php b/Controller/SingleTaskController.php
index fd5e26e33..59e414907 100644
--- a/Controller/SingleTaskController.php
+++ b/Controller/SingleTaskController.php
@@ -4,7 +4,7 @@ namespace Chill\TaskBundle\Controller;
use Chill\PersonBundle\Privacy\PrivacyEvent;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
+use Symfony\Component\Routing\Annotation\Route;
use Doctrine\ORM\EntityManager;
use Chill\PersonBundle\Entity\Person;
use Symfony\Component\HttpFoundation\Request;
@@ -27,6 +27,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Chill\TaskBundle\Event\UI\UIEvent;
use Chill\MainBundle\Repository\CenterRepository;
+use Chill\MainBundle\Timeline\TimelineBuilder;
class SingleTaskController extends Controller
@@ -37,14 +38,23 @@ class SingleTaskController extends Controller
*/
protected $eventDispatcher;
+ /**
+ *
+ * @var TimelineBuilder
+ */
+ protected $timelineBuilder;
+
/**
* SingleTaskController constructor.
*
* @param EventDispatcherInterface $eventDispatcher
*/
- public function __construct(EventDispatcherInterface $eventDispatcher)
- {
+ public function __construct(
+ EventDispatcherInterface $eventDispatcher,
+ TimelineBuilder $timelineBuilder
+ ) {
$this->eventDispatcher = $eventDispatcher;
+ $this->timelineBuilder = $timelineBuilder;
}
@@ -65,7 +75,9 @@ class SingleTaskController extends Controller
;
if ($request->query->has('person_id')) {
- $personId = $request->query->getInt('person_id', null);
+
+ $personId = $request->query->getInt('person_id', 0); // sf4 check:
+ // prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
if ($personId === null) {
return new Response("You must provide a person_id", Response::HTTP_BAD_REQUEST);
@@ -151,7 +163,7 @@ class SingleTaskController extends Controller
throw $this->createNotFoundException('Unable to find Task entity.');
}
- $timeline = $this->get('chill.main.timeline_builder')
+ $timeline = $this->timelineBuilder
->getTimelineHTML('task', array('task' => $task));
$event = new PrivacyEvent($person, array(
@@ -444,7 +456,9 @@ class SingleTaskController extends Controller
if ($request->query->get('user_id') === '_unassigned') {
$params['unassigned'] = true;
} else {
- $userId = $request->query->getInt('user_id', null);
+ $userId = $request->query->getInt('user_id', 0); // sf4 check:
+ // prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
+
$user = $this->getDoctrine()->getManager()
->getRepository('ChillMainBundle:User')
->find($userId);
@@ -460,7 +474,9 @@ class SingleTaskController extends Controller
if (!empty($request->query->get('scope_id'))) {
- $scopeId = $request->query->getInt('scope_id', null);
+ $scopeId = $request->query->getInt('scope_id', 0); // sf4 check:
+ // prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
+
$scope = $this->getDoctrine()->getManager()
->getRepository('ChillMainBundle:Scope')
->find($scopeId);
@@ -527,7 +543,7 @@ class SingleTaskController extends Controller
if ($viewParams['person'] !== null){
$viewParams['layout'] = 'ChillPersonBundle::layout.html.twig';
} else {
- $viewParams['layout'] = 'ChillMainBundle::layout.html.twig';
+ $viewParams['layout'] = '@ChillMain/layout.html.twig';
}
// Form for filtering tasks
diff --git a/DataFixtures/ORM/LoadTaskACL.php b/DataFixtures/ORM/LoadTaskACL.php
index a365f82d9..5af11f6a2 100644
--- a/DataFixtures/ORM/LoadTaskACL.php
+++ b/DataFixtures/ORM/LoadTaskACL.php
@@ -21,7 +21,7 @@ namespace Chill\TaskBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
-use Doctrine\Common\Persistence\ObjectManager;
+use Doctrine\Persistence\ObjectManager;
use Chill\MainBundle\DataFixtures\ORM\LoadPermissionsGroup;
use Chill\MainBundle\Entity\RoleScope;
use Chill\MainBundle\DataFixtures\ORM\LoadScopes;
diff --git a/DependencyInjection/ChillTaskExtension.php b/DependencyInjection/ChillTaskExtension.php
index 3eda043a5..5ffbd38e7 100644
--- a/DependencyInjection/ChillTaskExtension.php
+++ b/DependencyInjection/ChillTaskExtension.php
@@ -25,17 +25,17 @@ class ChillTaskExtension extends Extension implements PrependExtensionInterface
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
- $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
- $loader->load('services/controller.yml');
- $loader->load('services/security.yml');
- $loader->load('services/repositories.yml');
- $loader->load('services/workflow.yml');
- $loader->load('services/templating.yml');
- $loader->load('services/menu.yml');
- $loader->load('services/event.yml');
- $loader->load('services/timeline.yml');
- $loader->load('services/fixtures.yml');
- $loader->load('services/form.yml');
+ $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config'));
+ $loader->load('services/controller.yaml');
+ $loader->load('services/security.yaml');
+ $loader->load('services/repositories.yaml');
+ $loader->load('services/workflow.yaml');
+ $loader->load('services/templating.yaml');
+ $loader->load('services/menu.yaml');
+ $loader->load('services/event.yaml');
+ $loader->load('services/timeline.yaml');
+ $loader->load('services/fixtures.yaml');
+ $loader->load('services/form.yaml');
}
public function prepend(ContainerBuilder $container)
@@ -51,7 +51,7 @@ class ChillTaskExtension extends Extension implements PrependExtensionInterface
$container->prependExtensionConfig('chill_main', array(
'routing' => array(
'resources' => array(
- '@ChillTaskBundle/Resources/config/routing.yml'
+ '@ChillTaskBundle/config/routes.yaml'
)
)
));
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index e0989cd69..21d50c7f5 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -17,8 +17,8 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
- $treeBuilder = new TreeBuilder();
- $rootNode = $treeBuilder->root('chill_task');
+ $treeBuilder = new TreeBuilder('chill_task');
+ $rootNode = $treeBuilder->getRootNode('chill_task');
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
diff --git a/Entity/SingleTask.php b/Entity/SingleTask.php
index 03c904497..23bdd61df 100644
--- a/Entity/SingleTask.php
+++ b/Entity/SingleTask.php
@@ -10,7 +10,7 @@ use Doctrine\Common\Collections\Collection;
* SingleTask
*
* @ORM\Table(
- * "chill_task.single_task",
+ * name="chill_task.single_task",
* indexes={
* @ORM\Index(
* name="by_type",
diff --git a/Entity/Task/SingleTaskPlaceEvent.php b/Entity/Task/SingleTaskPlaceEvent.php
index 75dfd82d6..fe8d2583e 100644
--- a/Entity/Task/SingleTaskPlaceEvent.php
+++ b/Entity/Task/SingleTaskPlaceEvent.php
@@ -24,7 +24,7 @@ use Chill\TaskBundle\Entity\SingleTask;
*
*
* @ORM\Table(
- * "chill_task.single_task_place_event",
+ * name="chill_task.single_task_place_event",
* indexes={
* @ORM\Index(
* name="transition_task_date",
diff --git a/Resources/views/SingleTask/_list.html.twig b/Resources/views/SingleTask/_list.html.twig
index 9f124d866..e45f2c26f 100644
--- a/Resources/views/SingleTask/_list.html.twig
+++ b/Resources/views/SingleTask/_list.html.twig
@@ -40,17 +40,17 @@
{% if task.startDate is not null %}
-
- {{ task.startDate|localizeddate('medium', 'none') }}
+ {{ task.startDate|format_date('medium', 'none') }}
{% endif %}
{% if task.warningDate is not null %}
-
- {{ task.warningDate|localizeddate('medium', 'none') }}
+ {{ task.warningDate|format_date('medium', 'none') }}
{% endif %}
{% if task.endDate is not null %}
-
- {{ task.endDate|localizeddate('medium', 'none') }}
+ {{ task.endDate|format_date('medium', 'none') }}
{% endif %}
diff --git a/Resources/views/SingleTask/confirm_delete.html.twig b/Resources/views/SingleTask/confirm_delete.html.twig
index 5e4fa4a0f..4ea637a60 100644
--- a/Resources/views/SingleTask/confirm_delete.html.twig
+++ b/Resources/views/SingleTask/confirm_delete.html.twig
@@ -1,4 +1,4 @@
-{% extends "ChillPersonBundle::layout.html.twig" %}
+{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_task_task_list' %}
{% set person = task.person %}
@@ -7,7 +7,7 @@
{% block personcontent %}
-{{ include('ChillMainBundle:Util:confirmation_template.html.twig',
+{{ include('@ChillMain/Util/confirmation_template.html.twig',
{
'title' : 'Remove task'|trans,
'confirm_question' : 'Are you sure you want to remove the task about "%name%" ?'|trans({ '%name%' : person.firstname ~ ' ' ~ person.lastname } ),
diff --git a/Resources/views/SingleTask/edit.html.twig b/Resources/views/SingleTask/edit.html.twig
index 7f683d0a7..c43aaf0a8 100644
--- a/Resources/views/SingleTask/edit.html.twig
+++ b/Resources/views/SingleTask/edit.html.twig
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
#}
-{% extends "ChillPersonBundle::layout.html.twig" %}
+{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_task_single_task_edit' %}
{% set person = task.person %}
diff --git a/Resources/views/SingleTask/index.html.twig b/Resources/views/SingleTask/index.html.twig
index f6509015f..2caaeceec 100644
--- a/Resources/views/SingleTask/index.html.twig
+++ b/Resources/views/SingleTask/index.html.twig
@@ -15,7 +15,7 @@
* along with this program. If not, see .
#}
-{% extends layout %}
+{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_task_single_task_new' %}
@@ -31,7 +31,8 @@
{# filter tasks #}
-
+{% block filtertasks %}{#
+ sf4 check: prevent error message: `A block definition cannot be nested under non-capturing nodes.` #}
{% if person is not null %}
{% block personcontent %}
{% include 'ChillTaskBundle:SingleTask:_list.html.twig' %}
@@ -43,3 +44,4 @@
{% endblock %}
{% endif %}
+{% endblock %}
diff --git a/Resources/views/SingleTask/new.html.twig b/Resources/views/SingleTask/new.html.twig
index 1f054820c..e4c7e14a0 100644
--- a/Resources/views/SingleTask/new.html.twig
+++ b/Resources/views/SingleTask/new.html.twig
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
#}
-{% extends "ChillPersonBundle::layout.html.twig" %}
+{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_task_single_task_new' %}
{% set person = task.person %}
diff --git a/Resources/views/SingleTask/show.html.twig b/Resources/views/SingleTask/show.html.twig
index f19825cdd..224e52b8c 100644
--- a/Resources/views/SingleTask/show.html.twig
+++ b/Resources/views/SingleTask/show.html.twig
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
#}
-{% extends "ChillPersonBundle::layout.html.twig" %}
+{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_task_single_task_show' %}
{% set person = task.person %}
@@ -62,17 +62,17 @@
{% else %}
{% if task.startDate is not null %}
{{ 'Start'|trans }}
- {{ task.startDate|localizeddate('long', 'none') }}
+ {{ task.startDate|format_date('long', 'none') }}
{% endif %}
{% if task.endDate is not null %}
{{ 'End'|trans }}
- {{ task.endDate|localizeddate('long', 'none') }}
+ {{ task.endDate|format_date('long', 'none') }}
{% endif %}
{% if task.warningDate is not null %}
{{ 'Warning'|trans }}
- {{ task.warningDate|localizeddate('long', 'none') }}
+ {{ task.warningDate|format_date('long', 'none') }}
{% endif %}
{% endif %}
diff --git a/Resources/views/SingleTask/transition.html.twig b/Resources/views/SingleTask/transition.html.twig
index 7ba341cd9..fc27ee8c4 100644
--- a/Resources/views/SingleTask/transition.html.twig
+++ b/Resources/views/SingleTask/transition.html.twig
@@ -1,4 +1,4 @@
-{% extends "ChillPersonBundle::layout.html.twig" %}
+{% extends "@ChillPerson/layout.html.twig" %}
{% set activeRouteKey = 'chill_task_task_list' %}
{% set person = task.person %}
diff --git a/Resources/views/Timeline/single_task_transition_person_context.html.twig b/Resources/views/Timeline/single_task_transition_person_context.html.twig
index 4bd7f6176..3b1b3cde1 100644
--- a/Resources/views/Timeline/single_task_transition_person_context.html.twig
+++ b/Resources/views/Timeline/single_task_transition_person_context.html.twig
@@ -1,6 +1,6 @@
- {{ event.datetime|localizeddate('long', 'none') }}
+ {{ event.datetime|format_date('long', 'none') }}
/ {{ 'Task'|trans }} /
{% if transition is not null %}
{{ task_workflow_metadata(event.task, 'transition.sentence', transition)|trans({ '%user%': event.author.username }) }}
@@ -25,7 +25,7 @@
{% if event.task.endDate is not empty %}
{{ 'Task end date'|trans }}
- {{ event.task.endDate|localizeddate('medium', 'none') }}
+ {{ event.task.endDate|format_date('medium', 'none') }}
{% endif %}
diff --git a/Resources/views/Timeline/single_task_transition_task_context.html.twig b/Resources/views/Timeline/single_task_transition_task_context.html.twig
index 010023a29..4f6b081bc 100644
--- a/Resources/views/Timeline/single_task_transition_task_context.html.twig
+++ b/Resources/views/Timeline/single_task_transition_task_context.html.twig
@@ -1,6 +1,6 @@
- {{ event.datetime|localizeddate('long', 'short') }}
+ {{ event.datetime|format_date('long', 'short') }}
{% if transition is not null %}
{{ task_workflow_metadata(event.task, 'transition.sentence', transition)|trans({ '%user%': event.author.username }) }}
diff --git a/Templating/TaskTwigExtension.php b/Templating/TaskTwigExtension.php
index fd799dd34..e79cdcda2 100644
--- a/Templating/TaskTwigExtension.php
+++ b/Templating/TaskTwigExtension.php
@@ -27,7 +27,7 @@ use Chill\TaskBundle\Workflow\TaskWorkflowManager;
*
* @author Julien Fastré
*/
-class TaskTwigExtension extends \Twig_Extension
+class TaskTwigExtension extends AbstractExtension
{
/**
*
diff --git a/Timeline/TaskLifeCycleEventTimelineProvider.php b/Timeline/TaskLifeCycleEventTimelineProvider.php
index ce2f99669..db099a3e1 100644
--- a/Timeline/TaskLifeCycleEventTimelineProvider.php
+++ b/Timeline/TaskLifeCycleEventTimelineProvider.php
@@ -136,7 +136,14 @@ class TaskLifeCycleEventTimelineProvider implements TimelineProviderInterface
public function getEntityTemplate($entity, $context, array $args)
{
- $workflow = $this->registry->get($entity->getTask(), $entity->getData['workflow']);
+ $workflow = $this->registry->get($entity->getTask(),
+ (isset($entity->getData()['workflow'])) ? $entity->getData()['workflow'] : null
+ );
+ // sf4 check: prevent error message:
+ // `Notice: Undefined property: Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent::$getData`
+ // * fix syntax error on $entity->getData['workflow']
+ // * return null if not set
+
$transition = $this->getTransitionByName($entity->getTransition(), $workflow);
return [
diff --git a/Workflow/TaskWorkflowManager.php b/Workflow/TaskWorkflowManager.php
index cf34f4c66..13be91bd3 100644
--- a/Workflow/TaskWorkflowManager.php
+++ b/Workflow/TaskWorkflowManager.php
@@ -18,8 +18,8 @@
namespace Chill\TaskBundle\Workflow;
use Chill\TaskBundle\Entity\AbstractTask;
-use Symfony\Component\Workflow\SupportStrategy\SupportStrategyInterface;
-use Symfony\Component\Workflow\Workflow;
+use Symfony\Component\Workflow\SupportStrategy\WorkflowSupportStrategyInterface;
+use Symfony\Component\Workflow\WorkflowInterface;
use Symfony\Component\Workflow\Event\Event;
/**
@@ -27,7 +27,7 @@ use Symfony\Component\Workflow\Event\Event;
*
* @author Julien Fastré
*/
-class TaskWorkflowManager implements SupportStrategyInterface
+class TaskWorkflowManager implements WorkflowSupportStrategyInterface
{
/**
*
@@ -66,7 +66,7 @@ class TaskWorkflowManager implements SupportStrategyInterface
return $definitions[0];
}
- public function supports(Workflow $workflow, $subject): bool
+ public function supports(WorkflowInterface $workflow, $subject): bool
{
if (!$subject instanceof AbstractTask) {
return false;
diff --git a/composer.json b/composer.json
index 41540a946..ecd4a91e9 100644
--- a/composer.json
+++ b/composer.json
@@ -11,11 +11,9 @@
"classmap": [ "Resources/test/Fixtures/App/app/AppKernel.php" ]
},
"require": {
- "chill-project/person": "~1.5"
+
},
"require-dev": {
- "fzaninotto/faker": "^1.7",
- "phpunit/phpunit": "^7.1"
},
"license": "AGPL-3.0-or-later",
"authors": [
diff --git a/Resources/config/routing.yml b/config/routes.yaml
similarity index 100%
rename from Resources/config/routing.yml
rename to config/routes.yaml
diff --git a/Resources/config/services.yml b/config/services.yaml
similarity index 100%
rename from Resources/config/services.yml
rename to config/services.yaml
diff --git a/Resources/config/services/controller.yml b/config/services/controller.yaml
similarity index 75%
rename from Resources/config/services/controller.yml
rename to config/services/controller.yaml
index bfeffa0d5..461f65f01 100644
--- a/Resources/config/services/controller.yml
+++ b/config/services/controller.yaml
@@ -1,9 +1,10 @@
services:
Chill\TaskBundle\Controller\:
- resource: '../../../Controller'
+ resource: '../../Controller'
tags: ['controller.service_arguments']
Chill\TaskBundle\Controller\SingleTaskController:
arguments:
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
+ $timelineBuilder: '@chill_main.timeline_builder'
tags: ['controller.service_arguments']
diff --git a/Resources/config/services/event.yml b/config/services/event.yaml
similarity index 100%
rename from Resources/config/services/event.yml
rename to config/services/event.yaml
diff --git a/Resources/config/services/fixtures.yml b/config/services/fixtures.yaml
similarity index 67%
rename from Resources/config/services/fixtures.yml
rename to config/services/fixtures.yaml
index 38f9fa785..6523f4376 100644
--- a/Resources/config/services/fixtures.yml
+++ b/config/services/fixtures.yaml
@@ -1,4 +1,4 @@
services:
Chill\TaskBundle\DataFixtures\ORM\:
- resource: ../../../DataFixtures/ORM
+ resource: ../../DataFixtures/ORM
tags: [ 'doctrine.fixture.orm' ]
diff --git a/Resources/config/services/form.yml b/config/services/form.yaml
similarity index 100%
rename from Resources/config/services/form.yml
rename to config/services/form.yaml
diff --git a/Resources/config/services/menu.yml b/config/services/menu.yaml
similarity index 100%
rename from Resources/config/services/menu.yml
rename to config/services/menu.yaml
diff --git a/Resources/config/services/repositories.yml b/config/services/repositories.yaml
similarity index 100%
rename from Resources/config/services/repositories.yml
rename to config/services/repositories.yaml
diff --git a/Resources/config/services/security.yml b/config/services/security.yaml
similarity index 100%
rename from Resources/config/services/security.yml
rename to config/services/security.yaml
diff --git a/Resources/config/services/templating.yml b/config/services/templating.yaml
similarity index 100%
rename from Resources/config/services/templating.yml
rename to config/services/templating.yaml
diff --git a/Resources/config/services/timeline.yml b/config/services/timeline.yaml
similarity index 97%
rename from Resources/config/services/timeline.yml
rename to config/services/timeline.yaml
index b00dd4ca7..d6ca33606 100644
--- a/Resources/config/services/timeline.yml
+++ b/config/services/timeline.yaml
@@ -5,6 +5,7 @@ services:
$registry: '@Symfony\Component\Workflow\Registry'
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
+ public: true
tags:
- { name: 'chill.timeline', context: 'person' }
diff --git a/Resources/config/services/workflow.yml b/config/services/workflow.yaml
similarity index 100%
rename from Resources/config/services/workflow.yml
rename to config/services/workflow.yaml
diff --git a/Resources/migrations/Version20180413135614.php b/migrations/Version20180413135614.php
similarity index 94%
rename from Resources/migrations/Version20180413135614.php
rename to migrations/Version20180413135614.php
index 873f9b678..304ecab7e 100644
--- a/Resources/migrations/Version20180413135614.php
+++ b/migrations/Version20180413135614.php
@@ -2,7 +2,7 @@
namespace Application\Migrations;
-use Doctrine\DBAL\Migrations\AbstractMigration;
+use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
@@ -13,7 +13,7 @@ class Version20180413135614 extends AbstractMigration
/**
* @param Schema $schema
*/
- public function up(Schema $schema)
+ public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@@ -33,7 +33,7 @@ class Version20180413135614 extends AbstractMigration
/**
* @param Schema $schema
*/
- public function down(Schema $schema)
+ public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
diff --git a/Resources/migrations/Version20180413201023.php b/migrations/Version20180413201023.php
similarity index 95%
rename from Resources/migrations/Version20180413201023.php
rename to migrations/Version20180413201023.php
index f068fe0e2..88890edaf 100644
--- a/Resources/migrations/Version20180413201023.php
+++ b/migrations/Version20180413201023.php
@@ -2,7 +2,7 @@
namespace Application\Migrations;
-use Doctrine\DBAL\Migrations\AbstractMigration;
+use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
@@ -13,7 +13,7 @@ class Version20180413201023 extends AbstractMigration
/**
* @param Schema $schema
*/
- public function up(Schema $schema)
+ public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@@ -36,7 +36,7 @@ class Version20180413201023 extends AbstractMigration
/**
* @param Schema $schema
*/
- public function down(Schema $schema)
+ public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
diff --git a/Resources/migrations/Version20180426093011.php b/migrations/Version20180426093011.php
similarity index 87%
rename from Resources/migrations/Version20180426093011.php
rename to migrations/Version20180426093011.php
index 286d4e3d1..58065f182 100644
--- a/Resources/migrations/Version20180426093011.php
+++ b/migrations/Version20180426093011.php
@@ -2,7 +2,7 @@
namespace Application\Migrations;
-use Doctrine\DBAL\Migrations\AbstractMigration;
+use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
@@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
*/
class Version20180426093011 extends AbstractMigration
{
- public function up(Schema $schema)
+ public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@@ -18,7 +18,7 @@ class Version20180426093011 extends AbstractMigration
$this->addSql('ALTER TABLE chill_task.recurring_task ADD closed BOOLEAN DEFAULT \'false\' NOT NULL');
}
- public function down(Schema $schema)
+ public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
diff --git a/Resources/migrations/Version20180502194119.php b/migrations/Version20180502194119.php
similarity index 93%
rename from Resources/migrations/Version20180502194119.php
rename to migrations/Version20180502194119.php
index a07ad1089..fbfe0f685 100644
--- a/Resources/migrations/Version20180502194119.php
+++ b/migrations/Version20180502194119.php
@@ -2,7 +2,7 @@
namespace Application\Migrations;
-use Doctrine\DBAL\Migrations\AbstractMigration;
+use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
@@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema;
*/
class Version20180502194119 extends AbstractMigration
{
- public function up(Schema $schema)
+ public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@@ -23,7 +23,7 @@ class Version20180502194119 extends AbstractMigration
$this->addSql('ALTER TABLE chill_task.single_task_place_event ADD CONSTRAINT FK_D459EBEE8DB60186 FOREIGN KEY (task_id) REFERENCES chill_task.single_task (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
- public function down(Schema $schema)
+ public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
diff --git a/Resources/migrations/Version20181113161925.php b/migrations/Version20181113161925.php
similarity index 91%
rename from Resources/migrations/Version20181113161925.php
rename to migrations/Version20181113161925.php
index 7b3ae95f4..c5cdb015b 100644
--- a/Resources/migrations/Version20181113161925.php
+++ b/migrations/Version20181113161925.php
@@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
*/
final class Version20181113161925 extends AbstractMigration
{
- public function up(Schema $schema) : void
+ public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@@ -18,7 +18,7 @@ final class Version20181113161925 extends AbstractMigration
$this->addSql('CREATE INDEX transition_task ON chill_task.single_task_place_event (task_id, transition)');
}
- public function down(Schema $schema) : void
+ public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
diff --git a/Resources/migrations/Version20181113164108.php b/migrations/Version20181113164108.php
similarity index 90%
rename from Resources/migrations/Version20181113164108.php
rename to migrations/Version20181113164108.php
index 48e22c597..0945ca638 100644
--- a/Resources/migrations/Version20181113164108.php
+++ b/migrations/Version20181113164108.php
@@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
*/
final class Version20181113164108 extends AbstractMigration
{
- public function up(Schema $schema) : void
+ public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@@ -18,7 +18,7 @@ final class Version20181113164108 extends AbstractMigration
$this->addSql('CREATE INDEX by_current_state ON chill_task.single_task USING GIN (current_states)');
}
- public function down(Schema $schema) : void
+ public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
diff --git a/Resources/translations/messages.fr.yml b/translations/messages.fr.yml
similarity index 93%
rename from Resources/translations/messages.fr.yml
rename to translations/messages.fr.yml
index 80d3065b1..49a4c2e09 100644
--- a/Resources/translations/messages.fr.yml
+++ b/translations/messages.fr.yml
@@ -15,7 +15,6 @@ Scope: Cercle
Task: Tâche
Details: Détails
Person: Personne
-Scope: Cercle
Date: Date
Dates: Dates
User: Utilisateur
@@ -74,10 +73,10 @@ cancel: annuler
Start_verb: Démarrer
Close_verb: Clotûrer
Set this task to cancel state: Marquer cette tâche comme annulée
-'%user% has closed the task': %user% a fermé la tâche
-'%user% has canceled the task': %user% a annulé la tâche
-'%user% has started the task': %user% a commencé la tâche
-'%user% has created the task': %user% a introduit la tâche
+'%user% has closed the task': '%user% a fermé la tâche'
+'%user% has canceled the task': '%user% a annulé la tâche'
+'%user% has started the task': '%user% a commencé la tâche'
+'%user% has created the task': '%user% a introduit la tâche'
Are you sure you want to close this task ?: Êtes-vous sûrs de vouloir clotûrer cette tâche ?
Are you sure you want to cancel this task ?: Êtes-vous sûrs de vouloir annuler cette tâche ?
Are you sure you want to start this task ?: Êtes-vous sûrs de vouloir démarrer cette tâche ?
diff --git a/Resources/translations/validators.fr.yml b/translations/validators.fr.yml
similarity index 100%
rename from Resources/translations/validators.fr.yml
rename to translations/validators.fr.yml