From eb6efcefd8757ca83a5a95f96cf2436e6cd494e1 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 29 Sep 2022 19:12:10 +0200 Subject: [PATCH 01/95] Add new Abstract Aggregator Test to check qb aliases (for join clauses) --- .../Test/Export/AbstractAggregatorTest.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php index 40792a1c6..99ece6002 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php @@ -62,6 +62,18 @@ abstract class AbstractAggregatorTest extends KernelTestCase } } + /** + * provide data for `testAliasDidNotDisappears`. + */ + public function dataProviderAliasDidNotDisappears() + { + foreach ($this->getQueryBuilders() as $qb) { + foreach ($this->getFormData() as $data) { + yield [clone $qb, $data]; + } + } + } + /** * Create an aggregator instance which will be used in tests. * @@ -256,4 +268,29 @@ abstract class AbstractAggregatorTest extends KernelTestCase 'test that the title is not empty' ); } + + /** + * Compare aliases array before and after that aggregator alter query + * + * @dataProvider dataProviderAliasDidNotDisappears + * + * @param QueryBuilder $qb + * @param array $data + * @return void + */ + public function testAliasDidNotDisappears(QueryBuilder $qb, array $data) + { + $aliases = $qb->getAllAliases(); + + $this->getAggregator()->alterQuery($qb, $data); + + $alteredQuery = $qb->getAllAliases(); + + $this->assertGreaterThanOrEqual(count($aliases), count($alteredQuery)); + + foreach ($aliases as $alias) { + $this->assertContains($alias, $alteredQuery); + } + } + } From ccedebda9093e743a708cf4c843b26f2924cffae Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 29 Sep 2022 20:17:53 +0200 Subject: [PATCH 02/95] Add new Abstract Filter Test to check qb aliases (for join clauses) --- .../Test/Export/AbstractFilterTest.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php index 8e9761c67..91e6edd69 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php @@ -55,6 +55,18 @@ abstract class AbstractFilterTest extends KernelTestCase } } + /** + * provide data for `testAliasDidNotDisappears`. + */ + public function dataProviderAliasDidNotDisappears() + { + foreach ($this->getQueryBuilders() as $qb) { + foreach ($this->getFormData() as $data) { + yield [clone $qb, $data]; + } + } + } + /** * Create a filter which will be used in tests. * @@ -198,4 +210,28 @@ abstract class AbstractFilterTest extends KernelTestCase 'test that the title is not empty' ); } + + /** + * Compare aliases array before and after that filter alter query + * + * @dataProvider dataProviderAliasDidNotDisappears + * + * @param QueryBuilder $qb + * @param array $data + * @return void + */ + public function testAliasDidNotDisappears(QueryBuilder $qb, array $data) + { + $aliases = $qb->getAllAliases(); + + $this->getFilter()->alterQuery($qb, $data); + + $alteredQuery = $qb->getAllAliases(); + + $this->assertGreaterThanOrEqual(count($aliases), count($alteredQuery)); + + foreach ($aliases as $alias) { + $this->assertContains($alias, $alteredQuery); + } + } } From c73bb10dce904621ae87f9964ba8aa428a7583c2 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 6 Oct 2022 18:47:53 +0200 Subject: [PATCH 03/95] issue 644: Use Vue AddPersons picker to select users --- .../Export/Filter/ACPFilters/ByUserFilter.php | 9 ++------- .../Export/Filter/ACPFilters/UserFilter.php | 9 ++------- .../Resources/public/module/pick-entity/index.js | 4 ---- .../ChillMainBundle/Resources/views/Export/new.html.twig | 5 +++++ 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php index c8f05f321..e52c16d40 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php @@ -15,10 +15,10 @@ namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Export\FilterInterface; +use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Templating\Entity\UserRender; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; use function in_array; @@ -63,13 +63,8 @@ class ByUserFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_users', EntityType::class, [ - 'class' => User::class, - 'choice_label' => function (User $u) { - return $this->userRender->renderString($u, []); - }, + $builder->add('accepted_users', PickUserDynamicType::class, [ 'multiple' => true, - 'expanded' => true, ]); } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php index a4d572087..2ffd99469 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php @@ -15,10 +15,10 @@ namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Export\FilterInterface; +use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Templating\Entity\UserRender; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; class UserFilter implements FilterInterface @@ -58,13 +58,8 @@ class UserFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_users', EntityType::class, [ - 'class' => User::class, - 'choice_label' => function (User $u) { - return $this->userRender->renderString($u, []); - }, + $builder->add('accepted_users', PickUserDynamicType::class, [ 'multiple' => true, - 'expanded' => true, 'label' => 'Creators', ]); } diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js index 511d2126e..72eef0d6c 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js @@ -101,7 +101,3 @@ document.addEventListener('DOMContentLoaded', function(e) { loadDynamicPicker(document) }) - - - - diff --git a/src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig index ad49d9aa6..e1605a4c2 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Export/new.html.twig @@ -20,7 +20,12 @@ {% block title %}{{ export.title|trans }}{% endblock %} +{% block css %} + {{ encore_entry_link_tags('mod_pickentity_type') }} +{% endblock %} + {% block js %} + {{ encore_entry_script_tags('mod_pickentity_type') }} {{ encore_entry_script_tags('page_export') }} {% if export_alias == 'count_social_work_actions' %} {{ encore_entry_script_tags('vue_export_action_goal_result') }} From 9699e2304a4a2bc3bd873d9472eab2435eff9243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 20:51:44 +0200 Subject: [PATCH 04/95] fix cs: declare type and license header mismatch --- src/Bundle/ChillActivityBundle/ChillActivityBundle.php | 1 - .../Controller/ActivityReasonCategoryController.php | 1 - .../ChillActivityBundle/Controller/ActivityReasonController.php | 1 - .../Controller/AdminActivityPresenceController.php | 1 - .../Controller/AdminActivityTypeCategoryController.php | 1 - .../Controller/AdminActivityTypeController.php | 1 - src/Bundle/ChillActivityBundle/Controller/AdminController.php | 1 - src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php | 1 - .../DataFixtures/ORM/LoadActivityNotifications.php | 1 - .../ChillActivityBundle/DataFixtures/ORM/LoadActivityReason.php | 1 - .../DataFixtures/ORM/LoadActivityReasonCategory.php | 1 - .../ChillActivityBundle/DataFixtures/ORM/LoadActivityType.php | 1 - .../DataFixtures/ORM/LoadActivityTypeCategory.php | 1 - .../ChillActivityBundle/DataFixtures/ORM/LoadActivitytACL.php | 1 - .../DependencyInjection/ChillActivityExtension.php | 1 - .../ChillActivityBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillActivityBundle/Entity/Activity.php | 1 - src/Bundle/ChillActivityBundle/Entity/ActivityPresence.php | 1 - src/Bundle/ChillActivityBundle/Entity/ActivityReason.php | 1 - src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php | 1 - src/Bundle/ChillActivityBundle/Entity/ActivityTypeCategory.php | 1 - .../EntityListener/ActivityEntityListener.php | 1 - src/Bundle/ChillActivityBundle/Export/Declarations.php | 1 - .../Export/Filter/ACPFilters/ActivityTypeFilter.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityPresenceType.php | 1 - .../ChillActivityBundle/Form/ActivityReasonCategoryType.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityType.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityTypeCategoryType.php | 1 - src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php | 1 - .../ChillActivityBundle/Form/Type/ActivityFieldPresence.php | 1 - .../ChillActivityBundle/Form/Type/TranslatableActivityReason.php | 1 - .../Form/Type/TranslatableActivityReasonCategory.php | 1 - .../ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php | 1 - src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php | 1 - .../Notification/ActivityNotificationHandler.php | 1 - .../Repository/ActivityACLAwareRepository.php | 1 - .../Repository/ActivityACLAwareRepositoryInterface.php | 1 - .../Repository/ActivityReasonCategoryRepository.php | 1 - .../ChillActivityBundle/Repository/ActivityReasonRepository.php | 1 - src/Bundle/ChillActivityBundle/Repository/ActivityRepository.php | 1 - .../Repository/ActivityTypeCategoryRepository.php | 1 - .../ChillActivityBundle/Security/Authorization/ActivityVoter.php | 1 - .../ChillActivityBundle/Service/DocGenerator/ActivityContext.php | 1 - .../DocGenerator/ListActivitiesByAccompanyingPeriodContext.php | 1 - .../Templating/Entity/ActivityReasonRender.php | 1 - src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php | 1 - .../Tests/Controller/ActivityControllerTest.php | 1 - .../Tests/Controller/ActivityReasonCategoryControllerTest.php | 1 - .../Tests/Controller/ActivityReasonControllerTest.php | 1 - .../Tests/Controller/ActivityTypeControllerTest.php | 1 - src/Bundle/ChillActivityBundle/Tests/Entity/ActivityTest.php | 1 - .../PersonAggregators/ActivityReasonAggregatorTest.php | 1 - .../Tests/Export/Export/LinkedToPerson/CountActivityTest.php | 1 - .../Tests/Export/Export/LinkedToPerson/ListActivityTest.php | 1 - .../Export/Export/LinkedToPerson/StatActivityDurationTest.php | 1 - .../Tests/Export/Filter/ActivityTypeFilterTest.php | 1 - src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php | 1 - .../Tests/Form/Type/TranslatableActivityReasonTest.php | 1 - .../Tests/Form/Type/TranslatableActivityTypeTest.php | 1 - .../Tests/Security/Authorization/ActivityVoterTest.php | 1 - .../ChillActivityBundle/Tests/Timeline/TimelineProviderTest.php | 1 - .../ChillActivityBundle/Timeline/TimelineActivityProvider.php | 1 - .../Validator/Constraints/ActivityValidity.php | 1 - .../Validator/Constraints/ActivityValidityValidator.php | 1 - .../ChillActivityBundle/migrations/Version20150701091248.php | 1 - .../ChillActivityBundle/migrations/Version20150702093317.php | 1 - .../ChillActivityBundle/migrations/Version20150704091347.php | 1 - .../ChillActivityBundle/migrations/Version20160222103457.php | 1 - .../ChillActivityBundle/migrations/Version20161114085659.php | 1 - .../ChillActivityBundle/migrations/Version20210304154629.php | 1 - .../ChillActivityBundle/migrations/Version20210311114250.php | 1 - .../ChillActivityBundle/migrations/Version20210401090853.php | 1 - .../ChillActivityBundle/migrations/Version20210408122329.php | 1 - .../ChillActivityBundle/migrations/Version20210415113216.php | 1 - .../ChillActivityBundle/migrations/Version20210422073711.php | 1 - .../ChillActivityBundle/migrations/Version20210422123846.php | 1 - .../ChillActivityBundle/migrations/Version20210506071150.php | 1 - .../ChillActivityBundle/migrations/Version20210506090417.php | 1 - .../ChillActivityBundle/migrations/Version20210506094520.php | 1 - .../ChillActivityBundle/migrations/Version20210506112500.php | 1 - .../ChillActivityBundle/migrations/Version20210520095626.php | 1 - .../ChillActivityBundle/migrations/Version20210528161250.php | 1 - .../ChillActivityBundle/migrations/Version20210602103243.php | 1 - .../ChillActivityBundle/migrations/Version20211119173555.php | 1 - .../ChillActivityBundle/migrations/Version20211207152023.php | 1 - .../ChillActivityBundle/migrations/Version20220425133027.php | 1 - .../ChillActivityBundle/migrations/Version20220527124438.php | 1 - .../ChillAsideActivityBundle/src/ChillAsideActivityBundle.php | 1 - .../ChillAsideActivityBundle/src/Controller/AdminController.php | 1 - .../src/Controller/AsideActivityCategoryController.php | 1 - .../src/Controller/AsideActivityController.php | 1 - .../src/DataFixtures/ORM/LoadAsideActivity.php | 1 - .../src/DataFixtures/ORM/LoadAsideActivityCategory.php | 1 - .../src/DependencyInjection/ChillAsideActivityExtension.php | 1 - .../src/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php | 1 - .../src/Entity/AsideActivityCategory.php | 1 - .../src/Form/AsideActivityCategoryType.php | 1 - .../ChillAsideActivityBundle/src/Form/AsideActivityFormType.php | 1 - .../ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php | 1 - .../ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php | 1 - src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php | 1 - .../src/Repository/AsideActivityCategoryRepository.php | 1 - .../src/Repository/AsideActivityRepository.php | 1 - .../src/Templating/Entity/CategoryRender.php | 1 - .../src/Tests/Controller/AsideActivityControllerTest.php | 1 - .../src/migrations/Version20210706124644.php | 1 - .../src/migrations/Version20210804082249.php | 1 - .../src/migrations/Version20210806140343.php | 1 - .../src/migrations/Version20210806140710.php | 1 - .../src/migrations/Version20210810084456.php | 1 - .../src/migrations/Version20210922182907.php | 1 - .../src/migrations/Version20211004134012.php | 1 - src/Bundle/ChillBudgetBundle/Calculator/CalculatorInterface.php | 1 - src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php | 1 - src/Bundle/ChillBudgetBundle/Calculator/CalculatorResult.php | 1 - src/Bundle/ChillBudgetBundle/ChillBudgetBundle.php | 1 - src/Bundle/ChillBudgetBundle/Config/ConfigRepository.php | 1 - .../ChillBudgetBundle/Controller/AbstractElementController.php | 1 - src/Bundle/ChillBudgetBundle/Controller/ChargeController.php | 1 - src/Bundle/ChillBudgetBundle/Controller/ElementController.php | 1 - src/Bundle/ChillBudgetBundle/Controller/ResourceController.php | 1 - .../DependencyInjection/ChillBudgetExtension.php | 1 - .../DependencyInjection/Compiler/CalculatorCompilerPass.php | 1 - .../ChillBudgetBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php | 1 - src/Bundle/ChillBudgetBundle/Entity/Charge.php | 1 - src/Bundle/ChillBudgetBundle/Entity/Resource.php | 1 - src/Bundle/ChillBudgetBundle/Form/ChargeType.php | 1 - src/Bundle/ChillBudgetBundle/Form/ResourceType.php | 1 - src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php | 1 - src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php | 1 - src/Bundle/ChillBudgetBundle/Repository/ChargeRepository.php | 1 - src/Bundle/ChillBudgetBundle/Repository/ResourceRepository.php | 1 - .../Security/Authorization/BudgetElementVoter.php | 1 - src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php | 1 - .../ChillBudgetBundle/Service/Summary/SummaryBudgetInterface.php | 1 - src/Bundle/ChillBudgetBundle/Templating/Twig.php | 1 - .../ChillBudgetBundle/Tests/Controller/ElementControllerTest.php | 1 - .../ChillBudgetBundle/migrations/Version20180522080432.php | 1 - .../ChillBudgetBundle/migrations/Version20181219145631.php | 1 - .../ChillBudgetBundle/migrations/Version20220224090319.php | 1 - src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php | 1 - src/Bundle/ChillCalendarBundle/Controller/AdminController.php | 1 - .../ChillCalendarBundle/Controller/CalendarAPIController.php | 1 - src/Bundle/ChillCalendarBundle/Controller/CalendarController.php | 1 - .../Controller/CalendarRangeAPIController.php | 1 - .../ChillCalendarBundle/Controller/CancelReasonController.php | 1 - .../ChillCalendarBundle/DataFixtures/ORM/LoadCalendarRange.php | 1 - .../ChillCalendarBundle/DataFixtures/ORM/LoadCancelReason.php | 1 - src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadInvite.php | 1 - .../DependencyInjection/ChillCalendarExtension.php | 1 - .../ChillCalendarBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillCalendarBundle/Entity/Calendar.php | 1 - src/Bundle/ChillCalendarBundle/Entity/CalendarRange.php | 1 - src/Bundle/ChillCalendarBundle/Entity/CancelReason.php | 1 - src/Bundle/ChillCalendarBundle/Entity/Invite.php | 1 - src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php | 1 - src/Bundle/ChillCalendarBundle/Export/Declarations.php | 1 - src/Bundle/ChillCalendarBundle/Form/CalendarType.php | 1 - src/Bundle/ChillCalendarBundle/Form/CancelReasonType.php | 1 - .../ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php | 1 - src/Bundle/ChillCalendarBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php | 1 - .../ChillCalendarBundle/Repository/CalendarRangeRepository.php | 1 - src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php | 1 - .../ChillCalendarBundle/Repository/CancelReasonRepository.php | 1 - src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php | 1 - .../Tests/Controller/CalendarControllerTest.php | 1 - .../ChillCalendarBundle/migrations/Version20210715141731.php | 1 - .../ChillCalendarBundle/migrations/Version20210723074557.php | 1 - .../ChillCalendarBundle/migrations/Version20210723142003.php | 1 - .../ChillCalendarBundle/migrations/Version20210723142842.php | 1 - .../ChillCalendarBundle/migrations/Version20211119173557.php | 1 - .../ChillCalendarBundle/migrations/Version20220527124558.php | 1 - .../ChillCalendarBundle/migrations/Version20220527234046.php | 1 - src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php | 1 - .../Command/CreateFieldsOnGroupCommand.php | 1 - .../ChillCustomFieldsBundle/Controller/AdminController.php | 1 - .../ChillCustomFieldsBundle/Controller/CustomFieldController.php | 1 - .../Controller/CustomFieldsGroupController.php | 1 - .../ChillCustomFieldsBundle/CustomFields/AbstractCustomField.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php | 1 - .../CustomFields/CustomFieldInterface.php | 1 - .../CustomFields/CustomFieldLongChoice.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldText.php | 1 - .../ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php | 1 - .../ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php | 1 - .../DependencyInjection/ChillCustomFieldsExtension.php | 1 - .../DependencyInjection/Configuration.php | 1 - .../DependencyInjection/CustomFieldCompilerPass.php | 1 - src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php | 1 - .../Entity/CustomFieldLongChoice/Option.php | 1 - .../ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php | 1 - src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php | 1 - .../EntityRepository/CustomFieldLongChoice/OptionRepository.php | 1 - src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php | 1 - .../ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php | 1 - .../Form/DataTransformer/CustomFieldDataTransformer.php | 1 - .../Form/DataTransformer/CustomFieldsGroupToIdTransformer.php | 1 - .../Form/DataTransformer/JsonCustomFieldToArrayTransformer.php | 1 - .../ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php | 1 - .../Form/Extension/PostTextIntegerExtension.php | 1 - .../Form/Extension/PostTextNumberExtension.php | 1 - .../ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php | 1 - src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php | 1 - src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php | 1 - src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php | 1 - .../ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php | 1 - .../ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php | 1 - src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php | 1 - .../ChillCustomFieldsBundle/Service/CustomFieldProvider.php | 1 - .../ChillCustomFieldsBundle/Service/CustomFieldsHelper.php | 1 - .../Service/CustomFieldsHelperException.php | 1 - .../Templating/Twig/CustomFieldRenderingTwig.php | 1 - .../Templating/Twig/CustomFieldsGroupRenderingTwig.php | 1 - .../Tests/Config/ConfigCustomizablesEntitiesTest.php | 1 - .../Tests/Controller/CustomFieldControllerTest_TODO.php | 1 - .../Tests/Controller/CustomFieldsGroupControllerTest.php | 1 - .../ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php | 1 - .../Tests/CustomFields/CustomFieldsChoiceTest.php | 1 - .../Tests/CustomFields/CustomFieldsNumberTest.php | 1 - .../Tests/CustomFields/CustomFieldsTextTest.php | 1 - .../Tests/Form/Extension/PostTextIntegerExtensionTest.php | 1 - .../Tests/Form/Extension/PostTextNumberExtensionTest.php | 1 - .../ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php | 1 - .../Tests/Service/CustomFieldsHelperTest.php | 1 - .../Tests/Templating/Twig/CustomFieldRenderingTwigTest.php | 1 - .../Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php | 1 - .../ChillCustomFieldsBundle/migrations/Version20141128195430.php | 1 - .../ChillCustomFieldsBundle/migrations/Version20150224164531.php | 1 - .../ChillCustomFieldsBundle/migrations/Version20151210155904.php | 1 - .../ChillCustomFieldsBundle/migrations/Version20151210205610.php | 1 - src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php | 1 - src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php | 1 - .../ChillDocGeneratorBundle/Context/ContextManagerInterface.php | 1 - .../Context/DocGeneratorContextInterface.php | 1 - .../Context/DocGeneratorContextWithAdminFormInterface.php | 1 - .../Context/DocGeneratorContextWithPublicFormInterface.php | 1 - .../Context/Exception/ContextNotFoundException.php | 1 - .../Context/Exception/UnexpectedTypeException.php | 1 - .../Controller/AdminDocGeneratorTemplateController.php | 1 - .../Controller/DocGeneratorTemplateController.php | 1 - .../DataFixtures/ORM/LoadDocGeneratorTemplate.php | 1 - .../DependencyInjection/ChillDocGeneratorExtension.php | 1 - .../DependencyInjection/Configuration.php | 1 - .../ChillDocGeneratorBundle/Entity/DocGeneratorTemplate.php | 1 - .../ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php | 1 - .../ChillDocGeneratorBundle/GeneratorDriver/DriverInterface.php | 1 - .../GeneratorDriver/Exception/TemplateException.php | 1 - .../ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php | 1 - src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php | 1 - .../Repository/DocGeneratorTemplateRepository.php | 1 - .../ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php | 1 - .../Serializer/Helper/NormalizeNullValueHelper.php | 1 - .../Serializer/Normalizer/CollectionDocGenNormalizer.php | 1 - .../Serializer/Normalizer/DocGenObjectNormalizer.php | 1 - .../ChillDocGeneratorBundle/Service/Context/BaseContextData.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20210805162522.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20210812214310.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20211103111010.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20211119173556.php | 1 - .../ChillDocGeneratorBundle/migrations/Version20211201191757.php | 1 - .../tests/Serializer/Encoder/DocGenEncoderTest.php | 1 - .../tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php | 1 - .../tests/Service/Context/BaseContextDataTest.php | 1 - src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php | 1 - src/Bundle/ChillDocStoreBundle/Controller/AdminController.php | 1 - .../Controller/DocumentAccompanyingCourseController.php | 1 - .../Controller/DocumentCategoryController.php | 1 - .../ChillDocStoreBundle/Controller/DocumentPersonController.php | 1 - .../ChillDocStoreBundle/DataFixtures/ORM/LoadDocumentACL.php | 1 - .../DataFixtures/ORM/LoadDocumentCategory.php | 1 - .../DependencyInjection/ChillDocStoreExtension.php | 1 - .../ChillDocStoreBundle/DependencyInjection/Configuration.php | 1 - .../ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php | 1 - src/Bundle/ChillDocStoreBundle/Entity/Document.php | 1 - src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php | 1 - src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php | 1 - src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php | 1 - .../EntityRepository/AccompanyingCourseDocumentRepository.php | 1 - .../Exception/StoredObjectManagerException.php | 1 - .../ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php | 1 - src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php | 1 - src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php | 1 - src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php | 1 - src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php | 1 - .../ChillDocStoreBundle/Object/ObjectToAsyncFileTransformer.php | 1 - src/Bundle/ChillDocStoreBundle/Object/PersistenceChecker.php | 1 - .../Repository/AccompanyingCourseDocumentRepository.php | 1 - .../Repository/DocumentCategoryRepository.php | 1 - .../Repository/PersonDocumentACLAwareRepository.php | 1 - .../Repository/PersonDocumentACLAwareRepositoryInterface.php | 1 - .../ChillDocStoreBundle/Repository/StoredObjectRepository.php | 1 - .../Security/Authorization/AccompanyingCourseDocumentVoter.php | 1 - .../Security/Authorization/PersonDocumentVoter.php | 1 - .../Serializer/Normalizer/StoredObjectDenormalizer.php | 1 - src/Bundle/ChillDocStoreBundle/Service/StoredObjectManager.php | 1 - .../ChillDocStoreBundle/Service/StoredObjectManagerInterface.php | 1 - .../ChillDocStoreBundle/Templating/WopiEditTwigExtension.php | 1 - .../Templating/WopiEditTwigExtensionRuntime.php | 1 - src/Bundle/ChillDocStoreBundle/Tests/StoredObjectManagerTest.php | 1 - .../Workflow/AccompanyingCourseDocumentWorkflowHandler.php | 1 - .../ChillDocStoreBundle/migrations/Version20180605102533.php | 1 - .../ChillDocStoreBundle/migrations/Version20180606133338.php | 1 - .../ChillDocStoreBundle/migrations/Version20210903091534.php | 1 - .../ChillDocStoreBundle/migrations/Version20210903123835.php | 1 - .../ChillDocStoreBundle/migrations/Version20210928182542.php | 1 - .../ChillDocStoreBundle/migrations/Version20211119173558.php | 1 - .../ChillDocStoreBundle/migrations/Version20220131093117.php | 1 - .../ChillDocStoreBundle/migrations/Version20220525141646.php | 1 - src/Bundle/ChillEventBundle/ChillEventBundle.php | 1 - src/Bundle/ChillEventBundle/Controller/AdminController.php | 1 - src/Bundle/ChillEventBundle/Controller/EventController.php | 1 - src/Bundle/ChillEventBundle/Controller/EventTypeController.php | 1 - .../ChillEventBundle/Controller/ParticipationController.php | 1 - src/Bundle/ChillEventBundle/Controller/RoleController.php | 1 - src/Bundle/ChillEventBundle/Controller/StatusController.php | 1 - src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadEventTypes.php | 1 - .../ChillEventBundle/DataFixtures/ORM/LoadParticipation.php | 1 - src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadRolesACL.php | 1 - .../ChillEventBundle/DependencyInjection/ChillEventExtension.php | 1 - .../ChillEventBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillEventBundle/Entity/Event.php | 1 - src/Bundle/ChillEventBundle/Entity/EventType.php | 1 - src/Bundle/ChillEventBundle/Entity/Participation.php | 1 - src/Bundle/ChillEventBundle/Entity/Role.php | 1 - src/Bundle/ChillEventBundle/Entity/Status.php | 1 - .../ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php | 1 - src/Bundle/ChillEventBundle/Form/EventType.php | 1 - src/Bundle/ChillEventBundle/Form/EventTypeType.php | 1 - src/Bundle/ChillEventBundle/Form/ParticipationType.php | 1 - src/Bundle/ChillEventBundle/Form/RoleType.php | 1 - src/Bundle/ChillEventBundle/Form/StatusType.php | 1 - src/Bundle/ChillEventBundle/Form/Type/PickEventType.php | 1 - src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php | 1 - src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php | 1 - src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php | 1 - src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php | 1 - src/Bundle/ChillEventBundle/Repository/EventRepository.php | 1 - .../ChillEventBundle/Repository/ParticipationRepository.php | 1 - src/Bundle/ChillEventBundle/Search/EventSearch.php | 1 - .../ChillEventBundle/Security/Authorization/EventVoter.php | 1 - .../Security/Authorization/ParticipationVoter.php | 1 - .../ChillEventBundle/Tests/Controller/EventControllerTest.php | 1 - .../Tests/Controller/EventTypeControllerTest.php | 1 - .../Tests/Controller/ParticipationControllerTest.php | 1 - .../ChillEventBundle/Tests/Controller/RoleControllerTest.php | 1 - .../ChillEventBundle/Tests/Controller/StatusControllerTest.php | 1 - src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php | 1 - src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php | 1 - src/Bundle/ChillEventBundle/migrations/Version20160318111334.php | 1 - src/Bundle/ChillEventBundle/migrations/Version20190110140538.php | 1 - src/Bundle/ChillEventBundle/migrations/Version20190115140042.php | 1 - src/Bundle/ChillEventBundle/migrations/Version20190201143121.php | 1 - .../ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php | 1 - src/Bundle/ChillFamilyMembersBundle/Config/ConfigRepository.php | 1 - .../Controller/FamilyMemberController.php | 1 - .../DependencyInjection/ChillAMLIFamilyMembersExtension.php | 1 - .../DependencyInjection/Configuration.php | 1 - .../ChillFamilyMembersBundle/Entity/AbstractFamilyMember.php | 1 - src/Bundle/ChillFamilyMembersBundle/Entity/FamilyMember.php | 1 - src/Bundle/ChillFamilyMembersBundle/Form/FamilyMemberType.php | 1 - src/Bundle/ChillFamilyMembersBundle/Form/FamilyMembersType.php | 1 - src/Bundle/ChillFamilyMembersBundle/Menu/UserMenuBuilder.php | 1 - .../Repository/FamilyMemberRepository.php | 1 - .../Resources/migrations/Version20180522142023.php | 1 - .../Security/Voter/FamilyMemberVoter.php | 1 - src/Bundle/ChillFamilyMembersBundle/Templating/Twig.php | 1 - .../Tests/Controller/FamilyMemberControllerTest.php | 1 - .../CRUD/CompilerPass/CRUDControllerCompilerPass.php | 1 - .../ChillMainBundle/CRUD/Controller/AbstractCRUDController.php | 1 - src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php | 1 - src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php | 1 - src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php | 1 - src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php | 1 - src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php | 1 - src/Bundle/ChillMainBundle/CRUD/Templating/TwigCRUDResolver.php | 1 - src/Bundle/ChillMainBundle/Center/GroupingCenterInterface.php | 1 - src/Bundle/ChillMainBundle/ChillMainBundle.php | 1 - src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php | 1 - .../Command/ChillUserSendRenewPasswordCodeCommand.php | 1 - .../Command/LoadAddressesBEFromBestAddressCommand.php | 1 - .../ChillMainBundle/Command/LoadAddressesFRFromBANOCommand.php | 1 - .../ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php | 1 - src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php | 1 - src/Bundle/ChillMainBundle/Command/LoadPostalCodeFR.php | 1 - src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php | 1 - src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php | 1 - src/Bundle/ChillMainBundle/Controller/AddressApiController.php | 1 - .../ChillMainBundle/Controller/AddressReferenceAPIController.php | 1 - src/Bundle/ChillMainBundle/Controller/AdminController.php | 1 - src/Bundle/ChillMainBundle/Controller/CenterController.php | 1 - src/Bundle/ChillMainBundle/Controller/CivilityApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/CivilityController.php | 1 - src/Bundle/ChillMainBundle/Controller/CountryController.php | 1 - src/Bundle/ChillMainBundle/Controller/DefaultController.php | 1 - src/Bundle/ChillMainBundle/Controller/LanguageController.php | 1 - src/Bundle/ChillMainBundle/Controller/LocationApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/LocationController.php | 1 - .../ChillMainBundle/Controller/LocationTypeApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/LocationTypeController.php | 1 - src/Bundle/ChillMainBundle/Controller/LoginController.php | 1 - src/Bundle/ChillMainBundle/Controller/MenuController.php | 1 - .../ChillMainBundle/Controller/NotificationApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/NotificationController.php | 1 - src/Bundle/ChillMainBundle/Controller/PasswordController.php | 1 - .../ChillMainBundle/Controller/PermissionApiController.php | 1 - .../ChillMainBundle/Controller/PermissionsGroupController.php | 1 - .../ChillMainBundle/Controller/PostalCodeAPIController.php | 1 - src/Bundle/ChillMainBundle/Controller/PostalCodeController.php | 1 - src/Bundle/ChillMainBundle/Controller/ScopeController.php | 1 - src/Bundle/ChillMainBundle/Controller/SearchController.php | 1 - .../ChillMainBundle/Controller/TimelineCenterController.php | 1 - src/Bundle/ChillMainBundle/Controller/UIController.php | 1 - src/Bundle/ChillMainBundle/Controller/UserApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/UserController.php | 1 - src/Bundle/ChillMainBundle/Controller/UserJobApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/UserJobController.php | 1 - src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php | 1 - src/Bundle/ChillMainBundle/Controller/WorkflowController.php | 1 - .../DataFixtures/ORM/LoadAbstractNotificationsTrait.php | 1 - .../ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCenters.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCivility.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadGroupCenters.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php | 1 - .../ChillMainBundle/DataFixtures/ORM/LoadPermissionsGroup.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadRoleScopes.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadScopes.php | 1 - src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php | 1 - .../ChillMainBundle/DependencyInjection/ChillMainExtension.php | 1 - .../DependencyInjection/CompilerPass/ACLFlagsCompilerPass.php | 1 - .../DependencyInjection/CompilerPass/ExportsCompilerPass.php | 1 - .../CompilerPass/GroupingCenterCompilerPass.php | 1 - .../DependencyInjection/CompilerPass/MenuCompilerPass.php | 1 - .../CompilerPass/NotificationCounterCompilerPass.php | 1 - .../CompilerPass/SearchableServicesCompilerPass.php | 1 - .../DependencyInjection/CompilerPass/TimelineCompilerClass.php | 1 - .../DependencyInjection/CompilerPass/WidgetsCompilerPass.php | 1 - .../DependencyInjection/ConfigConsistencyCompilerPass.php | 1 - src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php | 1 - .../DependencyInjection/MissingBundleException.php | 1 - .../DependencyInjection/RoleProvidersCompilerPass.php | 1 - .../DependencyInjection/Widget/AbstractWidgetsCompilerPass.php | 1 - .../DependencyInjection/Widget/AddWidgetConfigurationTrait.php | 1 - .../DependencyInjection/Widget/Factory/AbstractWidgetFactory.php | 1 - .../Widget/Factory/WidgetFactoryInterface.php | 1 - .../Widget/HasWidgetFactoriesExtensionInterface.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbArrayLength.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/OverlapsI.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/Replace.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php | 1 - .../ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php | 1 - src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php | 1 - .../Doctrine/Event/TrackCreateUpdateSubscriber.php | 1 - .../ChillMainBundle/Doctrine/Migrations/VersionComparator.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Model/Point.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Model/PointException.php | 1 - .../ChillMainBundle/Doctrine/Model/TrackCreationInterface.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Model/TrackCreationTrait.php | 1 - .../ChillMainBundle/Doctrine/Model/TrackUpdateInterface.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Model/TrackUpdateTrait.php | 1 - .../Doctrine/ORM/Hydration/FlatHierarchyEntityHydrator.php | 1 - .../ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php | 1 - src/Bundle/ChillMainBundle/Doctrine/Type/PointType.php | 1 - src/Bundle/ChillMainBundle/Entity/Address.php | 1 - src/Bundle/ChillMainBundle/Entity/AddressReference.php | 1 - src/Bundle/ChillMainBundle/Entity/Center.php | 1 - src/Bundle/ChillMainBundle/Entity/Civility.php | 1 - src/Bundle/ChillMainBundle/Entity/Country.php | 1 - .../ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php | 1 - .../Entity/Embeddable/PrivateCommentEmbeddable.php | 1 - src/Bundle/ChillMainBundle/Entity/GroupCenter.php | 1 - src/Bundle/ChillMainBundle/Entity/HasCenterInterface.php | 1 - src/Bundle/ChillMainBundle/Entity/HasCentersInterface.php | 1 - src/Bundle/ChillMainBundle/Entity/HasScopeInterface.php | 1 - src/Bundle/ChillMainBundle/Entity/HasScopesInterface.php | 1 - src/Bundle/ChillMainBundle/Entity/Language.php | 1 - src/Bundle/ChillMainBundle/Entity/Location.php | 1 - src/Bundle/ChillMainBundle/Entity/LocationType.php | 1 - src/Bundle/ChillMainBundle/Entity/Notification.php | 1 - src/Bundle/ChillMainBundle/Entity/NotificationComment.php | 1 - src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php | 1 - src/Bundle/ChillMainBundle/Entity/PostalCode.php | 1 - src/Bundle/ChillMainBundle/Entity/RoleScope.php | 1 - src/Bundle/ChillMainBundle/Entity/Scope.php | 1 - src/Bundle/ChillMainBundle/Entity/User.php | 1 - src/Bundle/ChillMainBundle/Entity/UserJob.php | 1 - src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php | 1 - .../ChillMainBundle/Entity/Workflow/EntityWorkflowComment.php | 1 - .../ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php | 1 - src/Bundle/ChillMainBundle/Export/AggregatorInterface.php | 1 - src/Bundle/ChillMainBundle/Export/DirectExportInterface.php | 1 - src/Bundle/ChillMainBundle/Export/ExportElementInterface.php | 1 - .../ChillMainBundle/Export/ExportElementValidatedInterface.php | 1 - .../ChillMainBundle/Export/ExportElementsProviderInterface.php | 1 - src/Bundle/ChillMainBundle/Export/FilterInterface.php | 1 - src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php | 1 - src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php | 1 - .../ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php | 1 - .../Export/Formatter/SpreadsheetListFormatter.php | 1 - src/Bundle/ChillMainBundle/Export/FormatterInterface.php | 1 - src/Bundle/ChillMainBundle/Export/GroupedExportInterface.php | 1 - src/Bundle/ChillMainBundle/Export/ListInterface.php | 1 - src/Bundle/ChillMainBundle/Form/AdvancedSearchType.php | 1 - src/Bundle/ChillMainBundle/Form/CenterType.php | 1 - .../ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php | 1 - src/Bundle/ChillMainBundle/Form/CivilityType.php | 1 - src/Bundle/ChillMainBundle/Form/CountryType.php | 1 - src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php | 1 - .../ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php | 1 - .../ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php | 1 - src/Bundle/ChillMainBundle/Form/EntityWorkflowCommentType.php | 1 - src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php | 1 - src/Bundle/ChillMainBundle/Form/LanguageType.php | 1 - src/Bundle/ChillMainBundle/Form/LocationFormType.php | 1 - src/Bundle/ChillMainBundle/Form/LocationTypeType.php | 1 - src/Bundle/ChillMainBundle/Form/NotificationCommentType.php | 1 - src/Bundle/ChillMainBundle/Form/NotificationType.php | 1 - src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php | 1 - src/Bundle/ChillMainBundle/Form/ScopeType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/AddressDateType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/AddressType.php | 1 - .../ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/CommentType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php | 1 - .../Form/Type/DataTransformer/AddressToIdDataTransformer.php | 1 - .../Form/Type/DataTransformer/CenterTransformer.php | 1 - .../Form/Type/DataTransformer/DateIntervalTransformer.php | 1 - .../Form/Type/DataTransformer/EntityToJsonTransformer.php | 1 - .../Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php | 1 - .../Form/Type/DataTransformer/ObjectToIdTransformer.php | 1 - .../Form/Type/DataTransformer/ScopeTransformer.php | 1 - src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php | 1 - .../ChillMainBundle/Form/Type/Export/PickFormatterType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php | 1 - .../ChillMainBundle/Form/Type/TranslatableStringFormType.php | 1 - src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php | 1 - src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php | 1 - src/Bundle/ChillMainBundle/Form/UserJobType.php | 1 - src/Bundle/ChillMainBundle/Form/UserPasswordType.php | 1 - src/Bundle/ChillMainBundle/Form/UserType.php | 1 - .../ChillMainBundle/Form/Utils/PermissionsGroupFlagProvider.php | 1 - src/Bundle/ChillMainBundle/Form/WorkflowStepType.php | 1 - src/Bundle/ChillMainBundle/Form/WorkflowTransitionType.php | 1 - .../Notification/Counter/NotificationByUserCounter.php | 1 - .../ChillMainBundle/Notification/Email/NotificationMailer.php | 1 - .../PersistNotificationOnTerminateEventSubscriber.php | 1 - .../Notification/Exception/NotificationHandlerNotFound.php | 1 - src/Bundle/ChillMainBundle/Notification/Mailer.php | 1 - .../Notification/NotificationHandlerInterface.php | 1 - .../ChillMainBundle/Notification/NotificationHandlerManager.php | 1 - .../ChillMainBundle/Notification/NotificationPersister.php | 1 - .../Notification/NotificationPersisterInterface.php | 1 - src/Bundle/ChillMainBundle/Notification/NotificationPresence.php | 1 - .../Notification/Templating/NotificationTwigExtension.php | 1 - .../Notification/Templating/NotificationTwigExtensionRuntime.php | 1 - src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php | 1 - src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php | 1 - src/Bundle/ChillMainBundle/Pagination/Page.php | 1 - src/Bundle/ChillMainBundle/Pagination/PageGenerator.php | 1 - src/Bundle/ChillMainBundle/Pagination/PageInterface.php | 1 - src/Bundle/ChillMainBundle/Pagination/Paginator.php | 1 - src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php | 1 - src/Bundle/ChillMainBundle/Pagination/PaginatorInterface.php | 1 - .../ChillMainBundle/Phonenumber/PhoneNumberHelperInterface.php | 1 - src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php | 1 - src/Bundle/ChillMainBundle/Phonenumber/Templating.php | 1 - src/Bundle/ChillMainBundle/Redis/ChillRedis.php | 1 - src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php | 1 - .../ChillMainBundle/Repository/AddressReferenceRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/AddressRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/CivilityRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/CountryRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/GroupCenterRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/LanguageRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/LocationRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/LocationTypeRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/NotificationRepository.php | 1 - .../ChillMainBundle/Repository/PermissionsGroupRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/RoleScopeRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php | 1 - .../Repository/UserACLAwareRepositoryInterface.php | 1 - src/Bundle/ChillMainBundle/Repository/UserJobRepository.php | 1 - src/Bundle/ChillMainBundle/Repository/UserRepository.php | 1 - .../Repository/Workflow/EntityWorkflowRepository.php | 1 - .../Repository/Workflow/EntityWorkflowStepRepository.php | 1 - src/Bundle/ChillMainBundle/Routing/Loader/ChillRoutesLoader.php | 1 - src/Bundle/ChillMainBundle/Routing/LocalMenuBuilderInterface.php | 1 - .../Routing/MenuBuilder/AdminLanguageMenuBuilder.php | 1 - .../Routing/MenuBuilder/AdminLocationMenuBuilder.php | 1 - .../ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php | 1 - .../ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php | 1 - .../ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php | 1 - src/Bundle/ChillMainBundle/Routing/MenuComposer.php | 1 - src/Bundle/ChillMainBundle/Routing/MenuTwig.php | 1 - src/Bundle/ChillMainBundle/Search/AbstractSearch.php | 1 - .../ChillMainBundle/Search/Entity/SearchUserApiProvider.php | 1 - .../ChillMainBundle/Search/HasAdvancedSearchFormInterface.php | 1 - src/Bundle/ChillMainBundle/Search/Model/Result.php | 1 - src/Bundle/ChillMainBundle/Search/ParsingException.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApi.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApiInterface.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApiQuery.php | 1 - src/Bundle/ChillMainBundle/Search/SearchApiResult.php | 1 - src/Bundle/ChillMainBundle/Search/SearchInterface.php | 1 - src/Bundle/ChillMainBundle/Search/SearchProvider.php | 1 - .../ChillMainBundle/Search/UnknowSearchDomainException.php | 1 - src/Bundle/ChillMainBundle/Search/UnknowSearchNameException.php | 1 - .../ChillMainBundle/Search/Utils/ExtractDateFromPattern.php | 1 - .../Search/Utils/ExtractPhonenumberFromPattern.php | 1 - .../ChillMainBundle/Search/Utils/SearchExtractionResult.php | 1 - .../Security/Authorization/AbstractChillVoter.php | 1 - .../Security/Authorization/AuthorizationHelper.php | 1 - .../Security/Authorization/AuthorizationHelperInterface.php | 1 - .../Security/Authorization/ChillVoterInterface.php | 1 - .../Security/Authorization/DefaultVoterHelper.php | 1 - .../Security/Authorization/DefaultVoterHelperFactory.php | 1 - .../Security/Authorization/DefaultVoterHelperGenerator.php | 1 - .../Security/Authorization/EntityWorkflowVoter.php | 1 - .../ChillMainBundle/Security/Authorization/NotificationVoter.php | 1 - .../Security/Authorization/VoterGeneratorInterface.php | 1 - .../Security/Authorization/VoterHelperFactoryInterface.php | 1 - .../Security/Authorization/VoterHelperInterface.php | 1 - .../Security/Authorization/WorkflowEntityDeletionVoter.php | 1 - src/Bundle/ChillMainBundle/Security/ParentRoleHelper.php | 1 - .../Security/PasswordRecover/PasswordRecoverEvent.php | 1 - .../Security/PasswordRecover/PasswordRecoverEventSubscriber.php | 1 - .../Security/PasswordRecover/PasswordRecoverLocker.php | 1 - .../Security/PasswordRecover/PasswordRecoverVoter.php | 1 - .../Security/PasswordRecover/RecoverPasswordHelper.php | 1 - .../ChillMainBundle/Security/PasswordRecover/TokenManager.php | 1 - .../ChillMainBundle/Security/ProvideRoleHierarchyInterface.php | 1 - src/Bundle/ChillMainBundle/Security/ProvideRoleInterface.php | 1 - .../Security/Resolver/CenterResolverDispatcher.php | 1 - .../Security/Resolver/CenterResolverDispatcherInterface.php | 1 - .../Security/Resolver/CenterResolverInterface.php | 1 - .../ChillMainBundle/Security/Resolver/CenterResolverManager.php | 1 - .../Security/Resolver/CenterResolverManagerInterface.php | 1 - .../ChillMainBundle/Security/Resolver/DefaultCenterResolver.php | 1 - .../ChillMainBundle/Security/Resolver/DefaultScopeResolver.php | 1 - .../ChillMainBundle/Security/Resolver/ResolverTwigExtension.php | 1 - .../Security/Resolver/ScopeResolverDispatcher.php | 1 - .../ChillMainBundle/Security/Resolver/ScopeResolverInterface.php | 1 - src/Bundle/ChillMainBundle/Security/RoleProvider.php | 1 - .../ChillMainBundle/Security/UserProvider/UserProvider.php | 1 - src/Bundle/ChillMainBundle/Serializer/Model/Collection.php | 1 - src/Bundle/ChillMainBundle/Serializer/Model/Counter.php | 1 - .../ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php | 1 - .../ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php | 1 - .../Serializer/Normalizer/CollectionNormalizer.php | 1 - .../Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php | 1 - .../ChillMainBundle/Serializer/Normalizer/DateNormalizer.php | 1 - .../Serializer/Normalizer/DiscriminatedObjectDenormalizer.php | 1 - .../Serializer/Normalizer/DoctrineExistingEntityNormalizer.php | 1 - .../Serializer/Normalizer/EntityWorkflowNormalizer.php | 1 - .../Serializer/Normalizer/EntityWorkflowStepNormalizer.php | 1 - .../Serializer/Normalizer/NotificationNormalizer.php | 1 - .../Serializer/Normalizer/PhonenumberNormalizer.php | 1 - .../ChillMainBundle/Serializer/Normalizer/PointNormalizer.php | 1 - .../Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php | 1 - .../ChillMainBundle/Serializer/Normalizer/UserNormalizer.php | 1 - .../Service/Import/AddressReferenceBEFromBestAddress.php | 1 - .../Service/Import/AddressReferenceBaseImporter.php | 1 - .../ChillMainBundle/Service/Import/AddressReferenceFromBano.php | 1 - .../Service/Import/PostalCodeBEFromBestAddress.php | 1 - .../ChillMainBundle/Service/Import/PostalCodeBaseImporter.php | 1 - .../ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php | 1 - src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php | 1 - src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php | 1 - .../ChillMainBundle/Templating/ChillMarkdownRenderExtension.php | 1 - src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php | 1 - src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php | 1 - .../Templating/Entity/AbstractChillEntityRender.php | 1 - src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php | 1 - .../ChillMainBundle/Templating/Entity/ChillEntityRender.php | 1 - .../Templating/Entity/ChillEntityRenderExtension.php | 1 - .../Templating/Entity/ChillEntityRenderInterface.php | 1 - src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php | 1 - src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php | 1 - .../Templating/Events/DelegatedBlockRenderingEvent.php | 1 - .../ChillMainBundle/Templating/Listing/FilterOrderHelper.php | 1 - .../Templating/Listing/FilterOrderHelperBuilder.php | 1 - .../Templating/Listing/FilterOrderHelperFactory.php | 1 - .../Templating/Listing/FilterOrderHelperFactoryInterface.php | 1 - src/Bundle/ChillMainBundle/Templating/Listing/Templating.php | 1 - .../ChillMainBundle/Templating/TranslatableStringHelper.php | 1 - .../Templating/TranslatableStringHelperInterface.php | 1 - src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php | 1 - .../ChillMainBundle/Templating/UI/CountNotificationUser.php | 1 - .../Templating/UI/NotificationCounterInterface.php | 1 - src/Bundle/ChillMainBundle/Templating/Widget/WidgetInterface.php | 1 - .../ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php | 1 - .../ChillMainBundle/Test/Export/AbstractAggregatorTest.php | 1 - src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php | 1 - src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareCenterTrait.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareCircleTrait.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareClientTrait.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareScopeTrait.php | 1 - src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php | 1 - .../ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php | 1 - .../ChillMainBundle/Tests/Controller/AddressControllerTest.php | 1 - .../Tests/Controller/AddressReferenceApiControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/CenterControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/ExportControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/LoginControllerTest.php | 1 - .../Tests/Controller/NotificationApiControllerTest.php | 1 - .../Tests/Controller/PermissionApiControllerTest.php | 1 - .../Tests/Controller/PermissionsGroupControllerTest.php | 1 - .../Tests/Controller/PostalCodeApiControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/ScopeControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/SearchApiControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/SearchControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/UserApiControllerTest.php | 1 - .../ChillMainBundle/Tests/Controller/UserControllerTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php | 1 - .../ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php | 1 - .../ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php | 1 - .../PersistNotificationOnTerminateEventSubscriberTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php | 1 - .../ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php | 1 - .../ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php | 1 - .../Tests/Search/Utils/ExtractDateFromPatternTest.php | 1 - .../Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php | 1 - .../Tests/Security/Authorization/AuthorizationHelperTest.php | 1 - .../Tests/Security/PasswordRecover/TokenManagerTest.php | 1 - .../Tests/Security/Resolver/CenterResolverDispatcherTest.php | 1 - .../Tests/Security/Resolver/DefaultScopeResolverTest.php | 1 - .../Tests/Security/Resolver/ScopeResolverDispatcherTest.php | 1 - .../Tests/Serializer/Normalizer/DateNormalizerTest.php | 1 - .../Normalizer/DoctrineExistingEntityNormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php | 1 - .../Tests/Services/Import/AddressReferenceBaseImporterTest.php | 1 - .../Tests/Services/Import/PostalCodeBaseImporterTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php | 1 - .../Tests/Templating/ChillMarkdownRenderExtensionTest.php | 1 - .../Tests/Templating/Entity/AddressRenderTest.php | 1 - src/Bundle/ChillMainBundle/Tests/TestHelper.php | 1 - src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php | 1 - src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php | 1 - .../Workflow/EventSubscriber/NotificationOnTransitionTest.php | 1 - src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php | 1 - .../ChillMainBundle/Timeline/TimelineProviderInterface.php | 1 - src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php | 1 - src/Bundle/ChillMainBundle/Util/CountriesInfo.php | 1 - src/Bundle/ChillMainBundle/Util/DateRangeCovering.php | 1 - .../Validation/Constraint/PhonenumberConstraint.php | 1 - .../Validation/Constraint/RoleScopeScopePresenceConstraint.php | 1 - .../Constraint/UserUniqueEmailAndUsernameConstraint.php | 1 - .../Validation/Validator/RoleScopeScopePresence.php | 1 - .../Validation/Validator/UserUniqueEmailAndUsername.php | 1 - .../ChillMainBundle/Validation/Validator/ValidPhonenumber.php | 1 - .../Validator/Constraints/Entity/UserCircleConsistency.php | 1 - .../Constraints/Entity/UserCircleConsistencyValidator.php | 1 - .../Validator/Constraints/Export/ExportElementConstraint.php | 1 - .../Constraints/Export/ExportElementConstraintValidator.php | 1 - .../ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php | 1 - .../ChillMainBundle/Workflow/EntityWorkflowHandlerInterface.php | 1 - src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php | 1 - .../EventSubscriber/EntityWorkflowTransitionEventSubscriber.php | 1 - .../Workflow/EventSubscriber/NotificationOnTransition.php | 1 - .../Workflow/EventSubscriber/SendAccessKeyEventSubscriber.php | 1 - .../Workflow/Exception/HandlerNotFoundException.php | 1 - src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php | 1 - .../Workflow/Notification/WorkflowNotificationHandler.php | 1 - .../Workflow/RelatedEntityWorkflowSupportsStrategy.php | 1 - .../Workflow/Templating/WorkflowTwigExtension.php | 1 - .../Workflow/Templating/WorkflowTwigExtensionRuntime.php | 1 - .../Workflow/Validator/EntityWorkflowCreation.php | 1 - .../Workflow/Validator/EntityWorkflowCreationValidator.php | 1 - src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValid.php | 1 - .../Workflow/Validator/StepDestValidValidator.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20100000000000.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20141128194409.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20150821105642.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20150821122935.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20160310122322.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20180703191509.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20180709181423.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20180905101426.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20180911093642.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20200422122715.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210304085819.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210308111926.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210414091001.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210420115006.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210503085107.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210505153727.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210525144016.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210528090000.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210610140248.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210616134328.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210903144853.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20210929192242.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211006151653.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211007150019.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211012141336.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211013124455.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211015084653.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211022094429.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211116162847.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211119173554.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211123093355.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211125142016.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211125142017.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211213112628.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211216213649.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211225231532.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211228183221.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211228215919.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211229140308.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20211230003532.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220112123436.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220112150413.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220112161136.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220114132105.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220114165950.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220120155303.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220124085957.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220125134253.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220128211748.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220217133607.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220223171457.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220302132728.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220325134944.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220413154743.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220413225830.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220413230159.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220506131307.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220506145935.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220513151853.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220516085659.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220711150006.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220729205416.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220730204216.php | 1 - src/Bundle/ChillMainBundle/migrations/Version20220829132409.php | 1 - .../Events/PersonAddressMoveEventSubscriber.php | 1 - .../AccompanyingPeriod/Events/UserRefEventSubscriber.php | 1 - .../AccompanyingPeriodLinkedWithSocialIssuesEntityInterface.php | 1 - .../AccompanyingPeriodSocialIssueConsistencyEntityListener.php | 1 - .../AccompanyingPeriod/Suggestion/ReferralsSuggestion.php | 1 - .../Suggestion/ReferralsSuggestionInterface.php | 1 - src/Bundle/ChillPersonBundle/Actions/ActionEvent.php | 1 - src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php | 1 - .../CRUD/Controller/EntityPersonCRUDController.php | 1 - .../CRUD/Controller/OneToOneEntityPersonCRUDController.php | 1 - src/Bundle/ChillPersonBundle/ChillPersonBundle.php | 1 - src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php | 1 - .../ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php | 1 - .../ChillPersonBundle/Command/ImportSocialWorkMetadata.php | 1 - .../Command/RemoveOldDraftAccompanyingPeriodCommand.php | 1 - .../ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php | 1 - .../Controller/AccompanyingCourseApiController.php | 1 - .../Controller/AccompanyingCourseCommentController.php | 1 - .../Controller/AccompanyingCourseController.php | 1 - .../Controller/AccompanyingCourseWorkApiController.php | 1 - .../Controller/AccompanyingCourseWorkController.php | 1 - .../Controller/AccompanyingPeriodController.php | 1 - .../Controller/AccompanyingPeriodRegulationListController.php | 1 - .../Controller/AccompanyingPeriodWorkEvaluationApiController.php | 1 - src/Bundle/ChillPersonBundle/Controller/AdminController.php | 1 - .../ChillPersonBundle/Controller/ClosingMotiveController.php | 1 - .../ChillPersonBundle/Controller/HouseholdApiController.php | 1 - .../Controller/HouseholdCompositionController.php | 1 - .../Controller/HouseholdCompositionTypeApiController.php | 1 - .../Controller/HouseholdCompositionTypeController.php | 1 - src/Bundle/ChillPersonBundle/Controller/HouseholdController.php | 1 - .../ChillPersonBundle/Controller/HouseholdMemberController.php | 1 - .../ChillPersonBundle/Controller/HouseholdPositionController.php | 1 - .../ChillPersonBundle/Controller/MaritalStatusController.php | 1 - src/Bundle/ChillPersonBundle/Controller/OpeningApiController.php | 1 - src/Bundle/ChillPersonBundle/Controller/OriginController.php | 1 - .../ChillPersonBundle/Controller/PersonAddressController.php | 1 - src/Bundle/ChillPersonBundle/Controller/PersonApiController.php | 1 - src/Bundle/ChillPersonBundle/Controller/PersonController.php | 1 - .../ChillPersonBundle/Controller/PersonDuplicateController.php | 1 - .../ChillPersonBundle/Controller/PersonResourceController.php | 1 - .../Controller/PersonResourceKindController.php | 1 - .../Controller/ReassignAccompanyingPeriodController.php | 1 - src/Bundle/ChillPersonBundle/Controller/RelationController.php | 1 - .../ChillPersonBundle/Controller/RelationshipApiController.php | 1 - .../Controller/ResidentialAddressController.php | 1 - .../ChillPersonBundle/Controller/SocialIssueApiController.php | 1 - .../Controller/SocialWork/EvaluationController.php | 1 - .../ChillPersonBundle/Controller/SocialWork/GoalController.php | 1 - .../ChillPersonBundle/Controller/SocialWork/ResultController.php | 1 - .../Controller/SocialWork/SocialActionController.php | 1 - .../Controller/SocialWork/SocialIssueController.php | 1 - .../Controller/SocialWorkEvaluationApiController.php | 1 - .../ChillPersonBundle/Controller/SocialWorkGoalApiController.php | 1 - .../Controller/SocialWorkResultApiController.php | 1 - .../Controller/SocialWorkSocialActionApiController.php | 1 - .../ChillPersonBundle/Controller/TimelinePersonController.php | 1 - .../Controller/UserAccompanyingPeriodController.php | 1 - .../ChillPersonBundle/DataFixtures/Helper/PersonRandomHelper.php | 1 - .../DataFixtures/Helper/RandomPersonHelperTrait.php | 1 - .../DataFixtures/ORM/LoadAccompanyingPeriodClosingMotive.php | 1 - .../DataFixtures/ORM/LoadAccompanyingPeriodNotifications.php | 1 - .../DataFixtures/ORM/LoadAccompanyingPeriodOrigin.php | 1 - .../DataFixtures/ORM/LoadAccompanyingPeriodWork.php | 1 - .../ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php | 1 - src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHousehold.php | 1 - .../DataFixtures/ORM/LoadHouseholdCompositionType.php | 1 - .../ChillPersonBundle/DataFixtures/ORM/LoadHouseholdPosition.php | 1 - .../ChillPersonBundle/DataFixtures/ORM/LoadMaritalStatus.php | 1 - src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php | 1 - src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPersonACL.php | 1 - src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelations.php | 1 - .../ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php | 1 - .../DataFixtures/ORM/LoadSocialWorkMetadata.php | 1 - .../DependencyInjection/ChillPersonExtension.php | 1 - .../CompilerPass/AccompanyingPeriodTimelineCompilerPass.php | 1 - .../ChillPersonBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartAddressId.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartCountryCode.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartCountryId.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartCountryName.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartIsNoAddress.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartPostCodeCode.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartPostCodeId.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartPostCodeLabel.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartStreetAddress1.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartStreetAddress2.php | 1 - .../Doctrine/DQL/AddressPart/AddressPartValidFrom.php | 1 - src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodLocationHistory.php | 1 - .../Entity/AccompanyingPeriod/AccompanyingPeriodWork.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php | 1 - .../AccompanyingPeriodWorkEvaluationDocument.php | 1 - .../Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php | 1 - .../Entity/AccompanyingPeriod/ClosingMotive.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriod/Comment.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriod/Origin.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php | 1 - .../ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php | 1 - src/Bundle/ChillPersonBundle/Entity/HasPerson.php | 1 - src/Bundle/ChillPersonBundle/Entity/Household/Household.php | 1 - .../ChillPersonBundle/Entity/Household/HouseholdComposition.php | 1 - .../Entity/Household/HouseholdCompositionType.php | 1 - .../ChillPersonBundle/Entity/Household/HouseholdMember.php | 1 - .../Entity/Household/PersonHouseholdAddress.php | 1 - src/Bundle/ChillPersonBundle/Entity/Household/Position.php | 1 - src/Bundle/ChillPersonBundle/Entity/MaritalStatus.php | 1 - .../ChillPersonBundle/Entity/Person/PersonCurrentAddress.php | 1 - src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php | 1 - .../ChillPersonBundle/Entity/Person/PersonResourceKind.php | 1 - .../ChillPersonBundle/Entity/Person/ResidentialAddress.php | 1 - src/Bundle/ChillPersonBundle/Entity/PersonAltName.php | 1 - src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php | 1 - src/Bundle/ChillPersonBundle/Entity/PersonPhone.php | 1 - src/Bundle/ChillPersonBundle/Entity/Relationships/Relation.php | 1 - .../ChillPersonBundle/Entity/Relationships/Relationship.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/Goal.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/Result.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php | 1 - src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php | 1 - .../ChillPersonBundle/Event/Person/PersonAddressMoveEvent.php | 1 - .../EventListener/AccompanyingPeriodWorkEventListener.php | 1 - .../ChillPersonBundle/EventListener/PersonEventListener.php | 1 - src/Bundle/ChillPersonBundle/Export/Declarations.php | 1 - .../ChillPersonBundle/Form/AccompanyingCourseCommentType.php | 1 - src/Bundle/ChillPersonBundle/Form/AccompanyingCourseType.php | 1 - src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php | 1 - .../ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php | 1 - src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php | 1 - src/Bundle/ChillPersonBundle/Form/CreationPersonType.php | 1 - .../Form/DataMapper/PersonAltNameDataMapper.php | 1 - .../Form/DataTransformer/PersonToIdTransformer.php | 1 - src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php | 1 - .../ChillPersonBundle/Form/HouseholdCompositionTypeType.php | 1 - src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php | 1 - src/Bundle/ChillPersonBundle/Form/HouseholdPositionType.php | 1 - src/Bundle/ChillPersonBundle/Form/HouseholdType.php | 1 - src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php | 1 - src/Bundle/ChillPersonBundle/Form/OriginType.php | 1 - src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php | 1 - .../ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php | 1 - src/Bundle/ChillPersonBundle/Form/PersonResourceKindType.php | 1 - src/Bundle/ChillPersonBundle/Form/PersonResourceType.php | 1 - src/Bundle/ChillPersonBundle/Form/PersonType.php | 1 - src/Bundle/ChillPersonBundle/Form/RelationType.php | 1 - src/Bundle/ChillPersonBundle/Form/ResidentialAddressType.php | 1 - src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php | 1 - src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php | 1 - src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php | 1 - .../ChillPersonBundle/Form/SocialWork/SocialActionType.php | 1 - src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php | 1 - .../ChillPersonBundle/Form/Type/ClosingMotivePickerType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/GenderType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php | 1 - src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php | 1 - .../ChillPersonBundle/Form/Type/Select2MaritalStatusType.php | 1 - src/Bundle/ChillPersonBundle/Household/MembersEditor.php | 1 - src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php | 1 - .../ChillPersonBundle/Menu/AccompanyingCourseMenuBuilder.php | 1 - .../Menu/AdminAccompanyingCourseMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/HouseholdMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/PersonMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php | 1 - src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php | 1 - .../Notification/AccompanyingPeriodNotificationHandler.php | 1 - .../ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php | 1 - src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php | 1 - src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php | 1 - .../AccompanyingPeriodWorkEvaluationDocumentRepository.php | 1 - .../AccompanyingPeriodWorkEvaluationRepository.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodWorkGoalRepository.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodWorkRepository.php | 1 - .../Repository/AccompanyingPeriod/CommentRepository.php | 1 - .../Repository/AccompanyingPeriod/OriginRepository.php | 1 - .../Repository/AccompanyingPeriod/ResourceRepository.php | 1 - .../Repository/AccompanyingPeriodACLAwareRepository.php | 1 - .../Repository/AccompanyingPeriodACLAwareRepositoryInterface.php | 1 - .../Repository/AccompanyingPeriodParticipationRepository.php | 1 - .../Repository/AccompanyingPeriodRepository.php | 1 - .../Repository/Household/HouseholdACLAwareRepository.php | 1 - .../Household/HouseholdACLAwareRepositoryInterface.php | 1 - .../Repository/Household/HouseholdCompositionRepository.php | 1 - .../Repository/Household/HouseholdCompositionTypeRepository.php | 1 - .../Repository/Household/HouseholdMembersRepository.php | 1 - .../Repository/Household/HouseholdRepository.php | 1 - .../Repository/Household/PersonHouseholdAddressRepository.php | 1 - .../Repository/Household/PositionRepository.php | 1 - .../ChillPersonBundle/Repository/MaritalStatusRepository.php | 1 - .../Repository/PersonACLAwareRepositoryInterface.php | 1 - .../ChillPersonBundle/Repository/PersonAltNameRepository.php | 1 - .../Repository/PersonNotDuplicateRepository.php | 1 - src/Bundle/ChillPersonBundle/Repository/PersonRepository.php | 1 - .../ChillPersonBundle/Repository/PersonResourceRepository.php | 1 - .../Repository/Relationships/RelationRepository.php | 1 - .../Repository/Relationships/RelationshipRepository.php | 1 - .../Repository/ResidentialAddressRepository.php | 1 - .../Repository/SocialWork/EvaluationRepository.php | 1 - .../ChillPersonBundle/Repository/SocialWork/GoalRepository.php | 1 - .../ChillPersonBundle/Repository/SocialWork/ResultRepository.php | 1 - .../Repository/SocialWork/SocialActionRepository.php | 1 - .../Repository/SocialWork/SocialIssueRepository.php | 1 - src/Bundle/ChillPersonBundle/Search/PersonSearch.php | 1 - .../ChillPersonBundle/Search/SearchHouseholdApiProvider.php | 1 - src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php | 1 - src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php | 1 - .../Security/Authorization/AccompanyingPeriodCommentVoter.php | 1 - .../Security/Authorization/AccompanyingPeriodResourceVoter.php | 1 - .../AccompanyingPeriodWorkEvaluationDocumentVoter.php | 1 - .../Authorization/AccompanyingPeriodWorkEvaluationVoter.php | 1 - .../Security/Authorization/AccompanyingPeriodWorkVoter.php | 1 - .../ChillPersonBundle/Security/Authorization/PersonVoter.php | 1 - .../Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php | 1 - .../Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php | 1 - .../Normalizer/AccompanyingPeriodParticipationNormalizer.php | 1 - .../Normalizer/AccompanyingPeriodResourceNormalizer.php | 1 - .../Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php | 1 - .../Normalizer/AccompanyingPeriodWorkEvaluationDenormalizer.php | 1 - .../AccompanyingPeriodWorkEvaluationDocumentNormalizer.php | 1 - .../Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php | 1 - .../Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php | 1 - .../Serializer/Normalizer/MembersEditorNormalizer.php | 1 - .../Serializer/Normalizer/PersonDocGenNormalizer.php | 1 - .../Serializer/Normalizer/PersonJsonNormalizer.php | 1 - .../Serializer/Normalizer/PersonJsonNormalizerInterface.php | 1 - .../Serializer/Normalizer/RelationshipDocGenNormalizer.php | 1 - .../Serializer/Normalizer/SocialActionNormalizer.php | 1 - .../Serializer/Normalizer/SocialIssueNormalizer.php | 1 - .../Serializer/Normalizer/WorkflowNormalizer.php | 1 - .../AccompanyingPeriod/OldDraftAccompanyingPeriodRemover.php | 1 - .../OldDraftAccompanyingPeriodRemoverInterface.php | 1 - .../Service/DocGenerator/AccompanyingPeriodContext.php | 1 - .../Service/DocGenerator/AccompanyingPeriodWorkContext.php | 1 - .../DocGenerator/AccompanyingPeriodWorkEvaluationContext.php | 1 - .../ChillPersonBundle/Service/DocGenerator/PersonContext.php | 1 - src/Bundle/ChillPersonBundle/Service/Import/ChillImporter.php | 1 - .../ChillPersonBundle/Service/Import/SocialWorkMetadata.php | 1 - .../Service/Import/SocialWorkMetadataInterface.php | 1 - .../ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php | 1 - src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php | 1 - .../Templating/Entity/PersonRenderInterface.php | 1 - .../ChillPersonBundle/Templating/Entity/ResourceKindRender.php | 1 - .../ChillPersonBundle/Templating/Entity/SocialActionRender.php | 1 - .../ChillPersonBundle/Templating/Entity/SocialIssueRender.php | 1 - src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php | 1 - .../AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php | 1 - ...ccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php | 1 - .../AccompanyingPeriod/Workflow/WorkflowEventSubscriberTest.php | 1 - .../Tests/Controller/AccompanyingCourseApiControllerTest.php | 1 - .../Tests/Controller/AccompanyingCourseControllerTest.php | 1 - .../Tests/Controller/AccompanyingPeriodControllerTest.php | 1 - .../AccompanyingPeriodRegulationListControllerTest.php | 1 - .../Tests/Controller/HouseholdApiControllerTest.php | 1 - .../Tests/Controller/HouseholdControllerTest.php | 1 - .../Tests/Controller/HouseholdMemberControllerTest.php | 1 - .../Tests/Controller/PersonAddressControllerTest.php | 1 - .../Tests/Controller/PersonApiControllerTest.php | 1 - .../Tests/Controller/PersonControllerCreateTest.php | 1 - .../Tests/Controller/PersonControllerUpdateTest.php | 1 - .../Controller/PersonControllerUpdateWithHiddenFieldsTest.php | 1 - .../Tests/Controller/PersonControllerViewTest.php | 1 - .../Controller/PersonControllerViewWithHiddenFieldsTest.php | 1 - .../Tests/Controller/PersonDuplicateControllerViewTest.php | 1 - .../Tests/Controller/RelationshipApiControllerTest.php | 1 - .../Tests/Controller/SocialIssueApiControllerTest.php | 1 - .../Tests/Entity/AccompanyingPeriod/ResourceTest.php | 1 - .../ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php | 1 - .../Tests/Entity/Household/HouseholdMemberTest.php | 1 - .../ChillPersonBundle/Tests/Entity/Household/HouseholdTest.php | 1 - .../Tests/Entity/SocialWork/SocialIssueTest.php | 1 - .../Tests/Event/Person/PersonAddressMoveEventTest.php | 1 - .../Tests/EventListener/PersonCreateEventTest.php | 1 - .../Export/Aggregator/PersonAggregators/AgeAggregatorTest.php | 1 - .../Export/Aggregator/PersonAggregators/GenderAggregatorTest.php | 1 - .../Aggregator/PersonAggregators/NationalityAggregatorTest.php | 1 - .../SocialWorkAggregators/ActionTypeAggregatorTest.php | 1 - .../Aggregator/SocialWorkAggregators/GoalAggregatorTest.php | 1 - .../Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php | 1 - .../Aggregator/SocialWorkAggregators/ResultAggregatorTest.php | 1 - .../Tests/Export/Export/CountAccompanyingCourseTest.php | 1 - .../ChillPersonBundle/Tests/Export/Export/CountPersonTest.php | 1 - .../Tests/Export/Export/CountSocialWorkActionsTest.php | 1 - .../Tests/Export/Export/StatAccompanyingCourseDurationTest.php | 1 - .../Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php | 1 - .../ActiveOneDayBetweenDatesFilterTest.php | 1 - .../AdministrativeLocationFilterTest.php | 1 - .../Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php | 1 - .../Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php | 1 - .../AccompanyingCourseFilters/CurrentUserJobFilterTest.php | 1 - .../AccompanyingCourseFilters/CurrentUserScopeFilterTest.php | 1 - .../Filter/AccompanyingCourseFilters/EmergencyFilterTest.php | 1 - .../Filter/AccompanyingCourseFilters/EvaluationFilterTest.php | 1 - .../AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php | 1 - .../Filter/AccompanyingCourseFilters/IntensityFilterTest.php | 1 - .../AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php | 1 - .../Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php | 1 - .../Filter/AccompanyingCourseFilters/ReferrerFilterTest.php | 1 - .../Filter/AccompanyingCourseFilters/RequestorFilterTest.php | 1 - .../Filter/AccompanyingCourseFilters/SocialActionFilterTest.php | 1 - .../Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php | 1 - .../Export/Filter/AccompanyingCourseFilters/StepFilterTest.php | 1 - .../Export/Filter/PersonFilters/AccompanyingPeriodFilterTest.php | 1 - .../Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php | 1 - .../Tests/Export/Filter/PersonFilters/GenderFilterTest.php | 1 - .../Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php | 1 - .../Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php | 1 - .../ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php | 1 - .../ChillPersonBundle/Tests/Household/MembersEditorTest.php | 1 - src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php | 1 - .../Tests/Security/Authorization/PersonVoterTest.php | 1 - .../Normalizer/AccompanyingPeriodDocGenNormalizerTest.php | 1 - .../Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php | 1 - .../AccompanyingPeriodWorkEvaluationDenormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/HouseholdNormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php | 1 - .../Serializer/Normalizer/RelationshipDocGenNormalizerTest.php | 1 - .../Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php | 1 - .../Tests/Timeline/TimelineAccompanyingPeriodTest.php | 1 - .../AccompanyingPeriod/LocationValidityValidatorTest.php | 1 - .../Household/HouseholdMembershipSequentialValidatorTest.php | 1 - .../Tests/Validator/Household/MaxHolderValidatorTest.php | 1 - .../Tests/Validator/Person/BirthdateValidatorTest.php | 1 - .../Tests/Validator/Person/PersonHasCenterValidatorTest.php | 1 - .../Tests/Validator/Person/PersonValidationTest.php | 1 - .../Tests/Workflows/AccompanyingPeriodLifecycle.php | 1 - .../Timeline/AbstractTimelineAccompanyingPeriod.php | 1 - .../Timeline/TimelineAccompanyingPeriodClosing.php | 1 - .../Timeline/TimelineAccompanyingPeriodOpening.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodValidity.php | 1 - .../AccompanyingPeriod/AccompanyingPeriodValidityValidator.php | 1 - .../AccompanyingPeriod/ConfidentialCourseMustHaveReferrer.php | 1 - .../ConfidentialCourseMustHaveReferrerValidator.php | 1 - .../Constraints/AccompanyingPeriod/LocationValidity.php | 1 - .../Constraints/AccompanyingPeriod/LocationValidityValidator.php | 1 - .../Constraints/AccompanyingPeriod/ParticipationOverlap.php | 1 - .../AccompanyingPeriod/ParticipationOverlapValidator.php | 1 - .../Constraints/AccompanyingPeriod/ResourceDuplicateCheck.php | 1 - .../AccompanyingPeriod/ResourceDuplicateCheckValidator.php | 1 - .../Constraints/Household/HouseholdMembershipSequential.php | 1 - .../Household/HouseholdMembershipSequentialValidator.php | 1 - .../Validator/Constraints/Household/MaxHolder.php | 1 - .../Validator/Constraints/Household/MaxHolderValidator.php | 1 - .../ChillPersonBundle/Validator/Constraints/Person/Birthdate.php | 1 - .../Validator/Constraints/Person/BirthdateValidator.php | 1 - .../Validator/Constraints/Person/PersonHasCenter.php | 1 - .../Validator/Constraints/Person/PersonHasCenterValidator.php | 1 - .../Constraints/Relationship/RelationshipNoDuplicate.php | 1 - .../Relationship/RelationshipNoDuplicateValidator.php | 1 - src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php | 1 - src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php | 1 - .../Widget/PersonListWidget/PersonFilteringInterface.php | 1 - src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php | 1 - .../AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php | 1 - .../Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandler.php | 1 - .../Workflow/AccompanyingPeriodWorkWorkflowHandler.php | 1 - .../ChillPersonBundle/migrations/Version20141129010948.php | 1 - .../ChillPersonBundle/migrations/Version20150212173934.php | 1 - .../ChillPersonBundle/migrations/Version20150607231010.php | 1 - .../ChillPersonBundle/migrations/Version20150811152608.php | 1 - .../ChillPersonBundle/migrations/Version20150812110708.php | 1 - .../ChillPersonBundle/migrations/Version20150820113409.php | 1 - .../ChillPersonBundle/migrations/Version20160310161006.php | 1 - .../ChillPersonBundle/migrations/Version20160422000000.php | 1 - .../ChillPersonBundle/migrations/Version20160818113633.php | 1 - .../ChillPersonBundle/migrations/Version20160818151130.php | 1 - .../ChillPersonBundle/migrations/Version20170117131924.php | 1 - .../ChillPersonBundle/migrations/Version20180518144221.php | 1 - .../ChillPersonBundle/migrations/Version20180820120000.php | 1 - .../ChillPersonBundle/migrations/Version20181005140249.php | 1 - .../ChillPersonBundle/migrations/Version20181023101621.php | 1 - .../ChillPersonBundle/migrations/Version20190701124238.php | 1 - .../ChillPersonBundle/migrations/Version20191106103452.php | 1 - .../ChillPersonBundle/migrations/Version20200128084445.php | 1 - .../ChillPersonBundle/migrations/Version20200130213446.php | 1 - .../ChillPersonBundle/migrations/Version20200310090632.php | 1 - .../ChillPersonBundle/migrations/Version20200422125935.php | 1 - .../ChillPersonBundle/migrations/Version20210128152747.php | 1 - .../ChillPersonBundle/migrations/Version20210318095831.php | 1 - .../ChillPersonBundle/migrations/Version20210325141540.php | 1 - .../ChillPersonBundle/migrations/Version20210326113045.php | 1 - .../ChillPersonBundle/migrations/Version20210329090904.php | 1 - .../ChillPersonBundle/migrations/Version20210329113152.php | 1 - .../ChillPersonBundle/migrations/Version20210329144338.php | 1 - .../ChillPersonBundle/migrations/Version20210330164922.php | 1 - .../ChillPersonBundle/migrations/Version20210331084527.php | 1 - .../ChillPersonBundle/migrations/Version20210419105054.php | 1 - .../ChillPersonBundle/migrations/Version20210419105940.php | 1 - .../ChillPersonBundle/migrations/Version20210419112619.php | 1 - .../ChillPersonBundle/migrations/Version20210426145930.php | 1 - .../ChillPersonBundle/migrations/Version20210427125700.php | 1 - .../ChillPersonBundle/migrations/Version20210505093408.php | 1 - .../ChillPersonBundle/migrations/Version20210505154316.php | 1 - .../ChillPersonBundle/migrations/Version20210518075908.php | 1 - .../ChillPersonBundle/migrations/Version20210518162439.php | 1 - .../ChillPersonBundle/migrations/Version20210519204938.php | 1 - .../ChillPersonBundle/migrations/Version20210525211214.php | 1 - .../ChillPersonBundle/migrations/Version20210528092625.php | 1 - .../ChillPersonBundle/migrations/Version20210528111624.php | 1 - .../ChillPersonBundle/migrations/Version20210528132405.php | 1 - .../ChillPersonBundle/migrations/Version20210528142121.php | 1 - .../ChillPersonBundle/migrations/Version20210614191600.php | 1 - .../ChillPersonBundle/migrations/Version20210615074857.php | 1 - .../ChillPersonBundle/migrations/Version20210616102900.php | 1 - .../ChillPersonBundle/migrations/Version20210617073504.php | 1 - .../ChillPersonBundle/migrations/Version20210618080702.php | 1 - .../ChillPersonBundle/migrations/Version20210620143757.php | 1 - .../ChillPersonBundle/migrations/Version20210623135043.php | 1 - .../ChillPersonBundle/migrations/Version20210623142046.php | 1 - .../ChillPersonBundle/migrations/Version20210624131722.php | 1 - .../ChillPersonBundle/migrations/Version20210624131723.php | 1 - .../ChillPersonBundle/migrations/Version20210727152826.php | 1 - .../ChillPersonBundle/migrations/Version20210729163023.php | 1 - .../ChillPersonBundle/migrations/Version20210730094514.php | 1 - .../ChillPersonBundle/migrations/Version20210730205407.php | 1 - .../ChillPersonBundle/migrations/Version20210802202838.php | 1 - .../ChillPersonBundle/migrations/Version20210820093927.php | 1 - .../ChillPersonBundle/migrations/Version20210820100407.php | 1 - .../ChillPersonBundle/migrations/Version20210831140339.php | 1 - .../ChillPersonBundle/migrations/Version20210910161858.php | 1 - .../ChillPersonBundle/migrations/Version20210915093624.php | 1 - .../ChillPersonBundle/migrations/Version20211020131133.php | 1 - .../ChillPersonBundle/migrations/Version20211021125359.php | 1 - .../ChillPersonBundle/migrations/Version20211025141226.php | 1 - .../ChillPersonBundle/migrations/Version20211029075117.php | 1 - .../ChillPersonBundle/migrations/Version20211108100849.php | 1 - .../ChillPersonBundle/migrations/Version20211112170027.php | 1 - .../ChillPersonBundle/migrations/Version20211119211101.php | 1 - .../ChillPersonBundle/migrations/Version20211119215630.php | 1 - .../ChillPersonBundle/migrations/Version20211213150253.php | 1 - .../ChillPersonBundle/migrations/Version20211213203147.php | 1 - .../ChillPersonBundle/migrations/Version20211213213755.php | 1 - .../ChillPersonBundle/migrations/Version20211216154008.php | 1 - .../ChillPersonBundle/migrations/Version20211223150721.php | 1 - .../ChillPersonBundle/migrations/Version20220104133334.php | 1 - .../ChillPersonBundle/migrations/Version20220119091025.php | 1 - .../ChillPersonBundle/migrations/Version20220119155944.php | 1 - .../ChillPersonBundle/migrations/Version20220121121310.php | 1 - .../ChillPersonBundle/migrations/Version20220128133039.php | 1 - .../ChillPersonBundle/migrations/Version20220214200327.php | 1 - .../ChillPersonBundle/migrations/Version20220215135509.php | 1 - .../ChillPersonBundle/migrations/Version20220224145951.php | 1 - .../ChillPersonBundle/migrations/Version20220303113855.php | 1 - .../ChillPersonBundle/migrations/Version20220310063629.php | 1 - .../ChillPersonBundle/migrations/Version20220310124318.php | 1 - .../ChillPersonBundle/migrations/Version20220425000000.php | 1 - .../ChillPersonBundle/migrations/Version20220427150431.php | 1 - .../ChillPersonBundle/migrations/Version20220429133023.php | 1 - .../ChillPersonBundle/migrations/Version20220527124737.php | 1 - src/Bundle/ChillReportBundle/ChillReportBundle.php | 1 - src/Bundle/ChillReportBundle/Controller/ReportController.php | 1 - .../ChillReportBundle/DataFixtures/ORM/LoadCustomField.php | 1 - .../ChillReportBundle/DataFixtures/ORM/LoadCustomFieldsGroup.php | 1 - src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReportACL.php | 1 - src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php | 1 - .../DependencyInjection/ChillReportExtension.php | 1 - .../ChillReportBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillReportBundle/Entity/Report.php | 1 - .../ChillReportBundle/Export/Export/ReportListProvider.php | 1 - src/Bundle/ChillReportBundle/Form/ReportType.php | 1 - src/Bundle/ChillReportBundle/Search/ReportSearch.php | 1 - .../ChillReportBundle/Security/Authorization/ReportVoter.php | 1 - .../Tests/Controller/ReportControllerNextTest.php | 1 - .../ChillReportBundle/Tests/Controller/ReportControllerTest.php | 1 - .../Tests/DependencyInjection/ChillReportExtensionTest.php | 1 - src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php | 1 - .../Tests/Security/Authorization/ReportVoterTest.php | 1 - .../ChillReportBundle/Tests/Timeline/TimelineProviderTest.php | 1 - src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php | 1 - .../ChillReportBundle/migrations/Version20141129012050.php | 1 - .../ChillReportBundle/migrations/Version20150622233319.php | 1 - src/Bundle/ChillTaskBundle/ChillTaskBundle.php | 1 - src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php | 1 - src/Bundle/ChillTaskBundle/Controller/TaskController.php | 1 - src/Bundle/ChillTaskBundle/DataFixtures/ORM/LoadTaskACL.php | 1 - .../ChillTaskBundle/DependencyInjection/ChillTaskExtension.php | 1 - .../Compiler/TaskWorkflowDefinitionCompilerPass.php | 1 - src/Bundle/ChillTaskBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillTaskBundle/Entity/AbstractTask.php | 1 - src/Bundle/ChillTaskBundle/Entity/RecurringTask.php | 1 - src/Bundle/ChillTaskBundle/Entity/SingleTask.php | 1 - .../ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php | 1 - src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php | 1 - .../ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php | 1 - src/Bundle/ChillTaskBundle/Event/TaskEvent.php | 1 - src/Bundle/ChillTaskBundle/Event/UI/UIEvent.php | 1 - src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php | 1 - src/Bundle/ChillTaskBundle/Form/SingleTaskType.php | 1 - src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php | 1 - src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php | 1 - src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php | 1 - src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php | 1 - .../ChillTaskBundle/Repository/RecurringTaskRepository.php | 1 - .../Repository/SingleTaskAclAwareRepositoryInterface.php | 1 - src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php | 1 - .../Security/Authorization/AuthorizationEvent.php | 1 - src/Bundle/ChillTaskBundle/Security/Authorization/TaskVoter.php | 1 - src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php | 1 - .../ChillTaskBundle/Templating/UI/CountNotificationTask.php | 1 - .../Tests/Controller/SingleTaskControllerTest.php | 1 - .../ChillTaskBundle/Tests/Controller/TaskControllerTest.php | 1 - .../Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php | 1 - .../Timeline/TaskLifeCycleEventTimelineProvider.php | 1 - .../Workflow/Definition/DefaultTaskDefinition.php | 1 - .../ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php | 1 - src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php | 1 - src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20180413135614.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20180413201023.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20180426093011.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20180502194119.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20181113161925.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20181113164108.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20210909153533.php | 1 - src/Bundle/ChillTaskBundle/migrations/Version20211029213909.php | 1 - src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php | 1 - src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php | 1 - .../Controller/ThirdPartyCategoryController.php | 1 - .../ChillThirdPartyBundle/Controller/ThirdPartyController.php | 1 - .../ChillThirdPartyBundle/DataFixtures/ORM/LoadThirdParty.php | 1 - .../DataFixtures/ORM/LoadThirdPartyCategory.php | 1 - .../DataFixtures/ORM/LoadThirdPartyProfession.php | 1 - .../DependencyInjection/ChillThirdPartyExtension.php | 1 - .../CompilerPass/ThirdPartyTypeCompilerPass.php | 1 - .../ChillThirdPartyBundle/DependencyInjection/Configuration.php | 1 - src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php | 1 - src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyCategory.php | 1 - src/Bundle/ChillThirdPartyBundle/Entity/ThirdPartyProfession.php | 1 - .../EventListener/ThirdPartyEventListener.php | 1 - .../Form/ChoiceLoader/ThirdPartyChoiceLoader.php | 1 - src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyCategoryType.php | 1 - src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php | 1 - .../ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php | 1 - .../Form/Type/PickThirdPartyTypeCategoryType.php | 1 - .../Form/Type/PickThirdpartyDynamicType.php | 1 - src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php | 1 - src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php | 1 - .../Repository/ThirdPartyACLAwareRepository.php | 1 - .../Repository/ThirdPartyACLAwareRepositoryInterface.php | 1 - .../Repository/ThirdPartyCategoryRepository.php | 1 - .../Repository/ThirdPartyProfessionRepository.php | 1 - .../ChillThirdPartyBundle/Repository/ThirdPartyRepository.php | 1 - src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php | 1 - src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php | 1 - .../ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php | 1 - .../Serializer/Normalizer/ThirdPartyNormalizer.php | 1 - .../ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php | 1 - .../Tests/Controller/ThirdPartyControllerTest.php | 1 - src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php | 1 - .../Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php | 1 - .../Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php | 1 - .../ThirdPartyType/ThirdPartyTypeManager.php | 1 - .../ThirdPartyType/ThirdPartyTypeProviderInterface.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190307111314.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190307131650.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190418090842.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190429171109.php | 1 - .../ChillThirdPartyBundle/migrations/Version20190502144206.php | 1 - .../ChillThirdPartyBundle/migrations/Version20210525211216.php | 1 - .../ChillThirdPartyBundle/migrations/Version20210719105918.php | 1 - .../ChillThirdPartyBundle/migrations/Version20211006200924.php | 1 - .../ChillThirdPartyBundle/migrations/Version20211007150459.php | 1 - .../ChillThirdPartyBundle/migrations/Version20211007165001.php | 1 - .../ChillThirdPartyBundle/migrations/Version20211007194942.php | 1 - .../ChillThirdPartyBundle/migrations/Version20220302143821.php | 1 - .../ChillThirdPartyBundle/migrations/Version20220322095659.php | 1 - .../ChillThirdPartyBundle/migrations/Version20220324175549.php | 1 - src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php | 1 - src/Bundle/ChillWopiBundle/src/Controller/Editor.php | 1 - .../src/DependencyInjection/ChillWopiExtension.php | 1 - .../ChillWopiBundle/src/DependencyInjection/Configuration.php | 1 - .../ChillWopiBundle/src/Resources/config/routes/routes.php | 1 - src/Bundle/ChillWopiBundle/src/Resources/config/services.php | 1 - src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php | 1 - .../src/Service/Controller/ResponderInterface.php | 1 - .../src/Service/Wopi/ChillDocumentLockManager.php | 1 - .../ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php | 1 - src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillWopi.php | 1 - .../tests/Service/Wopi/ChillDocumentLockManagerTest.php | 1 - 1469 files changed, 1469 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php index 5c6a7f5d6..5f872a7dc 100644 --- a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php +++ b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php @@ -1,6 +1,5 @@ Date: Thu, 6 Oct 2022 22:22:08 +0200 Subject: [PATCH 05/95] [Fixed] Add required import for exception handling --- .../Service/Import/AddressReferenceBEFromBestAddress.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php index 412a1269b..8dfc84bc3 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\MainBundle\Service\Import; +use Exception; use League\Csv\Reader; use League\Csv\Statement; use RuntimeException; From 36590e7810693f1ccea79daaa86b4108b065d7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 22:23:38 +0200 Subject: [PATCH 06/95] fix cs: mismatch header and strict type declaration --- .../Repository/ActivityTypeRepositoryInterface.php | 1 - .../ACPAggregators/BySocialActionAggregatorTest.php | 1 - .../ACPAggregators/BySocialIssueAggregatorTest.php | 1 - .../Aggregator/ACPAggregators/ByThirdpartyAggregatorTest.php | 1 - .../Aggregator/ACPAggregators/ByUserAggregatorTest.php | 1 - .../Export/Aggregator/ACPAggregators/DateAggregatorTest.php | 1 - .../Aggregator/ACPAggregators/LocationTypeAggregatorTest.php | 1 - .../Aggregator/ACPAggregators/UserScopeAggregatorTest.php | 1 - .../Export/Export/LinkedToACP/AvgActivityDurationTest.php | 1 - .../Export/LinkedToACP/AvgActivityVisitDurationTest.php | 1 - .../Tests/Export/Export/LinkedToACP/CountActivityTest.php | 1 - .../Export/Export/LinkedToACP/SumActivityDurationTest.php | 1 - .../Export/LinkedToACP/SumActivityVisitDurationTest.php | 1 - .../Export/Filter/ACPFilters/ActivityTypeFilterTest.php | 1 - .../Export/Filter/ACPFilters/BySocialActionFilterTest.php | 1 - .../Export/Filter/ACPFilters/BySocialIssueFilterTest.php | 1 - .../Tests/Export/Filter/ACPFilters/ByUserFilterTest.php | 1 - .../Tests/Export/Filter/ACPFilters/EmergencyFilterTest.php | 1 - .../Export/Filter/ACPFilters/LocationTypeFilterTest.php | 1 - .../Export/Filter/ACPFilters/SentReceivedFilterTest.php | 1 - .../Tests/Export/Filter/ACPFilters/UserFilterTest.php | 1 - .../Tests/Export/Filter/ACPFilters/UserScopeFilterTest.php | 1 - .../Tests/Export/Filter/ActivityDateFilterTest.php | 1 - .../Export/Filter/PersonFilters/ActivityReasonFilterTest.php | 1 - .../PersonHavingActivityBetweenDateFilterTest.php | 1 - src/Bundle/ChillMainBundle/Entity/GeographicalUnitLayer.php | 1 - .../ChillMainBundle/Repository/CenterRepositoryInterface.php | 1 - .../Repository/GeographicalUnitLayerLayerRepository.php | 1 - .../Repository/GeographicalUnitLayerRepositoryInterface.php | 1 - .../Repository/GeographicalUnitRepository.php | 1 - .../Repository/GeographicalUnitRepositoryInterface.php | 1 - .../ChillMainBundle/Repository/ScopeRepositoryInterface.php | 1 - .../Service/Import/GeographicalUnitBaseImporter.php | 1 - .../Services/Import/GeographicalUnitBaseImporterTest.php | 1 - .../ChillMainBundle/migrations/Version20220913174922.php | 1 - .../ChillMainBundle/migrations/Version20221003112151.php | 1 - .../ChillMainBundle/migrations/Version20221003132620.php | 1 - .../ChillPersonBundle/Entity/Person/PersonCenterCurrent.php | 1 - .../ChillPersonBundle/Entity/Person/PersonCenterHistory.php | 1 - .../GeographicalUnitStatAggregator.php | 1 - .../ReferrerScopeAggregator.php | 1 - .../AccompanyingCourseAggregators/RequestorAggregator.php | 1 - .../PersonAggregators/GeographicalUnitAggregator.php | 1 - .../SocialWorkAggregators/GoalResultAggregator.php | 1 - .../Export/Filter/PersonFilters/GeographicalUnitFilter.php | 5 ++--- .../Export/Filter/PersonFilters/MaritalStatusFilter.php | 1 - .../AccompanyingPeriod/ClosingMotiveRepositoryInterface.php | 1 - .../Repository/Person/PersonCenterHistoryInterface.php | 1 - .../Repository/Person/PersonCenterHistoryRepository.php | 1 - .../AdministrativeLocationAggregatorTest.php | 1 - .../ClosingMotiveAggregatorTest.php | 1 - .../ConfidentialAggregatorTest.php | 1 - .../AccompanyingCourseAggregators/DurationAggregatorTest.php | 1 - .../EmergencyAggregatorTest.php | 1 - .../EvaluationAggregatorTest.php | 1 - .../GeographicalUnitStatAggregatorTest.php | 1 - .../IntensityAggregatorTest.php | 1 - .../AccompanyingCourseAggregators/JobAggregatorTest.php | 1 - .../AccompanyingCourseAggregators/OriginAggregatorTest.php | 1 - .../AccompanyingCourseAggregators/ReferrerAggregatorTest.php | 1 - .../ReferrerScopeAggregatorTest.php | 1 - .../RequestorAggregatorTest.php | 1 - .../AccompanyingCourseAggregators/ScopeAggregatorTest.php | 1 - .../SocialActionAggregatorTest.php | 1 - .../SocialIssueAggregatorTest.php | 1 - .../AccompanyingCourseAggregators/StepAggregatorTest.php | 1 - .../EvaluationAggregators/EvaluationTypeAggregatorTest.php | 1 - .../HouseholdAggregators/ChildrenNumberAggregatorTest.php | 1 - .../HouseholdAggregators/CompositionAggregatorTest.php | 1 - .../PersonAggregators/CountryOfBirthAggregatorTest.php | 1 - .../PersonAggregators/HouseholdPositionAggregatorTest.php | 1 - .../PersonAggregators/MaritalStatusAggregatorTest.php | 1 - .../SocialWorkAggregators/GoalResultAggregatorTest.php | 1 - .../Aggregator/SocialWorkAggregators/JobAggregatorTest.php | 1 - .../Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php | 1 - .../Filter/EvaluationFilters/EvaluationTypeFilterTest.php | 1 - .../Export/Filter/EvaluationFilters/MaxDateFilterTest.php | 1 - .../Export/Filter/HouseholdFilters/CompositionFilterTest.php | 1 - .../PersonFilters/AccompanyingPeriodClosingFilterTest.php | 1 - .../PersonFilters/AccompanyingPeriodOpeningFilterTest.php | 1 - .../Tests/Export/Filter/PersonFilters/AgeFilterTest.php | 1 - .../Export/Filter/PersonFilters/DeadOrAliveFilterTest.php | 1 - .../Export/Filter/PersonFilters/DeathdateFilterTest.php | 1 - .../Export/Filter/PersonFilters/MaritalStatusFilterTest.php | 1 - .../Export/Filter/PersonFilters/NationalityFilterTest.php | 1 - .../ResidentialAddressAtThirdpartyFilterTest.php | 1 - .../PersonFilters/ResidentialAddressAtUserFilterTest.php | 1 - .../Export/Filter/SocialWorkFilters/ReferrerFilterTest.php | 1 - .../Filter/SocialWorkFilters/SocialWorkTypeFilterTest.php | 1 - .../Tests/Repository/PersonACLAwareRepositoryTest.php | 1 - .../ChillPersonBundle/migrations/Version20220926154347.php | 1 - .../Tests/Export/Filter/ReportDateFilterTest.php | 1 - .../Tests/Repository/SingleTaskACLAwareRepositoryTest.php | 1 - 93 files changed, 2 insertions(+), 95 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityTypeRepositoryInterface.php b/src/Bundle/ChillActivityBundle/Repository/ActivityTypeRepositoryInterface.php index d8944855c..2148a02f5 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityTypeRepositoryInterface.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityTypeRepositoryInterface.php @@ -1,6 +1,5 @@ translatableStringHelper->localize($item->getLayer()->getName()) . ' > ' . $item->getUnitName(); - }, + return $this->translatableStringHelper->localize($item->getLayer()->getName()) . ' > ' . $item->getUnitName(); + }, $data['units']->toArray() ) ), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php index f78f26e9b..a3d2260e3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php @@ -1,6 +1,5 @@ Date: Thu, 6 Oct 2022 22:39:00 +0200 Subject: [PATCH 07/95] ACP IntensityFilter: Do not loop on choices to show the picked one --- .../Filter/AccompanyingCourseFilters/IntensityFilter.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php index 82468c4ff..b0c2205a0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php @@ -73,15 +73,9 @@ class IntensityFilter implements FilterInterface public function describeAction($data, $format = 'string'): array { - foreach (self::CHOICES as $k => $v) { - if ($v === $data['accepted_intensities']) { - $choice = $k; - } - } - return [ 'Filtered by intensity: only %intensity%', [ - '%intensity%' => $this->translator->trans($choice), + '%intensity%' => $this->translator->trans($data['accepted_intensities']), ], ]; } From 02330fcc753ff9f688dd318d0d849ae43db93354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 22:42:35 +0200 Subject: [PATCH 08/95] ACP EmergencyFilter: Do not loop on choices to show the picked one --- .../AccompanyingCourseFilters/EmergencyFilter.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php index 7639ef54b..afdb717f0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php @@ -73,15 +73,11 @@ class EmergencyFilter implements FilterInterface public function describeAction($data, $format = 'string'): array { - foreach (self::CHOICES as $k => $v) { - if ($v === $data['accepted_emergency']) { - $choice = $k; - } - } - return [ 'Filtered by emergency: only %emergency%', [ - '%emergency%' => $this->translator->trans($choice), + '%emergency%' => $this->translator->trans( + $data['accepted_emergency'] ? 'is emergency' : 'is not emergency' + ), ], ]; } From a41483be00cd1475a033ba33e4c46163849d6ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 22:44:31 +0200 Subject: [PATCH 09/95] ACP ConfidentialFilter: Do not loop on choices to show the picked one --- .../AccompanyingCourseFilters/ConfidentialFilter.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php index 3eb4a2554..8fcd874fe 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php @@ -73,15 +73,11 @@ class ConfidentialFilter implements FilterInterface public function describeAction($data, $format = 'string'): array { - foreach (self::CHOICES as $k => $v) { - if ($v === $data['accepted_confidentials']) { - $choice = $k; - } - } - return [ 'Filtered by confidential: only %confidential%', [ - '%confidential%' => $this->translator->trans($choice), + '%confidential%' => $this->translator->trans( + $data['accepted_confidentials'] ? 'is confidential' : 'is not confidential' + ), ], ]; } From e518cf703de0e545d3d9fb936514bf4403bb9a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 22:45:07 +0200 Subject: [PATCH 10/95] fix cs again --- .../Export/Filter/ACPFilters/ByUserFilter.php | 1 - .../ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php index c4bddc3a6..d276cdce8 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Export\Declarations; -use Chill\MainBundle\Entity\User; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Templating\Entity\UserRender; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php index 5b28ec4d8..9f52c4694 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php @@ -12,7 +12,6 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Export\Declarations; -use Chill\MainBundle\Entity\User; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Templating\Entity\UserRender; From 77800c21bbc32f27a2380c2b74fde42c8beb069e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 22:45:58 +0200 Subject: [PATCH 11/95] Fixed: missing import for handling LogicException --- .../Export/Export/StatAccompanyingCourseDuration.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php index 4706593ce..3c77f64c3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php @@ -25,6 +25,7 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; +use LogicException; use Symfony\Component\Form\FormBuilderInterface; class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportInterface From 9ad9ef6758b34e246c83e2995fbce2bae3ba5a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 22:56:34 +0200 Subject: [PATCH 12/95] DX: rename argument $qb to $query in export's, `getResult` method, and add missing return type and import This name is the same as the implemented interface. --- docs/source/_static/code/exports/CountPerson.php | 9 ++++----- .../Export/Export/LinkedToACP/AvgActivityDuration.php | 4 ++-- .../Export/LinkedToACP/AvgActivityVisitDuration.php | 4 ++-- .../Export/Export/LinkedToACP/CountActivity.php | 4 ++-- .../Export/Export/LinkedToACP/SumActivityDuration.php | 4 ++-- .../Export/LinkedToACP/SumActivityVisitDuration.php | 4 ++-- .../Export/Export/LinkedToPerson/CountActivity.php | 4 ++-- .../Export/LinkedToPerson/StatActivityDuration.php | 8 ++++++-- .../Export/Export/CountAppointments.php | 4 ++-- .../Export/Export/StatAppointmentAvgDuration.php | 4 ++-- .../Export/Export/StatAppointmentSumDuration.php | 4 ++-- .../Export/Export/CountAccompanyingCourse.php | 4 ++-- .../ChillPersonBundle/Export/Export/CountEvaluation.php | 5 +++-- .../ChillPersonBundle/Export/Export/CountHousehold.php | 5 +++-- .../ChillPersonBundle/Export/Export/CountPerson.php | 4 ++-- .../Export/Export/CountPersonWithAccompanyingCourse.php | 5 +++-- .../Export/Export/CountSocialWorkActions.php | 4 ++-- .../Export/Export/StatAccompanyingCourseDuration.php | 4 ++-- 18 files changed, 45 insertions(+), 39 deletions(-) diff --git a/docs/source/_static/code/exports/CountPerson.php b/docs/source/_static/code/exports/CountPerson.php index 108a368c9..48eab8a55 100644 --- a/docs/source/_static/code/exports/CountPerson.php +++ b/docs/source/_static/code/exports/CountPerson.php @@ -18,7 +18,6 @@ use Chill\PersonBundle\Security\Authorization\PersonVoter; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Query; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Security\Core\Role\Role; class CountPerson implements ExportInterface { @@ -73,9 +72,9 @@ class CountPerson implements ExportInterface return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle() @@ -106,9 +105,9 @@ class CountPerson implements ExportInterface return $qb; } - public function requiredRole() + public function requiredRole(): string { - return new Role(PersonVoter::STATS); + return PersonVoter::STATS; } public function supportsModifiers() diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php index d4007aaea..2b6919340 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php @@ -69,9 +69,9 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface return ['export_avg_activity_duration']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php index 673e4408a..359593059 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php @@ -70,9 +70,9 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac return ['export_avg_activity_visit_duration']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php index 0902ced67..2dc844aa2 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php @@ -69,9 +69,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface return ['export_count_activity']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php index e55bd416e..1cf20dc5f 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php @@ -70,9 +70,9 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface return ['export_sum_activity_duration']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php index 1370edea7..2c160f3cf 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php @@ -70,9 +70,9 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac return ['export_sum_activity_visit_duration']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php index cf1acc40e..4246df173 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php @@ -65,9 +65,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface return ['export_count_activity']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle() diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php index 387ab3f27..050034954 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php @@ -64,6 +64,8 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface if (self::SUM === $this->action) { return 'Sum activities linked to a person duration by various parameters.'; } + + throw new LogicException('this action is not supported: ' . $this->action); } public function getGroup(): string @@ -87,9 +89,9 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface return ['export_stat_activity']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle() @@ -97,6 +99,8 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface if (self::SUM === $this->action) { return 'Sum activity linked to a person duration'; } + + throw new LogicException('This action is not supported: ' . $this->action); } public function getType(): string diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php b/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php index a7d6c6545..9d659dc14 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php @@ -72,9 +72,9 @@ class CountAppointments implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); + return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php index 5dd729ead..50d8e2460 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php @@ -71,9 +71,9 @@ class StatAppointmentAvgDuration implements ExportInterface, GroupedExportInterf return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php index 8bbc67cb2..ff5fc8592 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php @@ -71,9 +71,9 @@ class StatAppointmentSumDuration implements ExportInterface, GroupedExportInterf return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php index d063af2c0..7e5a01f3d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php @@ -75,9 +75,9 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php index f0f4d4880..e62752d13 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php @@ -22,6 +22,7 @@ use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; +use LogicException; use Symfony\Component\Form\FormBuilderInterface; use function in_array; @@ -74,9 +75,9 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php b/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php index a96d1a2c7..0c838beff 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php @@ -23,6 +23,7 @@ use Chill\PersonBundle\Security\Authorization\HouseholdVoter; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; +use LogicException; use Symfony\Component\Form\FormBuilderInterface; class CountHousehold implements ExportInterface, GroupedExportInterface @@ -74,9 +75,9 @@ class CountHousehold implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php index 848abea5f..98708149a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php @@ -72,9 +72,9 @@ class CountPerson implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle() diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php index ebda38566..7acbd09cf 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php @@ -21,6 +21,7 @@ use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; +use LogicException; use Symfony\Component\Form\FormBuilderInterface; use function in_array; @@ -73,9 +74,9 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php index e20947b1c..9333312fd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php @@ -75,9 +75,9 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php index 3c77f64c3..a0e68beea 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php @@ -80,9 +80,9 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn return ['export_result']; } - public function getResult($qb, $data) + public function getResult($query, $data) { - return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR); + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } public function getTitle(): string From 17cdaf449e3ced2ef4b5ee508b6387dd9c58f3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:02:47 +0200 Subject: [PATCH 13/95] DX: remove unnecessary comparison --- .../PersonAggregators/CountryOfBirthAggregator.php | 8 +------- .../PersonAggregators/HouseholdPositionAggregator.php | 9 +-------- .../PersonAggregators/MaritalStatusAggregator.php | 9 +-------- .../PersonAggregators/NationalityAggregator.php | 10 +--------- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php index 4686e64d9..1ba9d9f06 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php @@ -86,13 +86,7 @@ final class CountryOfBirthAggregator implements AggregatorInterface, ExportEleme $qb->leftJoin('person.countryOfBirth', 'countryOfBirth'); // add group by - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('country_of_birth_aggregator'); - } else { - $qb->groupBy('country_of_birth_aggregator'); - } + $qb->addGroupBy('country_of_birth_aggregator'); } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php index 73e0eedd6..2001466ab 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php @@ -70,14 +70,7 @@ final class HouseholdPositionAggregator implements AggregatorInterface, ExportEl $qb->setParameter('date', $data['date_position']); $qb->addSelect('IDENTITY(householdmember.position) AS household_position_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('household_position_aggregator'); - } else { - $qb->groupBy('household_position_aggregator'); - } + $qb->addGroupBy('household_position_aggregator'); } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php index 686f907ef..e20ecfb62 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php @@ -43,14 +43,7 @@ final class MaritalStatusAggregator implements AggregatorInterface } $qb->addSelect('personmarital.id as marital_status_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('marital_status_aggregator'); - } else { - $qb->groupBy('marital_status_aggregator'); - } + $qb->addGroupBy('marital_status_aggregator'); } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php index cbaa7a7ed..1eced58d3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php @@ -83,15 +83,7 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV } $qb->leftJoin('person.nationality', 'nationality'); - - // add group by - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('nationality_aggregator'); - } else { - $qb->groupBy('nationality_aggregator'); - } + $qb->addGroupBy('nationality_aggregator'); } public function applyOn() From 7e1d07f1ffcf44653718d6edcfece0d8f098567b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:04:33 +0200 Subject: [PATCH 14/95] DX: add missing import for handling exception --- phpstan-deprecations.neon | 303 ------------------ .../ConfidentialAggregator.php | 4 +- .../EmergencyAggregator.php | 4 +- .../StepAggregator.php | 2 +- 4 files changed, 3 insertions(+), 310 deletions(-) diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon index 1f6ca4401..a3b8974e5 100644 --- a/phpstan-deprecations.neon +++ b/phpstan-deprecations.neon @@ -23,150 +23,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Aggregator\\\\ActivityReasonAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Aggregator\\\\ActivityTypeAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Aggregator\\\\ActivityUserAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Export/CountActivity.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\CountActivity\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Export/CountActivity.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\ListActivity\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\StatActivityDuration\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityDateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityReasonFilter.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityReasonFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityReasonFilter.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityTypeFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php - - - - message: """ - #^Return type of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\PersonHavingActivityBetweenDateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php - - message: """ #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -565,142 +421,6 @@ parameters: count: 2 path: src/Bundle/ChillPersonBundle/Entity/Person.php - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\AgeAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Aggregator/AgeAggregator.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\CountryOfBirthAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\GenderAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\NationalityAggregator\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\CountPerson\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPerson\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php - - - - message: """ - #^Call to deprecated method execute\\(\\) of class Doctrine\\\\DBAL\\\\Statement\\: - Statement\\:\\:execute\\(\\) is deprecated, use Statement\\:\\:executeQuery\\(\\) or executeStatement\\(\\) instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php - - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPersonDuplicate\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\AccompanyingPeriodClosingFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodClosingFilter.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\AccompanyingPeriodFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodFilter.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\AccompanyingPeriodOpeningFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodOpeningFilter.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\BirthdateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Filter/BirthdateFilter.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\GenderFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Filter/GenderFilter.php - - - - message: """ - #^Return type of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\NationalityFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Filter/NationalityFilter.php - - message: """ #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: @@ -770,13 +490,6 @@ parameters: count: 3 path: src/Bundle/ChillReportBundle/Controller/ReportController.php - - - message: """ - #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php - message: """ @@ -786,14 +499,6 @@ parameters: count: 1 path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php - - - message: """ - #^Return type of method Chill\\\\ReportBundle\\\\Export\\\\Filter\\\\ReportDateFilter\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php - - message: """ #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: @@ -898,14 +603,6 @@ parameters: count: 1 path: src/Bundle/ChillTaskBundle/Form/SingleTaskType.php - - - message: """ - #^Parameter \\$centerResolverDispatcher of method Chill\\\\TaskBundle\\\\Repository\\\\SingleTaskAclAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: - Use CenterResolverManager and its interface CenterResolverManagerInterface$# - """ - count: 1 - path: src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php - - message: """ #^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php index 6adb43d05..e595c5d3f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php @@ -63,10 +63,8 @@ class ConfidentialAggregator implements AggregatorInterface return $this->translator->trans('is not confidential'); default: - throw new LogicException(sprintf('The value %s is not valid', $value)); + throw new \LogicException(sprintf('The value %s is not valid', $value)); } - - return $value; }; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php index 8a8c97c52..4c2de0e65 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php @@ -63,10 +63,8 @@ class EmergencyAggregator implements AggregatorInterface return $this->translator->trans('is not emergency'); default: - throw new LogicException(sprintf('The value %s is not valid', $value)); + throw new \LogicException(sprintf('The value %s is not valid', $value)); } - - return $value; }; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php index 1c01b76bd..2ff99216d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php @@ -95,7 +95,7 @@ final class StepAggregator implements AggregatorInterface //, FilterInterface return 'Step'; default: - throw new LogicException(sprintf('The value %s is not valid', $value)); + throw new \LogicException(sprintf('The value %s is not valid', $value)); } }; } From 1a8f8efa23fc52c0d153d7ec8acc81fc570e7ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:16:50 +0200 Subject: [PATCH 15/95] DX: remove call to deprecated method --- .../Doctrine/Type/NativeDateIntervalType.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php b/src/Bundle/ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php index 432c53aad..896ddb600 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Type/NativeDateIntervalType.php @@ -17,6 +17,7 @@ use Doctrine\DBAL\Types\ConversionException; use Doctrine\DBAL\Types\DateIntervalType; use Exception; +use LogicException; use function count; use function current; use function preg_match; @@ -40,7 +41,7 @@ class NativeDateIntervalType extends DateIntervalType return $value->format(self::FORMAT); } - throw ConversionException::conversionFailedInvalidType($value, $this->getName(), ['null', 'DateInterval']); + throw ConversionException::conversionFailedInvalidType($value, 'string', ['null', 'DateInterval']); } public function convertToPHPValue($value, AbstractPlatform $platform) @@ -80,7 +81,7 @@ class NativeDateIntervalType extends DateIntervalType protected function createConversionException($value, $exception = null) { - return ConversionException::conversionFailedFormat($value, $this->getName(), 'xx year xx mons xx days 01:02:03', $exception); + return ConversionException::conversionFailedFormat($value, 'string', 'xx year xx mons xx days 01:02:03', $exception); } private function convertEntry(&$strings) @@ -125,5 +126,7 @@ class NativeDateIntervalType extends DateIntervalType return $intervalSpec; } + + throw new LogicException(); } } From 5dbfb9890640070424ce96706b4ddae1f9b828e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:17:20 +0200 Subject: [PATCH 16/95] DX: fix missing import during exception handling --- .../AccompanyingCourseAggregators/ConfidentialAggregator.php | 3 ++- .../AccompanyingCourseAggregators/EmergencyAggregator.php | 3 ++- .../AccompanyingCourseAggregators/StepAggregator.php | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php index e595c5d3f..e9b9e28fa 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php @@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators; use Chill\MainBundle\Export\AggregatorInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; +use LogicException; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Contracts\Translation\TranslatorInterface; @@ -63,7 +64,7 @@ class ConfidentialAggregator implements AggregatorInterface return $this->translator->trans('is not confidential'); default: - throw new \LogicException(sprintf('The value %s is not valid', $value)); + throw new LogicException(sprintf('The value %s is not valid', $value)); } }; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php index 4c2de0e65..02f9f5cd9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php @@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators; use Chill\MainBundle\Export\AggregatorInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; +use LogicException; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Contracts\Translation\TranslatorInterface; @@ -63,7 +64,7 @@ class EmergencyAggregator implements AggregatorInterface return $this->translator->trans('is not emergency'); default: - throw new \LogicException(sprintf('The value %s is not valid', $value)); + throw new LogicException(sprintf('The value %s is not valid', $value)); } }; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php index 2ff99216d..79fed3160 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php @@ -20,6 +20,7 @@ use DateTime; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; +use LogicException; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Contracts\Translation\TranslatorInterface; @@ -95,7 +96,7 @@ final class StepAggregator implements AggregatorInterface //, FilterInterface return 'Step'; default: - throw new \LogicException(sprintf('The value %s is not valid', $value)); + throw new LogicException(sprintf('The value %s is not valid', $value)); } }; } From c7de95c63514b8ad874f42af61914de51395f6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:17:58 +0200 Subject: [PATCH 17/95] DX: fix type hinting, code and some dev stuffs --- .../Controller/ExportController.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php index d00d9d040..96c9ed08d 100644 --- a/src/Bundle/ChillMainBundle/Controller/ExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php @@ -22,6 +22,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\FormFactoryInterface; +use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\SessionInterface; @@ -191,18 +192,12 @@ class ExportController extends AbstractController case 'export': return $this->exportFormStep($request, $export, $alias); - break; - case 'formatter': return $this->formatterFormStep($request, $export, $alias); - break; - case 'generate': return $this->forwardToGenerate($request, $export, $alias); - break; - default: throw $this->createNotFoundException("The given step '{$step}' is invalid"); } @@ -214,10 +209,8 @@ class ExportController extends AbstractController * @param string $alias * @param array $data the data from previous step. Required for steps 'formatter' and 'generate_formatter' * @param mixed $step - * - * @return \Symfony\Component\Form\Form */ - protected function createCreateFormExport($alias, $step, $data = []) + protected function createCreateFormExport($alias, $step, $data = []): FormInterface { /** @var \Chill\MainBundle\Export\ExportManager $exportManager */ $exportManager = $this->exportManager; @@ -475,8 +468,6 @@ class ExportController extends AbstractController * @param \Chill\MainBundle\Export\DirectExportInterface|\Chill\MainBundle\Export\ExportInterface $export * @param string $alias * - * @throws type - * * @return Response */ protected function selectCentersStep(Request $request, $export, $alias) @@ -543,6 +534,8 @@ class ExportController extends AbstractController } } } + + return ''; } /** From f5997e39cd30a47a547d60cef40bd8676175c425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:24:07 +0200 Subject: [PATCH 18/95] DX: do not use complicated condtiion to add a group by --- .../Export/Aggregator/LocationAggregator.php | 9 +-------- .../Export/Aggregator/MonthYearAggregator.php | 13 ++----------- .../Export/Aggregator/ScopeAggregator.php | 9 +-------- 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php index 704278b8d..cdd4c4b03 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php @@ -40,14 +40,7 @@ final class LocationAggregator implements AggregatorInterface $qb->join('cal.location', 'calloc'); } $qb->addSelect('IDENTITY(cal.location) as location_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('location_aggregator'); - } else { - $qb->groupBy('location_aggregator'); - } + $qb->addGroupBy('location_aggregator'); } public function applyOn(): string diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php index 54c9584e8..11c6414ed 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php @@ -28,13 +28,7 @@ class MonthYearAggregator implements AggregatorInterface { $qb->addSelect("to_char(cal.startDate, 'MM-YYYY') AS month_year_aggregator"); // $qb->addSelect("extract(month from age(cal.startDate, cal.endDate)) AS month_aggregator"); - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('month_year_aggregator'); - } else { - $qb->groupBy('month_year_aggregator'); - } + $qb->addGroupBy('month_year_aggregator'); } public function applyOn(): string @@ -54,10 +48,7 @@ class MonthYearAggregator implements AggregatorInterface return 'by month and year'; } - $month = substr($value, 0, 2); - $year = substr($value, 3, 4); - - return strftime('%B %G', mktime(0, 0, 0, $month, '1', $year)); + return $value; }; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php index e8d0c7752..11a71654e 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php @@ -46,14 +46,7 @@ final class ScopeAggregator implements AggregatorInterface } $qb->addSelect('IDENTITY(caluser.mainScope) as scope_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('scope_aggregator'); - } else { - $qb->groupBy('scope_aggregator'); - } + $qb->addGroupBy('scope_aggregator'); } public function applyOn(): string From ca67170ad3ba9b3d311d179d22efc174b082808d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:24:38 +0200 Subject: [PATCH 19/95] DX: do not loop on possible choices to display action --- .../Export/Filter/ACPFilters/EmergencyFilter.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php index b74db1cc1..b79c2ca10 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php @@ -74,15 +74,13 @@ class EmergencyFilter implements FilterInterface public function describeAction($data, $format = 'string'): array { - foreach (self::CHOICES as $k => $v) { - if ($v === $data['accepted_emergency']) { - $choice = $k; - } - } - - return ['Filtered activity by emergency: only %emergency%', [ - '%emergency%' => $this->translator->trans($choice), - ]]; + return [ + 'Filtered by emergency: only %emergency%', [ + '%emergency%' => $this->translator->trans( + $data['accepted_emergency'] ? 'is emergency' : 'is not emergency' + ), + ], + ]; } public function getTitle(): string From 1b1aaaa862b9b16751fd9fc759a8cc4091b68030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:24:59 +0200 Subject: [PATCH 20/95] phpstan: fixed things --- phpstan-deprecations.neon | 7 ------- 1 file changed, 7 deletions(-) diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon index a3b8974e5..b515b244e 100644 --- a/phpstan-deprecations.neon +++ b/phpstan-deprecations.neon @@ -254,13 +254,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Export/ExportManager.php - - - message: """ - #^Return type of method Chill\\\\MainBundle\\\\Export\\\\ModifierInterface\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/ModifierInterface.php - message: """ From 07d15f0a68891ba1a1b6eb884edff9cf8cd2322f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:42:46 +0200 Subject: [PATCH 21/95] DX: fixed complicated comparison to add a group by --- .../Export/Aggregator/AgentAggregator.php | 9 +-------- .../Export/Aggregator/CancelReasonAggregator.php | 9 +-------- .../Export/Aggregator/JobAggregator.php | 9 +-------- .../Export/Aggregator/LocationTypeAggregator.php | 9 +-------- .../IntensityAggregator.php | 1 + 5 files changed, 5 insertions(+), 32 deletions(-) diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php index 4b888d22f..c685de630 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php @@ -46,14 +46,7 @@ final class AgentAggregator implements AggregatorInterface } $qb->addSelect('caluser.id AS agent_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('agent_aggregator'); - } else { - $qb->groupBy('agent_aggregator'); - } + $qb->addGroupBy('agent_aggregator'); } public function applyOn(): string diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php index 5daf4231c..53ecba909 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php @@ -47,14 +47,7 @@ class CancelReasonAggregator implements AggregatorInterface } $qb->addSelect('IDENTITY(cal.cancelReason) as cancel_reason_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('cancel_reason_aggregator'); - } else { - $qb->groupBy('cancel_reason_aggregator'); - } + $qb->addGroupBy('cancel_reason_aggregator'); } public function applyOn(): string diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php index e5acf8f16..f56bc61cb 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php @@ -46,14 +46,7 @@ final class JobAggregator implements AggregatorInterface } $qb->addSelect('IDENTITY(caluser.userJob) as job_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('job_aggregator'); - } else { - $qb->groupBy('job_aggregator'); - } + $qb->addGroupBy('job_aggregator'); } public function applyOn(): string diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php index e027f5a9e..6d42aed89 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php @@ -46,14 +46,7 @@ final class LocationTypeAggregator implements AggregatorInterface } $qb->addSelect('IDENTITY(calloc.locationType) as location_type_aggregator'); - - $groupBy = $qb->getDQLPart('groupBy'); - - if (!empty($groupBy)) { - $qb->addGroupBy('location_type_aggregator'); - } else { - $qb->groupBy('location_type_aggregator'); - } + $qb->addGroupBy('location_type_aggregator'); } public function applyOn(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php index 6c04086e5..a3618f40f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php @@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators; use Chill\MainBundle\Export\AggregatorInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; +use LogicException; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Contracts\Translation\TranslatorInterface; From 2fdb1dfb52de5a23e6c6aea0d89f79b2c08e3df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:43:16 +0200 Subject: [PATCH 22/95] DX: more type hint for DirectExportInterface --- .../Export/DirectExportInterface.php | 14 ++++---------- .../Export/Export/ListPersonDuplicate.php | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php b/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php index 9e89ebaad..9703a42de 100644 --- a/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php +++ b/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php @@ -11,28 +11,22 @@ declare(strict_types=1); namespace Chill\MainBundle\Export; -use Symfony\Component\Security\Core\Role\Role; +use Symfony\Component\HttpFoundation\Response; interface DirectExportInterface extends ExportElementInterface { /** * Generate the export. - * - * @return \Symfony\Component\HttpFoundation\Response */ - public function generate(array $acl, array $data = []); + public function generate(array $acl, array $data = []): Response; /** * get a description, which will be used in UI (and translated). - * - * @return string */ - public function getDescription(); + public function getDescription(): string; /** * authorized role. - * - * @return \Symfony\Component\Security\Core\Role\Role */ - public function requiredRole(); + public function requiredRole(): string; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php index bde0ec910..cf7e6608a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php @@ -123,7 +123,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat /** * @return string */ - public function getDescription() + public function getDescription(): string { return 'Create a list of duplicate people'; } From 3a23e889e373fc2d0c522387560d24f8a4d86bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:43:28 +0200 Subject: [PATCH 23/95] DX: fixed phpstan things --- phpstan-deprecations.neon | 31 ------------------------------- phpstan-types.neon | 5 ----- 2 files changed, 36 deletions(-) diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon index b515b244e..56fd6db20 100644 --- a/phpstan-deprecations.neon +++ b/phpstan-deprecations.neon @@ -230,29 +230,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Entity/User.php - - - message: """ - #^Return type of method Chill\\\\MainBundle\\\\Export\\\\DirectExportInterface\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/DirectExportInterface.php - - - - message: """ - #^Return type of method Chill\\\\MainBundle\\\\Export\\\\ExportInterface\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/ExportInterface.php - - - - message: """ - #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: - Use getReachableCircles$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/ExportManager.php - @@ -484,14 +461,6 @@ parameters: path: src/Bundle/ChillReportBundle/Controller/ReportController.php - - - message: """ - #^Return type of method Chill\\\\ReportBundle\\\\Export\\\\Export\\\\ReportList\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php - - message: """ #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\: diff --git a/phpstan-types.neon b/phpstan-types.neon index c8a0791e0..a0493ce0b 100644 --- a/phpstan-types.neon +++ b/phpstan-types.neon @@ -245,11 +245,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Entity/User.php - - - message: "#^Only booleans are allowed in a ternary operator condition, mixed given\\.$#" - count: 1 - path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 1 From db28443008bdf51777e57061c6a7b3bd361a76b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:57:02 +0200 Subject: [PATCH 24/95] Fixed: correct use of scopes --- .../ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php index 1fc09a907..d7bd1f274 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php @@ -34,7 +34,7 @@ class AccompanyingCourseDocument extends Document implements HasScopesInterface public function getScopes(): iterable { - if (null !== $this->course) { + if (null === $this->course) { return []; } From 915ec0d42881662f5c3892298abe9be162642e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:57:26 +0200 Subject: [PATCH 25/95] DX: fix import in test --- .../Tests/Export/Export/CountSocialWorkActionsTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountSocialWorkActionsTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountSocialWorkActionsTest.php index 512c2ef59..3ad0f7c1b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountSocialWorkActionsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountSocialWorkActionsTest.php @@ -13,6 +13,7 @@ namespace Export\Export; use Chill\MainBundle\Test\Export\AbstractExportTest; use Chill\PersonBundle\Export\Declarations; +use Chill\PersonBundle\Export\Export\CountSocialWorkActions; /** * @internal From d74decba74e0a8870a669379a048d2af84e0c7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:57:45 +0200 Subject: [PATCH 26/95] DX: Fix cs --- .../ChillPersonBundle/Export/Export/ListPersonDuplicate.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php index cf7e6608a..e40ffccce 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php @@ -120,9 +120,6 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat return $response; } - /** - * @return string - */ public function getDescription(): string { return 'Create a list of duplicate people'; From 5592e906f2fe241caadc68493a48494ac335d029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Oct 2022 01:02:32 +0200 Subject: [PATCH 27/95] DX: remove fixed phpstan things --- phpstan-deprecations.neon | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon index c5574a526..aa8506411 100644 --- a/phpstan-deprecations.neon +++ b/phpstan-deprecations.neon @@ -215,24 +215,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Entity/User.php - - - - message: """ - #^Return type of method Chill\\\\MainBundle\\\\Export\\\\ExportInterface\\:\\:requiredRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/ExportInterface.php - - - - - message: """ - #^Return type of method Chill\\\\MainBundle\\\\Export\\\\ModifierInterface\\:\\:addRole\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: - since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/ModifierInterface.php - - message: """ #^Class Chill\\\\MainBundle\\\\Form\\\\Event\\\\CustomizeFormEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\: From 6585662087a88261e62ddadabbd85f46b1d3af87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Oct 2022 01:03:21 +0200 Subject: [PATCH 28/95] Fixed: fix the evaluation maxDateFilter to use correct alias Some weird code is also removed in describeAction --- .../EvaluationFilters/MaxDateFilter.php | 30 ++++++------------- .../translations/messages.fr.yml | 6 ++-- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php index 5235207ff..4f02eaa35 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php @@ -22,8 +22,8 @@ use Symfony\Contracts\Translation\TranslatorInterface; class MaxDateFilter implements FilterInterface { private const MAXDATE_CHOICES = [ - 'is specified' => true, - 'is not specified' => false, + 'maxdate is specified' => true, + 'maxdate is not specified' => false, ]; private TranslatorInterface $translator; @@ -40,21 +40,13 @@ class MaxDateFilter implements FilterInterface public function alterQuery(QueryBuilder $qb, $data) { - $where = $qb->getDQLPart('where'); - if (true === $data['maxdate']) { - $clause = $qb->expr()->isNotNull('eval.maxDate'); + $clause = $qb->expr()->isNotNull('workeval.maxDate'); } else { - $clause = $qb->expr()->isNull('eval.maxDate'); + $clause = $qb->expr()->isNull('workeval.maxDate'); } - if ($where instanceof Andx) { - $where->add($clause); - } else { - $where = $qb->expr()->andX($clause); - } - - $qb->add('where', $where); + $qb->andWhere($clause); } public function applyOn(): string @@ -73,19 +65,15 @@ class MaxDateFilter implements FilterInterface public function describeAction($data, $format = 'string'): array { - foreach (self::MAXDATE_CHOICES as $k => $v) { - if ($v === $data['maxdate']) { - $choice = $k; - } - } - return ['Filtered by maxdate: only %choice%', [ - '%choice%' => $this->translator->trans($choice), + '%choice%' => $this->translator->trans( + $data['maxdate'] ? 'maxdate is specified': 'maxdate is not specified' + ), ]]; } public function getTitle(): string { - return 'Filter by maxdate'; + return 'Filter evaluations by maxdate mention'; } } diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 664498a95..a5040e6df 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -581,10 +581,10 @@ Accepted evaluationtype: Évaluations Group by evaluation type: Grouper les évaluations par type Evaluation type: Type d'évaluation -Filter by maxdate: Filtrer les évaluations par date d'échéance +Filter evaluations by maxdate mention: Filtrer les évaluations qui possèdent une date d'échéance Maxdate: '' -is specified: La date d'échéance est spécifiée -is not specified: La date d'échéance n'est pas spécifiée +maxdate is specified: la date d'échéance est spécifiée +maxdate is not specified: la date d'échéance n'est pas spécifiée "Filtered by maxdate: only %choice%": "Filtré par date d'échéance: uniquement si %choice%" ## household filters/aggr From 8cf166f7eacf3e7dae22fd2f3f3b90d935043e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Oct 2022 01:10:00 +0200 Subject: [PATCH 29/95] store an end date instead of a string when person is removed from a participation --- src/Bundle/ChillPersonBundle/Entity/Person.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index dc59e4cec..4b494c304 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -1480,7 +1480,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI $participation = $this->participationsContainAccompanyingPeriod($accompanyingPeriod); if (!null === $participation) { - $participation->setEndDate(DateTimeImmutable::class); + $participation->setEndDate(new DateTime()); $this->accompanyingPeriodParticipations->removeElement($participation); } } From 76aa9c70585f5b68b762b9bf1757899d63f10b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Oct 2022 01:11:54 +0200 Subject: [PATCH 30/95] Fixed: do not store center in Person any more, the centerHistory is now fully in use --- src/Bundle/ChillPersonBundle/Entity/Person.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 4b494c304..0d6e3e493 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -1561,8 +1561,6 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI */ public function setCenter(Center $center): self { - $this->center = $center; - $modification = new DateTimeImmutable('now'); foreach ($this->centerHistory as $centerHistory) { From 61db0d6a28ed4eadc279d189e81038974981e1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Oct 2022 01:30:06 +0200 Subject: [PATCH 31/95] DX: fix deprecation in dql custom function + add test --- .../Doctrine/DQL/JsonbExistsInArray.php | 2 +- .../Doctrine/DQL/JsonbExistsInArrayTest.php | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php index 3dbe9145c..1556753b6 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php @@ -27,7 +27,7 @@ class JsonbExistsInArray extends FunctionNode return sprintf( '%s ?? %s', $this->expr1->dispatch($sqlWalker), - $sqlWalker->walkInputParameter($this->expr2) + $this->expr2->dispatch($sqlWalker) ); } diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php new file mode 100644 index 000000000..67c41d3d9 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php @@ -0,0 +1,41 @@ +em = self::$container->get(EntityManagerInterface::class); + } + + public function testDQLFunctionWorks() + { + $result = $this->em + ->createQuery('SELECT JSONB_EXISTS_IN_ARRAY(u.attributes, :param) FROM ' . User::class . ' u') + ->setParameter('param', 'fr') + ->getResult(); + + $this->assertIsArray($result); + } +} From d055a286a866472860b8d1d8077a2d296689c001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 8 Oct 2022 01:35:56 +0200 Subject: [PATCH 32/95] Fix CS --- .../Export/Filter/EvaluationFilters/MaxDateFilter.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php index 4f02eaa35..4a65452a1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php @@ -13,7 +13,6 @@ namespace Chill\PersonBundle\Export\Filter\EvaluationFilters; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; -use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; @@ -67,7 +66,7 @@ class MaxDateFilter implements FilterInterface { return ['Filtered by maxdate: only %choice%', [ '%choice%' => $this->translator->trans( - $data['maxdate'] ? 'maxdate is specified': 'maxdate is not specified' + $data['maxdate'] ? 'maxdate is specified' : 'maxdate is not specified' ), ]]; } From 999d4e2038ba44408488db30da81b727ccf8d24b Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Oct 2022 15:25:07 +0200 Subject: [PATCH 33/95] issue649: adapt existing UserCurrentLocationType to use select2 with AdministrativeLocationFilter --- .../Form/UserCurrentLocationType.php | 26 +++++++++++ .../AdministrativeLocationFilter.php | 45 +++++++++++-------- 2 files changed, 52 insertions(+), 19 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php b/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php index 3f839d3ed..00c194420 100644 --- a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php +++ b/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php @@ -17,6 +17,9 @@ use Chill\MainBundle\Templating\TranslatableStringHelper; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\FormInterface; +use Symfony\Component\Form\FormView; +use Symfony\Component\OptionsResolver\OptionsResolver; class UserCurrentLocationType extends AbstractType { @@ -32,6 +35,7 @@ class UserCurrentLocationType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { + //dump($options); $builder ->add('currentLocation', EntityType::class, [ 'class' => Location::class, @@ -43,7 +47,29 @@ class UserCurrentLocationType extends AbstractType }, 'placeholder' => 'Pick a location', 'required' => false, + 'label' => $options['label'], + 'label_attr' => $options['label_attr'], + 'multiple' => $options['multiple'], 'attr' => ['class' => 'select2'], ]); } + + public function buildView(FormView $view, FormInterface $form, array $options) + { + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('label', 'Current location') + ->setDefault('label_attr', []) + ->setDefault('multiple', false) + ->setAllowedTypes('multiple', ['bool']) + ; + } + + public function getBlockPrefix() + { + return 'user_current_location_type'; + } } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php index 4ded757f3..65f0c5b3b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php @@ -11,22 +11,26 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; -use Chill\MainBundle\Entity\Location; +//use Chill\MainBundle\Entity\Location; use Chill\MainBundle\Export\FilterInterface; +use Chill\MainBundle\Form\UserCurrentLocationType; +//use Chill\MainBundle\Repository\LocationRepository; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Export\Declarations; -use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; class AdministrativeLocationFilter implements FilterInterface { + //private LocationRepository $locationRepository; + private TranslatableStringHelper $translatableStringHelper; public function __construct( + //LocationRepository $locationRepository, TranslatableStringHelper $translatableStringHelper ) { + //$this->locationRepository = $locationRepository; $this->translatableStringHelper = $translatableStringHelper; } @@ -37,17 +41,10 @@ class AdministrativeLocationFilter implements FilterInterface public function alterQuery(QueryBuilder $qb, $data) { - $where = $qb->getDQLPart('where'); $clause = $qb->expr()->in('acp.administrativeLocation', ':locations'); - - if ($where instanceof Andx) { - $where->add($clause); - } else { - $where = $qb->expr()->andX($clause); - } - - $qb->add('where', $where); - $qb->setParameter('locations', $data['accepted_locations']); + $qb + ->andWhere($clause) + ->setParameter('locations', $data['accepted_locations']); } public function applyOn(): string @@ -57,13 +54,23 @@ class AdministrativeLocationFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_locations', EntityType::class, [ - 'class' => Location::class, - 'choice_label' => function (Location $l) { - return $l->getName() . ' (' . $this->translatableStringHelper->localize($l->getLocationType()->getTitle()) . ')'; - }, + + //$builder->add('accepted_locations', EntityType::class, [ + // 'class' => Location::class, + // 'choices' => $this->locationRepository->findByPublicLocations(), + // 'choice_label' => function (Location $l) { + // return $l->getName() . ' (' . $this->translatableStringHelper->localize($l->getLocationType()->getTitle()) . ')'; + // }, + // 'multiple' => true, + // 'expanded' => true, + //]); + + $builder->add('accepted_locations', UserCurrentLocationType::class, [ + 'label' => 'Accepted locations', + 'label_attr' => [ + //'class' => 'd-none' + ], 'multiple' => true, - 'expanded' => true, ]); } From 087270829eb7ea8b571c81ea5cb95ff26c57283d Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Oct 2022 15:26:40 +0200 Subject: [PATCH 34/95] cleaning previous --- .../Form/UserCurrentLocationType.php | 1 - .../AdministrativeLocationFilter.php | 15 --------------- 2 files changed, 16 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php b/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php index 00c194420..a99811bfa 100644 --- a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php +++ b/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php @@ -35,7 +35,6 @@ class UserCurrentLocationType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { - //dump($options); $builder ->add('currentLocation', EntityType::class, [ 'class' => Location::class, diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php index 65f0c5b3b..b10a66944 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php @@ -11,10 +11,8 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; -//use Chill\MainBundle\Entity\Location; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\UserCurrentLocationType; -//use Chill\MainBundle\Repository\LocationRepository; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; @@ -22,15 +20,12 @@ use Symfony\Component\Form\FormBuilderInterface; class AdministrativeLocationFilter implements FilterInterface { - //private LocationRepository $locationRepository; private TranslatableStringHelper $translatableStringHelper; public function __construct( - //LocationRepository $locationRepository, TranslatableStringHelper $translatableStringHelper ) { - //$this->locationRepository = $locationRepository; $this->translatableStringHelper = $translatableStringHelper; } @@ -55,16 +50,6 @@ class AdministrativeLocationFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - //$builder->add('accepted_locations', EntityType::class, [ - // 'class' => Location::class, - // 'choices' => $this->locationRepository->findByPublicLocations(), - // 'choice_label' => function (Location $l) { - // return $l->getName() . ' (' . $this->translatableStringHelper->localize($l->getLocationType()->getTitle()) . ')'; - // }, - // 'multiple' => true, - // 'expanded' => true, - //]); - $builder->add('accepted_locations', UserCurrentLocationType::class, [ 'label' => 'Accepted locations', 'label_attr' => [ From 7276cb971f87dd060cbb82a2648844a5b96f1005 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Oct 2022 15:59:16 +0200 Subject: [PATCH 35/95] issue649: new formType to use select2 with LocationTypeFilter --- .../Filter/ACPFilters/LocationTypeFilter.php | 11 ++-- .../Form/Type/Select2LocationTypeType.php | 51 +++++++++++++++++++ .../translations/messages.fr.yml | 1 + 3 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php index 92dc1b0eb..023882cf9 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php @@ -12,12 +12,11 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Export\Declarations; -use Chill\MainBundle\Entity\LocationType; use Chill\MainBundle\Export\FilterInterface; +use Chill\MainBundle\Form\Type\Select2LocationTypeType; use Chill\MainBundle\Templating\TranslatableStringHelper; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; use function in_array; @@ -61,13 +60,9 @@ class LocationTypeFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_locationtype', EntityType::class, [ - 'class' => LocationType::class, - 'choice_label' => function (LocationType $type) { - return $this->translatableStringHelper->localize($type->getTitle()); - }, + $builder->add('accepted_locationtype', Select2LocationTypeType::class, [ 'multiple' => true, - 'expanded' => true, + //'label' => false, ]); } diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php new file mode 100644 index 000000000..8fd5dbe91 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php @@ -0,0 +1,51 @@ +translatableStringHelper = $translatableStringHelper; + } + + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder->add('locationtype', EntityType::class, [ + 'class' => LocationType::class, + 'choice_label' => function (LocationType $type) { + return $this->translatableStringHelper->localize($type->getTitle()); + }, + 'placeholder' => 'Pick a location type', + 'required' => false, + 'label' => $options['label'], + 'label_attr' => $options['label_attr'], + 'multiple' => $options['multiple'], + 'attr' => ['class' => 'select2'], + ]); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('label', 'Location type') + ->setDefault('label_attr', []) + ->setDefault('multiple', false) + ->setAllowedTypes('multiple', ['bool']) + ; + } + + public function getBlockPrefix() + { + return 'select2_location_type_type'; + } +} diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index 1e95e32d0..76dc27b39 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -227,6 +227,7 @@ never: jamais Create a new location: Créer une nouvelle localisation Location list: Liste des localisations Location type: Type de localisation +Pick a location type: Choisir un type de localisation Phonenumber1: Numéro de téléphone Phonenumber2: Autre numéro de téléphone Location configuration: Configuration des localisations From 631111b0c76feeb168f6763fd6966b30c5ec2163 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Oct 2022 16:08:23 +0200 Subject: [PATCH 36/95] rename UserCurrentLocationType to more generic Select2UserLocationType NB: used 2 times, check that all works --- src/Bundle/ChillMainBundle/Controller/UserController.php | 4 ++-- .../Select2UserLocationType.php} | 6 +++--- src/Bundle/ChillMainBundle/config/services/form.yaml | 2 +- .../AdministrativeLocationFilter.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename src/Bundle/ChillMainBundle/Form/{UserCurrentLocationType.php => Type/Select2UserLocationType.php} (94%) diff --git a/src/Bundle/ChillMainBundle/Controller/UserController.php b/src/Bundle/ChillMainBundle/Controller/UserController.php index 9d3941411..03d8d2692 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserController.php @@ -15,7 +15,7 @@ use Chill\MainBundle\CRUD\Controller\CRUDController; use Chill\MainBundle\Entity\GroupCenter; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Form\Type\ComposedGroupCenterType; -use Chill\MainBundle\Form\UserCurrentLocationType; +use Chill\MainBundle\Form\Type\Select2UserLocationType; use Chill\MainBundle\Form\UserPasswordType; use Chill\MainBundle\Form\UserType; use Chill\MainBundle\Pagination\PaginatorInterface; @@ -234,7 +234,7 @@ class UserController extends CRUDController public function editCurrentLocationAction(Request $request) { $user = $this->getUser(); - $form = $this->createForm(UserCurrentLocationType::class, $user) + $form = $this->createForm(Select2UserLocationType::class, $user) ->add('submit', SubmitType::class, ['label' => 'Save']) ->handleRequest($request); diff --git a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php similarity index 94% rename from src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php rename to src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php index a99811bfa..e09b63bac 100644 --- a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php @@ -9,7 +9,7 @@ declare(strict_types=1); * the LICENSE file that was distributed with this source code. */ -namespace Chill\MainBundle\Form; +namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Location; use Chill\MainBundle\Repository\LocationRepository; @@ -21,7 +21,7 @@ use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; -class UserCurrentLocationType extends AbstractType +class Select2UserLocationType extends AbstractType { private LocationRepository $locationRepository; @@ -69,6 +69,6 @@ class UserCurrentLocationType extends AbstractType public function getBlockPrefix() { - return 'user_current_location_type'; + return 'select2_user_location_type'; } } diff --git a/src/Bundle/ChillMainBundle/config/services/form.yaml b/src/Bundle/ChillMainBundle/config/services/form.yaml index 0a757a8db..f047e8f39 100644 --- a/src/Bundle/ChillMainBundle/config/services/form.yaml +++ b/src/Bundle/ChillMainBundle/config/services/form.yaml @@ -132,7 +132,7 @@ services: autowire: true autoconfigure: true - Chill\MainBundle\Form\UserCurrentLocationType: + Chill\MainBundle\Form\Type\Select2UserLocationType: autowire: true autoconfigure: true diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php index b10a66944..9e54a2272 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php @@ -12,7 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Export\FilterInterface; -use Chill\MainBundle\Form\UserCurrentLocationType; +use Chill\MainBundle\Form\Type\Select2UserLocationType; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; @@ -50,7 +50,7 @@ class AdministrativeLocationFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_locations', UserCurrentLocationType::class, [ + $builder->add('accepted_locations', Select2UserLocationType::class, [ 'label' => 'Accepted locations', 'label_attr' => [ //'class' => 'd-none' From c41f9d8f5b78170d753ddc0c758ad042612bdb27 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Oct 2022 17:37:45 +0200 Subject: [PATCH 37/95] fix missing service declaration + remove unused form method --- .../ChillMainBundle/Form/Type/Select2LocationTypeType.php | 2 +- .../ChillMainBundle/Form/Type/Select2UserLocationType.php | 8 +------- src/Bundle/ChillMainBundle/config/services/form.yaml | 6 ++++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php index 8fd5dbe91..e680b06ca 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php @@ -44,7 +44,7 @@ class Select2LocationTypeType extends AbstractType ; } - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'select2_location_type_type'; } diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php index e09b63bac..de4a8537d 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php @@ -17,8 +17,6 @@ use Chill\MainBundle\Templating\TranslatableStringHelper; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\OptionsResolver; class Select2UserLocationType extends AbstractType @@ -53,10 +51,6 @@ class Select2UserLocationType extends AbstractType ]); } - public function buildView(FormView $view, FormInterface $form, array $options) - { - } - public function configureOptions(OptionsResolver $resolver) { $resolver @@ -67,7 +61,7 @@ class Select2UserLocationType extends AbstractType ; } - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'select2_user_location_type'; } diff --git a/src/Bundle/ChillMainBundle/config/services/form.yaml b/src/Bundle/ChillMainBundle/config/services/form.yaml index f047e8f39..34f5d1802 100644 --- a/src/Bundle/ChillMainBundle/config/services/form.yaml +++ b/src/Bundle/ChillMainBundle/config/services/form.yaml @@ -122,8 +122,6 @@ services: Chill\MainBundle\Form\Type\PickAddressType: ~ - Chill\MainBundle\Form\DataTransform\AddressToIdDataTransformer: ~ - Chill\MainBundle\Form\DataTransform\AddressToIdDataTransformer: autoconfigure: true autowire: true @@ -136,6 +134,10 @@ services: autowire: true autoconfigure: true + Chill\MainBundle\Form\Type\Select2LocationTypeType: + autowire: true + autoconfigure: true + Chill\MainBundle\Form\Type\LocationFormType: ~ Chill\MainBundle\Form\WorkflowStepType: ~ From c3f9ce1ea6212c8e6e99fe632f9868cb53f40566 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Oct 2022 17:39:13 +0200 Subject: [PATCH 38/95] issue641: create 2 new Select2 formType (for actions and issues) --- .../ACPFilters/BySocialActionFilter.php | 12 ++--- .../Filter/ACPFilters/BySocialIssueFilter.php | 12 ++--- .../Form/Type/Select2SocialActionType.php | 51 +++++++++++++++++++ .../Form/Type/Select2SocialIssueType.php | 51 +++++++++++++++++++ .../config/services/form.yaml | 8 +++ .../translations/messages.fr.yml | 2 + 6 files changed, 118 insertions(+), 18 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Form/Type/Select2SocialActionType.php create mode 100644 src/Bundle/ChillPersonBundle/Form/Type/Select2SocialIssueType.php diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php index e3ce8b287..4502450cb 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php @@ -13,11 +13,10 @@ namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Export\FilterInterface; -use Chill\PersonBundle\Entity\SocialWork\SocialAction; +use Chill\PersonBundle\Form\Type\Select2SocialActionType; use Chill\PersonBundle\Templating\Entity\SocialActionRender; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; use function in_array; @@ -62,13 +61,8 @@ class BySocialActionFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_socialactions', EntityType::class, [ - 'class' => SocialAction::class, - 'choice_label' => function (SocialAction $sa) { - return $this->actionRender->renderString($sa, []); - }, - 'multiple' => true, - 'expanded' => true, + $builder->add('accepted_socialactions', Select2SocialActionType::class, [ + 'multiple' => true ]); } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php index f5d552011..59d79d21d 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php @@ -13,11 +13,10 @@ namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Export\FilterInterface; -use Chill\PersonBundle\Entity\SocialWork\SocialIssue; +use Chill\PersonBundle\Form\Type\Select2SocialIssueType; use Chill\PersonBundle\Templating\Entity\SocialIssueRender; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; use function in_array; @@ -62,13 +61,8 @@ class BySocialIssueFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_socialissues', EntityType::class, [ - 'class' => SocialIssue::class, - 'choice_label' => function (SocialIssue $si) { - return $this->issueRender->renderString($si, []); - }, - 'multiple' => true, - 'expanded' => true, + $builder->add('accepted_socialissues', Select2SocialIssueType::class, [ + 'multiple' => true ]); } diff --git a/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialActionType.php b/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialActionType.php new file mode 100644 index 000000000..f1e8cd913 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialActionType.php @@ -0,0 +1,51 @@ +actionRender = $actionRender; + } + + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder->add('social_actions', EntityType::class, [ + 'class' => SocialAction::class, + 'choice_label' => function (SocialAction $sa) { + return $this->actionRender->renderString($sa, []); + }, + 'placeholder' => 'Pick a social action', + 'required' => false, + 'label' => $options['label'], + 'label_attr' => $options['label_attr'], + 'multiple' => $options['multiple'], + 'attr' => ['class' => 'select2'], + ]); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('label', 'Social actions') + ->setDefault('label_attr', []) + ->setDefault('multiple', false) + ->setAllowedTypes('multiple', ['bool']) + ; + } + + public function getBlockPrefix(): string + { + return 'select2_social_action_type'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialIssueType.php b/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialIssueType.php new file mode 100644 index 000000000..49ee6d574 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialIssueType.php @@ -0,0 +1,51 @@ +issueRender = $issueRender; + } + + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder->add('social_issues', EntityType::class, [ + 'class' => SocialIssue::class, + 'choice_label' => function (SocialIssue $si) { + return $this->issueRender->renderString($si, []); + }, + 'placeholder' => 'Pick a social issue', + 'required' => false, + 'label' => $options['label'], + 'label_attr' => $options['label_attr'], + 'multiple' => $options['multiple'], + 'attr' => ['class' => 'select2'], + ]); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('label', 'Social issues') + ->setDefault('label_attr', []) + ->setDefault('multiple', false) + ->setAllowedTypes('multiple', ['bool']) + ; + } + + public function getBlockPrefix(): string + { + return 'select2_social_issue_type'; + } +} diff --git a/src/Bundle/ChillPersonBundle/config/services/form.yaml b/src/Bundle/ChillPersonBundle/config/services/form.yaml index 52bf1f494..85b97c86b 100644 --- a/src/Bundle/ChillPersonBundle/config/services/form.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/form.yaml @@ -27,3 +27,11 @@ services: $config: "%chill_person.accompanying_period_fields%" tags: - { name: form.type } + + Chill\PersonBundle\Form\Type\Select2SocialActionType: + autowire: true + autoconfigure: true + + Chill\PersonBundle\Form\Type\Select2SocialIssueType: + autowire: true + autoconfigure: true diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index a5040e6df..a755ce0f0 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -205,9 +205,11 @@ Resources: Interlocuteurs privilégiés Any requestor to this accompanying course: Aucun demandeur pour ce parcours Social action: Action d'accompagnement Social actions: Actions d'accompagnement +Pick a social action: Choisir une action d'accompagnement Last social actions: Les dernières actions d'accompagnement Social issue: Problématique sociale Social issues: Problématiques sociales +Pick a social issue: Choisir une problématique sociale Last events on accompanying course: Dernières actions de suivi Edit & activate accompanying course: Modifier et valider See accompanying periods: Voir toutes les périodes d'accompagnement From 9c709d4388a34658fde0d4aedb41644ff8df000a Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Oct 2022 18:17:09 +0200 Subject: [PATCH 39/95] issue641: others filters use these new Select2...Type --- .../AccompanyingCourseFilters/SocialActionFilter.php | 10 ++-------- .../AccompanyingCourseFilters/SocialIssueFilter.php | 9 ++------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php index c5c37ce21..6c78d703f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php @@ -13,12 +13,11 @@ namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; -use Chill\PersonBundle\Entity\SocialWork\SocialAction; use Chill\PersonBundle\Export\Declarations; +use Chill\PersonBundle\Form\Type\Select2SocialActionType; use Chill\PersonBundle\Templating\Entity\SocialActionRender; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; use function in_array; @@ -71,13 +70,8 @@ class SocialActionFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_socialactions', EntityType::class, [ - 'class' => SocialAction::class, - 'choice_label' => function (SocialAction $sa) { - return $this->actionRender->renderString($sa, []); - }, + $builder->add('accepted_socialactions', Select2SocialActionType::class, [ 'multiple' => true, - 'expanded' => true, ]); } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php index d896d6395..b5f52b1fb 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php @@ -15,10 +15,10 @@ use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Chill\PersonBundle\Export\Declarations; +use Chill\PersonBundle\Form\Type\Select2SocialIssueType; use Chill\PersonBundle\Templating\Entity\SocialIssueRender; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Contracts\Translation\TranslatorInterface; use function in_array; @@ -78,13 +78,8 @@ class SocialIssueFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_socialissues', EntityType::class, [ - 'class' => SocialIssue::class, - 'choice_label' => function ($socialIssue) { - return $this->socialIssueRender->renderString($socialIssue, []); - }, + $builder->add('accepted_socialissues', Select2SocialIssueType::class, [ 'multiple' => true, - 'expanded' => true, ]); } From 5c6068e8a5a08145f0a1c77793e4532e91cbad0e Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 10 Oct 2022 18:52:38 +0200 Subject: [PATCH 40/95] fix cs --- .../Form/Type/Select2LocationTypeType.php | 12 +++- .../Form/Type/Select2UserLocationType.php | 3 +- .../Test/Export/AbstractAggregatorTest.php | 72 +++++++++---------- .../Test/Export/AbstractFilterTest.php | 72 +++++++++---------- .../AdministrativeLocationFilter.php | 2 - .../Form/Type/Select2SocialActionType.php | 12 +++- .../Form/Type/Select2SocialIssueType.php | 12 +++- 7 files changed, 103 insertions(+), 82 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php index e680b06ca..783ec4e5c 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2LocationTypeType.php @@ -1,5 +1,14 @@ setDefault('label', 'Location type') ->setDefault('label_attr', []) ->setDefault('multiple', false) - ->setAllowedTypes('multiple', ['bool']) - ; + ->setAllowedTypes('multiple', ['bool']); } public function getBlockPrefix(): string diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php index de4a8537d..8fb100441 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2UserLocationType.php @@ -57,8 +57,7 @@ class Select2UserLocationType extends AbstractType ->setDefault('label', 'Current location') ->setDefault('label_attr', []) ->setDefault('multiple', false) - ->setAllowedTypes('multiple', ['bool']) - ; + ->setAllowedTypes('multiple', ['bool']); } public function getBlockPrefix(): string diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php index d3f2849b7..115c364ad 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php @@ -29,6 +29,18 @@ use function is_string; */ abstract class AbstractAggregatorTest extends KernelTestCase { + /** + * provide data for `testAliasDidNotDisappears`. + */ + public function dataProviderAliasDidNotDisappears() + { + foreach ($this->getQueryBuilders() as $qb) { + foreach ($this->getFormData() as $data) { + yield [clone $qb, $data]; + } + } + } + /** * provide data for `testAlterQuery`. */ @@ -63,18 +75,6 @@ abstract class AbstractAggregatorTest extends KernelTestCase } } - /** - * provide data for `testAliasDidNotDisappears`. - */ - public function dataProviderAliasDidNotDisappears() - { - foreach ($this->getQueryBuilders() as $qb) { - foreach ($this->getFormData() as $data) { - yield [clone $qb, $data]; - } - } - } - /** * Create an aggregator instance which will be used in tests. * @@ -107,6 +107,30 @@ abstract class AbstractAggregatorTest extends KernelTestCase */ abstract public function getQueryBuilders(); + /** + * Compare aliases array before and after that aggregator alter query + * + * @dataProvider dataProviderAliasDidNotDisappears + * + * @param QueryBuilder $qb + * @param array $data + * @return void + */ + public function testAliasDidNotDisappears(QueryBuilder $qb, array $data) + { + $aliases = $qb->getAllAliases(); + + $this->getAggregator()->alterQuery($qb, $data); + + $alteredQuery = $qb->getAllAliases(); + + $this->assertGreaterThanOrEqual(count($aliases), count($alteredQuery)); + + foreach ($aliases as $alias) { + $this->assertContains($alias, $alteredQuery); + } + } + /** * test the alteration of query by the filter. * @@ -270,28 +294,4 @@ abstract class AbstractAggregatorTest extends KernelTestCase ); } - /** - * Compare aliases array before and after that aggregator alter query - * - * @dataProvider dataProviderAliasDidNotDisappears - * - * @param QueryBuilder $qb - * @param array $data - * @return void - */ - public function testAliasDidNotDisappears(QueryBuilder $qb, array $data) - { - $aliases = $qb->getAllAliases(); - - $this->getAggregator()->alterQuery($qb, $data); - - $alteredQuery = $qb->getAllAliases(); - - $this->assertGreaterThanOrEqual(count($aliases), count($alteredQuery)); - - foreach ($aliases as $alias) { - $this->assertContains($alias, $alteredQuery); - } - } - } diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php index 8e8220b89..1525385aa 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php @@ -40,6 +40,18 @@ abstract class AbstractFilterTest extends KernelTestCase $this->prophet = $this->getProphet(); } + /** + * provide data for `testAliasDidNotDisappears`. + */ + public function dataProviderAliasDidNotDisappears() + { + foreach ($this->getQueryBuilders() as $qb) { + foreach ($this->getFormData() as $data) { + yield [clone $qb, $data]; + } + } + } + public function dataProviderAlterQuery() { foreach ($this->getQueryBuilders() as $qb) { @@ -56,18 +68,6 @@ abstract class AbstractFilterTest extends KernelTestCase } } - /** - * provide data for `testAliasDidNotDisappears`. - */ - public function dataProviderAliasDidNotDisappears() - { - foreach ($this->getQueryBuilders() as $qb) { - foreach ($this->getFormData() as $data) { - yield [clone $qb, $data]; - } - } - } - /** * Create a filter which will be used in tests. * @@ -99,6 +99,30 @@ abstract class AbstractFilterTest extends KernelTestCase */ abstract public function getQueryBuilders(); + /** + * Compare aliases array before and after that filter alter query + * + * @dataProvider dataProviderAliasDidNotDisappears + * + * @param QueryBuilder $qb + * @param array $data + * @return void + */ + public function testAliasDidNotDisappears(QueryBuilder $qb, array $data) + { + $aliases = $qb->getAllAliases(); + + $this->getFilter()->alterQuery($qb, $data); + + $alteredQuery = $qb->getAllAliases(); + + $this->assertGreaterThanOrEqual(count($aliases), count($alteredQuery)); + + foreach ($aliases as $alias) { + $this->assertContains($alias, $alteredQuery); + } + } + /** * test the alteration of query by the filter. * @@ -211,28 +235,4 @@ abstract class AbstractFilterTest extends KernelTestCase 'test that the title is not empty' ); } - - /** - * Compare aliases array before and after that filter alter query - * - * @dataProvider dataProviderAliasDidNotDisappears - * - * @param QueryBuilder $qb - * @param array $data - * @return void - */ - public function testAliasDidNotDisappears(QueryBuilder $qb, array $data) - { - $aliases = $qb->getAllAliases(); - - $this->getFilter()->alterQuery($qb, $data); - - $alteredQuery = $qb->getAllAliases(); - - $this->assertGreaterThanOrEqual(count($aliases), count($alteredQuery)); - - foreach ($aliases as $alias) { - $this->assertContains($alias, $alteredQuery); - } - } } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php index 9e54a2272..d289220af 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php @@ -20,7 +20,6 @@ use Symfony\Component\Form\FormBuilderInterface; class AdministrativeLocationFilter implements FilterInterface { - private TranslatableStringHelper $translatableStringHelper; public function __construct( @@ -49,7 +48,6 @@ class AdministrativeLocationFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_locations', Select2UserLocationType::class, [ 'label' => 'Accepted locations', 'label_attr' => [ diff --git a/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialActionType.php b/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialActionType.php index f1e8cd913..1365757c7 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialActionType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialActionType.php @@ -1,5 +1,14 @@ setDefault('label', 'Social actions') ->setDefault('label_attr', []) ->setDefault('multiple', false) - ->setAllowedTypes('multiple', ['bool']) - ; + ->setAllowedTypes('multiple', ['bool']); } public function getBlockPrefix(): string diff --git a/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialIssueType.php b/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialIssueType.php index 49ee6d574..04b2f723d 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialIssueType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/Select2SocialIssueType.php @@ -1,5 +1,14 @@ setDefault('label', 'Social issues') ->setDefault('label_attr', []) ->setDefault('multiple', false) - ->setAllowedTypes('multiple', ['bool']) - ; + ->setAllowedTypes('multiple', ['bool']); } public function getBlockPrefix(): string From 9d9aa0404f4a5d3cdc2f58e1fedb2eb9432fe8dc Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 6 Oct 2022 15:26:44 +0200 Subject: [PATCH 41/95] [person]: add new test for social action normalizer --- .../Normalizer/SocialActionNormalizerTest.php | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php new file mode 100644 index 000000000..9d43eaaf8 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php @@ -0,0 +1,48 @@ +normalizer = self::$container->get(NormalizerInterface::class); + } + + public function testNormalization() + { + $sa = new SocialAction(); + + $normalized = $this->normalizer->normalize( + $sa, + 'json', + ['groups' => ['read']] + ); + + $this->assertIsArray($normalized); + $this->assertArrayHasKey('type', $normalized); + $this->assertEquals('social_work_social_action', $normalized['type']); + } +} From 0aef6b1afbfa7692c4aead9e91198a26c4c13e60 Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 7 Oct 2022 10:23:41 +0200 Subject: [PATCH 42/95] [person]: add origin and social issue normalizer tests + typo --- ...AccompanyingPeriodOriginNormalizerTest.php | 48 +++++++++++++++++++ ...mpanyingPeriodWorkDocGenNormalizerTest.php | 2 +- .../Normalizer/SocialIssueNormalizerTest.php | 48 +++++++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php new file mode 100644 index 000000000..c725599b7 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php @@ -0,0 +1,48 @@ +normalizer = self::$container->get(NormalizerInterface::class); + } + + public function testNormalization() + { + $o = new Origin(); + + $normalized = $this->normalizer->normalize( + $o, + 'json', + ['groups' => ['read']] + ); + + $this->assertIsArray($normalized); + $this->assertArrayHasKey('type', $normalized); + $this->assertEquals('origin', $normalized['type']); + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php index 743cce736..e71e0bf51 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php @@ -60,7 +60,7 @@ final class AccompanyingPeriodWorkDocGenNormalizerTest extends KernelTestCase } } - public function testNormlalize() + public function testNormalize() { $work = new AccompanyingPeriodWork(); $work diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php new file mode 100644 index 000000000..3e56cf74b --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php @@ -0,0 +1,48 @@ +normalizer = self::$container->get(NormalizerInterface::class); + } + + public function testNormalization() + { + $si = new SocialIssue(); + + $normalized = $this->normalizer->normalize( + $si, + 'json', + ['groups' => ['read']] + ); + + $this->assertIsArray($normalized); + $this->assertArrayHasKey('type', $normalized); + $this->assertEquals('social_issue', $normalized['type']); + } +} From aa5094f19685fff3a486541069bc82801e0abd4f Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 7 Oct 2022 10:47:55 +0200 Subject: [PATCH 43/95] [person] normalizer tests: php stan --- .../Normalizer/AccompanyingPeriodOriginNormalizerTest.php | 2 -- .../Tests/Serializer/Normalizer/SocialActionNormalizerTest.php | 2 -- .../Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php index c725599b7..cba5ed875 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php @@ -1,6 +1,5 @@ Date: Thu, 29 Sep 2022 22:05:29 +0200 Subject: [PATCH 44/95] [workflow] Feature: allow user to retrieve the access link for the workflow + show dest email for a workflow --- CHANGELOG.md | 2 ++ .../views/Workflow/_decision.html.twig | 24 +++++++++++++++++++ .../views/Workflow/_history.html.twig | 9 +++++++ .../Authorization/EntityWorkflowVoter.php | 16 +++++++++++++ .../translations/messages.fr.yml | 6 ++++- 5 files changed, 56 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df4dab422..a438e9f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to * [activity][export] DX/Feature: use of an `ActivityTypeRepositoryInterface` instead of the old-style EntityRepository * [person][export] Fixed: some inconsistency with date filter on accompanying courses * [person][export] Fixed: use left join for related entities in accompanying course aggregators +* [workflow] Feature: allow user to copy and send manually the access link for the workflow +* [workflow] Feature: show the email addresses that received an access link for the workflow ## Test releases diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig index bb0411371..bd9274739 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig @@ -95,6 +95,15 @@ {% endif %} + {% if entity_workflow.currentStep.destEmail|length > 0 %} +

{{ 'workflow.An access key was also sent to those addresses'|trans }} :

+
    + {% for e in entity_workflow.currentStep.destEmail -%} +
  • {{ e }}
  • + {%- endfor %} +
+ {% endif %} + {% if entity_workflow.currentStep.destUserByAccessKey|length > 0 %}

{{ 'workflow.Those users are also granted to apply a transition by using an access key'|trans }} :

    @@ -103,6 +112,21 @@ {% endfor %}
{% endif %} + + {% if is_granted('CHILL_MAIN_WORKFLOW_LINK_SHOW', entity_workflow) %} +

{{ 'workflow.This link grant any user to apply a transition'|trans }} :

+ + {% set link = absolute_url(path('chill_main_workflow_grant_access_by_key', {'id': entity_workflow.currentStep.id, 'accessKey': entity_workflow.currentStep.accessKey})) %} +
+ + + + +
+ {% endif %} + + {% endif %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig index dda309da0..72aab397c 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig @@ -81,6 +81,15 @@ {% endif %} + {% if entity_workflow.currentStep.destEmail|length > 0 %} +

{{ 'workflow.An access key was also sent to those addresses'|trans }} :

+
    + {% for e in entity_workflow.currentStep.destEmail -%} +
  • {{ e }}
  • + {%- endfor %} +
+ {% endif %} + {% if step.destUserByAccessKey|length > 0 %}

{{ 'workflow.Those users are also granted to apply a transition by using an access key'|trans }} :

    diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php index 40dc1b13c..ffcc1bb95 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php @@ -27,6 +27,8 @@ class EntityWorkflowVoter extends Voter public const SEE = 'CHILL_MAIN_WORKFLOW_SEE'; + public const SHOW_ENTITY_LINK = 'CHILL_MAIN_WORKFLOW_LINK_SHOW'; + private EntityWorkflowManager $manager; private Security $security; @@ -80,6 +82,19 @@ class EntityWorkflowVoter extends Voter case self::DELETE: return $subject->getStep() === 'initial'; + case self::SHOW_ENTITY_LINK: + if ($subject->getStep() === 'initial') { + return false; + } + + $currentStep = $subject->getCurrentStepChained(); + + if ($currentStep->isFinal()) { + return false; + } + + return $currentStep->getPrevious()->getTransitionBy() === $this->security->getUser(); + default: throw new UnexpectedValueException("attribute {$attribute} not supported"); } @@ -91,6 +106,7 @@ class EntityWorkflowVoter extends Voter self::SEE, self::CREATE, self::DELETE, + self::SHOW_ENTITY_LINK, ]; } } diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index 76dc27b39..d14b4a7c1 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -455,7 +455,6 @@ workflow: Delete workflow: Supprimer le workflow Steps is not waiting for transition. Maybe someone apply the transition before you ?: L'étape que vous cherchez a déjà été modifiée par un autre utilisateur. Peut-être quelqu'un a-t-il modifié cette étape avant vous ? You get access to this step: Vous avez acquis les droits pour appliquer une transition sur ce workflow. - Those users are also granted to apply a transition by using an access key: Ces utilisateurs peuvent également valider cette étape, grâce à un lien d'accès dest by email: Liens d'autorisation par email dest by email help: Les adresses email mentionnées ici recevront un lien d'accès. Ce lien d'accès permettra à l'utilisateur de valider cette étape. Add an email: Ajouter une adresse email @@ -467,6 +466,11 @@ workflow: Previous workflow transitionned help: Workflows où vous avez exécuté une action. For: Pour You must select a next step, pick another decision if no next steps are available: Il faut une prochaine étape. Choissisez une autre décision si nécessaire. + An access key was also sent to those addresses: Un lien d'accès a été envoyé à ces addresses + Those users are also granted to apply a transition by using an access key: Ces utilisateurs ont obtennu l'accès grâce au lien reçu par email + Access link copied: Lien d'accès copié + This link grant any user to apply a transition: Le lien d'accès suivant permet d'appliquer une transition + The workflow may be accssed through this link: Une transition peut être appliquée sur ce workflow grâce au lien d'accès suivant Subscribe final: Recevoir une notification à l'étape finale From 86cfd87d711037aa5b0ebb6d7e63b12de48a08f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 20:46:57 +0200 Subject: [PATCH 45/95] Feature: Allow to filter periods to reassign by postal code --- .../Controller/PostalCodeAPIController.php | 6 +- .../PostalCodeToIdTransformer.php | 55 +++++++++ .../Form/Type/PickPostalCodeType.php | 49 ++++++++ .../Repository/PostalCodeRepository.php | 16 +-- .../PostalCodeRepositoryInterface.php | 42 +++++++ .../public/module/pick-postal-code/index.js | 66 +++++++++++ .../vuejs/PickPostalCode/PickPostalCode.md | 4 + .../vuejs/PickPostalCode/PickPostalCode.vue | 108 ++++++++++++++++++ .../vuejs/PickPostalCode/_PickPostalCode.scss | 3 + .../public/vuejs/PickPostalCode/api.js | 43 +++++++ .../Resources/views/Form/fields.html.twig | 6 + .../Form/Type/PickPostalCodeTypeTest.php | 67 +++++++++++ .../ChillMainBundle/chill.webpack.config.js | 1 + .../ReassignAccompanyingPeriodController.php | 15 ++- .../AccompanyingPeriodACLAwareRepository.php | 74 +++++++++++- ...nyingPeriodACLAwareRepositoryInterface.php | 11 ++ .../reassign_list.html.twig | 4 + .../translations/messages.fr.yml | 2 + 18 files changed, 553 insertions(+), 19 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php create mode 100644 src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php create mode 100644 src/Bundle/ChillMainBundle/Repository/PostalCodeRepositoryInterface.php create mode 100644 src/Bundle/ChillMainBundle/Resources/public/module/pick-postal-code/index.js create mode 100644 src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.md create mode 100644 src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue create mode 100644 src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/_PickPostalCode.scss create mode 100644 src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/api.js create mode 100644 src/Bundle/ChillMainBundle/Tests/Form/Type/PickPostalCodeTypeTest.php diff --git a/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php b/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php index 437f0930c..8e679b228 100644 --- a/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php +++ b/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php @@ -14,7 +14,7 @@ namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; use Chill\MainBundle\Pagination\PaginatorFactory; use Chill\MainBundle\Repository\CountryRepository; -use Chill\MainBundle\Repository\PostalCodeRepository; +use Chill\MainBundle\Repository\PostalCodeRepositoryInterface; use Chill\MainBundle\Serializer\Model\Collection; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -30,11 +30,11 @@ final class PostalCodeAPIController extends ApiController private PaginatorFactory $paginatorFactory; - private PostalCodeRepository $postalCodeRepository; + private PostalCodeRepositoryInterface $postalCodeRepository; public function __construct( CountryRepository $countryRepository, - PostalCodeRepository $postalCodeRepository, + PostalCodeRepositoryInterface $postalCodeRepository, PaginatorFactory $paginatorFactory ) { $this->countryRepository = $countryRepository; diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php new file mode 100644 index 000000000..ca488fe1a --- /dev/null +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php @@ -0,0 +1,55 @@ +postalCodeRepository = $postalCodeRepository; + } + + public function reverseTransform($value) + { + if (null === $value || trim('') === $value) { + return null; + } + + if (!is_int((int) $value)) { + throw new TransformationFailedException('Cannot transform ' . gettype($value)); + } + + return $this->postalCodeRepository->find((int) $value); + } + + public function transform($value) + { + if (null === $value) { + return null; + } + + if ($value instanceof PostalCode) { + return $value->getId(); + } + + throw new TransformationFailedException('Could not reverseTransform ' . gettype($value)); + } +} diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php b/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php new file mode 100644 index 000000000..d1feacd6a --- /dev/null +++ b/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php @@ -0,0 +1,49 @@ +postalCodeToIdTransformer = $postalCodeToIdTransformer; + } + + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder->addViewTransformer($this->postalCodeToIdTransformer); + } + + public function buildView(FormView $view, FormInterface $form, array $options) + { + $view->vars['uniqid'] = $view->vars['attr']['data-input-postal-code'] = uniqid('input_pick_postal_code_'); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver + ->setDefault('class', PostalCode::class) + ->setDefault('multiple', false) + ->setAllowedTypes('multiple', ['bool']) + ->setDefault('compound', false); + } +} diff --git a/src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php b/src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php index c53df01df..32c1322be 100644 --- a/src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php @@ -18,10 +18,9 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query\ResultSetMapping; use Doctrine\ORM\Query\ResultSetMappingBuilder; -use Doctrine\Persistence\ObjectRepository; use RuntimeException; -final class PostalCodeRepository implements ObjectRepository +final class PostalCodeRepository implements PostalCodeRepositoryInterface { private EntityManagerInterface $entityManager; @@ -29,7 +28,7 @@ final class PostalCodeRepository implements ObjectRepository public function __construct(EntityManagerInterface $entityManager) { - $this->repository = $entityManager->getRepository(PostalCode::class); + $this->repository = $entityManager->getRepository($this->getClassName()); $this->entityManager = $entityManager; } @@ -51,20 +50,11 @@ final class PostalCodeRepository implements ObjectRepository return $this->repository->find($id, $lockMode, $lockVersion); } - /** - * @return PostalCode[] - */ public function findAll(): array { return $this->repository->findAll(); } - /** - * @param mixed|null $limit - * @param mixed|null $offset - * - * @return PostalCode[] - */ public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); @@ -95,7 +85,7 @@ final class PostalCodeRepository implements ObjectRepository return $this->repository->findOneBy($criteria, $orderBy); } - public function getClassName() + public function getClassName(): string { return PostalCode::class; } diff --git a/src/Bundle/ChillMainBundle/Repository/PostalCodeRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/PostalCodeRepositoryInterface.php new file mode 100644 index 000000000..fe3dee195 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Repository/PostalCodeRepositoryInterface.php @@ -0,0 +1,42 @@ +', + components: { + PickPostalCode, + }, + data() { + return { + city: city, + } + }, + methods: { + onCitySelected(city) { + this.city = city; + input.value = city.id; + }, + onCityRemoved(city) { + this.city = null; + input.value = ''; + } + } + }) + .use(i18n) + .mount(el); +} + +function loadDynamicPickers(element) { + + let apps = element.querySelectorAll('[data-module="pick-postal-code"]'); + + apps.forEach(function(el) { + + console.log('el', el); + const + uniqId = el.dataset.uniqid, + input = document.querySelector(`input[data-input-uniqid="${uniqId}"]`), + cityIdValue = input.value === '' ? null : input.value + ; + + console.log('uniqid', uniqId); + console.log('input', input); + console.log('input value', input.value); + console.log('cityIdValue', cityIdValue); + + if (cityIdValue !== null) { + makeFetch('GET', `/api/1.0/main/postal-code/${cityIdValue}.json`).then(city => { + loadOnePicker(el, input, uniqId, city); + }) + } else { + loadOnePicker(el, input, uniqId, null); + } + }); +} + +document.addEventListener('DOMContentLoaded', function(e) { + loadDynamicPickers(document) +}) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.md b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.md new file mode 100644 index 000000000..93dcf1816 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.md @@ -0,0 +1,4 @@ +# Pickpostalcode + +## Usage + diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue new file mode 100644 index 000000000..3c191b8c4 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue @@ -0,0 +1,108 @@ + + + diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/_PickPostalCode.scss b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/_PickPostalCode.scss new file mode 100644 index 000000000..09f5fd539 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/_PickPostalCode.scss @@ -0,0 +1,3 @@ +.PickPostalCode { + +} diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/api.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/api.js new file mode 100644 index 000000000..d31dcc3f4 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/api.js @@ -0,0 +1,43 @@ +import {makeFetch, fetchResults} from 'ChillMainAssets/lib/api/apiMethods'; + +/** + * Endpoint chill_api_single_postal_code__index + * method GET, get Cities Object + * @params {object} a country object + * @returns {Promise} a promise containing all Postal Code objects filtered with country + */ +const fetchCities = (country) => { + // warning: do not use fetchResults (in apiMethods): we need only a **part** of the results in the db + const params = new URLSearchParams({item_per_page: 100}); + + if (country !== null) { + params.append('country', country.id); + } + + return makeFetch('GET', `/api/1.0/main/postal-code.json?${params.toString()}`).then(r => Promise.resolve(r.results)); +}; + +/** + * Endpoint chill_main_postalcodeapi_search + * method GET, get Cities Object + * @params {string} search a search string + * @params {object} country a country object + * @params {AbortController} an abort controller + * @returns {Promise} a promise containing all Postal Code objects filtered with country and a search string + */ +const searchCities = (search, country, controller) => { + const url = '/api/1.0/main/postal-code/search.json?'; + const params = new URLSearchParams({q: search}); + + if (country !== null) { + Object.assign('country', country.id); + } + + return makeFetch('GET', url + params, null, {signal: controller.signal}) + .then(result => Promise.resolve(result.results)); +}; + +export { + fetchCities, + searchCities, +}; diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig index 586b900aa..7ab8a4c85 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig @@ -238,3 +238,9 @@
    {% endblock %} + +{% block pick_postal_code_widget %} + {{ form_help(form)}} + +
    +{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Tests/Form/Type/PickPostalCodeTypeTest.php b/src/Bundle/ChillMainBundle/Tests/Form/Type/PickPostalCodeTypeTest.php new file mode 100644 index 000000000..9c0174754 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Tests/Form/Type/PickPostalCodeTypeTest.php @@ -0,0 +1,67 @@ +factory->create(PickPostalCodeType::class, null); + + $form->submit(['1']); + + $this->assertTrue($form->isSynchronized()); + + $this->assertEquals(1, $form->getData()->getId()); + } + + protected function getExtensions() + { + $postalCodeRepository = $this->prophesize(PostalCodeRepositoryInterface::class); + $postalCodeRepository->find(Argument::type('string')) + ->will(static function ($args) { + $postalCode = new PostalCode(); + $reflectionClass = new ReflectionClass($postalCode); + $id = $reflectionClass->getProperty('id'); + $id->setAccessible(true); + $id->setValue($postalCode, (int) $args[0]); + + return $postalCode; + }); + + $type = new PickPostalCodeType( + new PostalCodeToIdTransformer( + $postalCodeRepository->reveal() + ) + ); + + return [ + new PreloadedExtension([$type], []), + ]; + } +} diff --git a/src/Bundle/ChillMainBundle/chill.webpack.config.js b/src/Bundle/ChillMainBundle/chill.webpack.config.js index 628f04ba5..73f539739 100644 --- a/src/Bundle/ChillMainBundle/chill.webpack.config.js +++ b/src/Bundle/ChillMainBundle/chill.webpack.config.js @@ -70,6 +70,7 @@ module.exports = function(encore, entries) encore.addEntry('mod_entity_workflow_subscribe', __dirname + '/Resources/public/module/entity-workflow-subscribe/index.js'); encore.addEntry('mod_entity_workflow_pick', __dirname + '/Resources/public/module/entity-workflow-pick/index.js'); encore.addEntry('mod_wopi_link', __dirname + '/Resources/public/module/wopi-link/index.js'); + encore.addEntry('mod_pick_postal_code', __dirname + '/Resources/public/module/pick-postal-code/index.js'); // Vue entrypoints encore.addEntry('vue_address', __dirname + '/Resources/public/vuejs/Address/index.js'); diff --git a/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php index 181677709..c27362e17 100644 --- a/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php @@ -11,7 +11,9 @@ declare(strict_types=1); namespace Chill\PersonBundle\Controller; +use Chill\MainBundle\Entity\PostalCode; use Chill\MainBundle\Entity\User; +use Chill\MainBundle\Form\Type\PickPostalCodeType; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Pagination\PaginatorFactory; use Chill\MainBundle\Repository\UserRepository; @@ -92,12 +94,14 @@ class ReassignAccompanyingPeriodController extends AbstractController $form->handleRequest($request); $userFrom = $form['user']->getData(); + $postalCodes = $form['postal_code']->getData() instanceof PostalCode ? [$form['postal_code']->getData()] : []; $total = $this->accompanyingPeriodACLAwareRepository->countByUserOpenedAccompanyingPeriod($userFrom); $paginator = $this->paginatorFactory->create($total); $periods = $this->accompanyingPeriodACLAwareRepository - ->findByUserOpenedAccompanyingPeriod( + ->findByUserAndPostalCodesOpenedAccompanyingPeriod( $userFrom, + $postalCodes, ['openingDate' => 'ASC'], $paginator->getItemsPerPage(), $paginator->getCurrentPageFirstItemNumber() @@ -148,7 +152,9 @@ class ReassignAccompanyingPeriodController extends AbstractController { $data = [ 'user' => null, + 'postal_code' => null, ]; + $builder = $this->formFactory->createBuilder(FormType::class, $data, [ 'method' => 'get', 'csrf_protection' => false, ]); @@ -158,12 +164,17 @@ class ReassignAccompanyingPeriodController extends AbstractController 'label' => 'reassign.Current user', 'required' => false, 'help' => 'reassign.Choose a user and click on "Filter" to apply', + ]) + ->add('postal_code', PickPostalCodeType::class, [ + 'label' => 'reassign.Filter by postal code', + 'required' => false, + 'help' => 'reassign.Filter course which are located inside a postal code', ]); return $builder->getForm(); } - private function buildReassignForm(array $periodIds, ?User $userFrom): FormInterface + private function buildReassignForm(array $periodIds, ?User $userFrom = null): FormInterface { $defaultData = [ 'userFrom' => $userFrom, diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php index f5217bfa7..071f7b3eb 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php @@ -11,7 +11,9 @@ declare(strict_types=1); namespace Chill\PersonBundle\Repository; +use Chill\MainBundle\Entity\Address; use Chill\MainBundle\Entity\Location; +use Chill\MainBundle\Entity\PostalCode; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\UserJob; @@ -19,10 +21,14 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; +use Chill\PersonBundle\Entity\Household\PersonHouseholdAddress; use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; use DateTime; +use DateTimeImmutable; +use Doctrine\DBAL\Types\Types; +use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Security\Core\Security; use function count; @@ -49,7 +55,12 @@ final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodAC $this->centerResolverDispatcher = $centerResolverDispatcher; } - public function buildQueryOpenedAccompanyingCourseByUser(?User $user) + /** + * @param array|PostalCode[] + * + * @return QueryBuilder + */ + public function buildQueryOpenedAccompanyingCourseByUser(?User $user, array $postalCodes = []) { $qb = $this->accompanyingPeriodRepository->createQueryBuilder('ap'); @@ -65,6 +76,37 @@ final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodAC ->setParameter('now', new DateTime('now')) ->setParameter('draft', AccompanyingPeriod::STEP_DRAFT); + if ([] !== $postalCodes) { + $qb->join('ap.locationHistories', 'location_history') + ->leftJoin(PersonHouseholdAddress::class, 'person_address', Join::WITH, 'IDENTITY(location_history.personLocation) = IDENTITY(person_address.person)') + ->join( + Address::class, + 'address', + Join::WITH, + 'COALESCE(IDENTITY(location_history.addressLocation), IDENTITY(person_address.address)) = address.id' + ) + ->andWhere( + $qb->expr()->orX( + $qb->expr()->isNull('person_address'), + $qb->expr()->andX( + $qb->expr()->lte('person_address.validFrom', ':now'), + $qb->expr()->orX( + $qb->expr()->isNull('person_address.validTo'), + $qb->expr()->lt('person_address.validTo', ':now') + ) + ) + ) + ) + ->andWhere( + $qb->expr()->isNull('location_history.endDate') + ) + ->andWhere( + $qb->expr()->in('address.postcode', ':postal_codes') + ) + ->setParameter('now', new DateTimeImmutable('now'), Types::DATE_IMMUTABLE) + ->setParameter('postal_codes', $postalCodes); + } + return $qb; } @@ -77,6 +119,18 @@ final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodAC return $qb->getQuery()->getSingleScalarResult(); } + public function countByUserAndPostalCodesOpenedAccompanyingPeriod(?User $user, array $postalCodes): int + { + if (null === $user) { + return 0; + } + + return $this->buildQueryOpenedAccompanyingCourseByUser($user, $postalCodes) + ->select('COUNT(ap)') + ->getQuery() + ->getSingleScalarResult(); + } + public function countByUserOpenedAccompanyingPeriod(?User $user): int { if (null === $user) { @@ -158,6 +212,24 @@ final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodAC return $qb->getQuery()->getResult(); } + public function findByUserAndPostalCodesOpenedAccompanyingPeriod(?User $user, array $postalCodes, array $orderBy = [], int $limit = 0, int $offset = 50): array + { + if (null === $user) { + return []; + } + + $qb = $this->buildQueryOpenedAccompanyingCourseByUser($user); + + $qb->setFirstResult($offset) + ->setMaxResults($limit); + + foreach ($orderBy as $field => $direction) { + $qb->addOrderBy('ap.' . $field, $direction); + } + + return $qb->getQuery()->getResult(); + } + /** * @return array|AccompanyingPeriod[] */ diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php index 6dd44b290..0cca1a5f4 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Repository; +use Chill\MainBundle\Entity\PostalCode; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\UserJob; @@ -25,6 +26,11 @@ interface AccompanyingPeriodACLAwareRepositoryInterface */ public function countByUnDispatched(array $jobs, array $services, array $administrativeLocations): int; + /** + * @param array|PostalCode[] $postalCodes + */ + public function countByUserAndPostalCodesOpenedAccompanyingPeriod(?User $user, array $postalCodes): int; + public function countByUserOpenedAccompanyingPeriod(?User $user): int; public function findByPerson( @@ -43,5 +49,10 @@ interface AccompanyingPeriodACLAwareRepositoryInterface */ public function findByUnDispatched(array $jobs, array $services, array $administrativeLocations, ?int $limit = null, ?int $offset = null): array; + /** + * @param array|PostalCode[] $postalCodes + */ + public function findByUserAndPostalCodesOpenedAccompanyingPeriod(?User $user, array $postalCodes, array $orderBy = [], int $limit = 0, int $offset = 50): array; + public function findByUserOpenedAccompanyingPeriod(?User $user, array $orderBy = [], int $limit = 0, int $offset = 50): array; } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/reassign_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/reassign_list.html.twig index 63e25efeb..fb22f5153 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/reassign_list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/reassign_list.html.twig @@ -5,11 +5,13 @@ {% block js %} {{ encore_entry_script_tags('mod_set_referrer') }} {{ encore_entry_script_tags('mod_pickentity_type') }} + {{ encore_entry_script_tags('mod_pick_postal_code') }} {% endblock %} {% block css %} {{ encore_entry_link_tags('mod_set_referrer') }} {{ encore_entry_link_tags('mod_pickentity_type') }} + {{ encore_entry_link_tags('mod_pick_postal_code') }} {% endblock %} {% macro period_meta(period) %} @@ -48,6 +50,8 @@ {{ form_start(form) }} {{ form_label(form.user ) }} {{ form_widget(form.user, {'attr': {'class': 'select2'}}) }} + {{ form_label(form.postal_code) }} + {{ form_widget(form.postal_code) }}