diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cc494f42..fe31f6b55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,19 +9,40 @@ and this project adheres to * date versioning for test releases ## Unreleased -* [person] residential address: show residential address or info in PersonRenderBox, refactor Residential Address (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/439) -* AddPersons: remove ul-li html tags from AddPersons (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/419) + +* [person] Order social issues by the field "ordering" (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/388) +* [Person/Household list] when listing other simultaneous members of an household, exclude the members on person, not on members (avoid to show two membersship with the same person) +* [Person] Display suffixText in RenderPerson, PersonText.vue, RenderPersonBox.vue (was made for displaying "enfant confie") (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/441) +* [person] residential address: show residential address or info in PersonRenderBox, refactor Residential Address (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/439) +* [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345) + +## Test releases + +### test release 2022-02-21 + +* [notifications] Word 'un' changed to number '1' for notifications in user menu (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/483) +* [documents] 'gabarit' changed to 'modèle' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/405) +* [person_resources] Menu name and order changed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/460) +* workflow: fix sending notifications +* [thirdparty] Extend the thirdparty search to thirdparty children (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/448) * [person]: AddPersons: allow creation of person or thirdparty only (no users) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/422) * [person]: AddPersons: allow creation of person or thirdparty depending on allowed types (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/422) * [person]: AddPersons: add suggestion of name when creating new person or thirdparty (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/422) * [main] Address: fix small bug: when modifying an address without street (isNoAddress), also check errors if street is an empty string as back-end change null value to empty string for street (and streetNumber) * [main] Address: stronger client-side validation of addresses (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/449) - - - - -## Test releases +* [person] accompanying course: filter suggested entities by open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/415) +[activity] can click through the cross icon for removing person in concerned group (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476) +[activity] correct associated persons by considering only open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476) +* [person_resources]: Renderboxes used to display person/thirdparty info (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/465) +* [Household]: Add end date in HouseholdMember form for 'enfant hors menage' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/434) +* [homepage_widget]: If no sender then display as 'notification automatique' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/435) +* [parcours]: Order social activities and only display most recent three in parcours resumé (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/481) +* [3party]: 3party: redirect to parent when contact (child) is opened in view page +* [parcours / addresses]: launch an event when a person change address (either through changing household or because the household is associated to a new address). If the person is localising a course, the course location go back to a temporarily address. +* Creation of PickCivilityType, and implementation in PersonType and ThirdpartyType +* [renderbox]: Fix display of address (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/462) +* [renderbox]: Add email in personRenderBox, this was not yet displayed. ### test release 2022-02-14 @@ -47,7 +68,7 @@ and this project adheres to * [address]: Correction residential address 'depuis le' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/459) * [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414) * [Thirdparty_contact]: address blurred if confidential in view page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/450) -* [homepage_widget]: If no sender then display as 'notification automatique' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/435) + ### test release 2021-02-01 @@ -68,7 +89,19 @@ and this project adheres to * [AddAddress] disable multiselect search, and rely only on most pertinent Cities and Street computed backend * [fast_actions] improve fast-actions buttons override mechanism, fix https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/413 * [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc. +* [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345) + +## Test releases +======= +* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc. +>>>>>>> issue422_and_others_on_AddPersons + +======= +* [homepage widget] add vue homepage_widget with asynchone loading, give a global view resume of the user concerned actions, notifications, etc. +* [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345) + +>>>>>>> b0d50d315c8e00959a967badac9cf5057ab2b4bc ### test release 2021-01-31 * [person] accompanying course: optimisation: do not fetch some resources for the banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/409) diff --git a/phpstan-critical.neon b/phpstan-critical.neon index 632356aa6..262d3012f 100644 --- a/phpstan-critical.neon +++ b/phpstan-critical.neon @@ -25,11 +25,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php - - - message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Household\\\\MembersEditorFactory\\:\\:\\$validator\\.$#" - count: 2 - path: src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php - - message: "#^Variable variables are not allowed\\.$#" count: 4 diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon index 7489d4d80..1e80ab775 100644 --- a/phpstan-deprecations.neon +++ b/phpstan-deprecations.neon @@ -105,15 +105,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\ListActivity\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php - - message: """ @@ -141,15 +132,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\ActivityDateFilter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php - - message: """ @@ -195,15 +177,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Export\\\\Filter\\\\PersonHavingActivityBetweenDateFilter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php - - message: """ @@ -213,15 +186,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\ActivityBundle\\\\Menu\\\\PersonMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php - - message: """ @@ -258,15 +222,6 @@ parameters: count: 1 path: src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\AsideActivityBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php - - message: """ @@ -276,15 +231,6 @@ parameters: count: 1 path: src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\AMLI\\\\BudgetBundle\\\\Controller\\\\AbstractElementController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php - - message: """ @@ -294,24 +240,6 @@ parameters: count: 1 path: src/Bundle/ChillBudgetBundle/Controller/ElementController.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\AMLI\\\\BudgetBundle\\\\Controller\\\\ElementController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillBudgetBundle/Controller/ElementController.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\AMLI\\\\BudgetBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillBudgetBundle/Menu/UserMenuBuilder.php - - message: """ @@ -321,15 +249,6 @@ parameters: count: 1 path: src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\CalendarBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php - - message: """ @@ -399,15 +318,6 @@ parameters: count: 1 path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\CustomFieldsBundle\\\\Form\\\\CustomFieldsGroupType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php - - message: """ @@ -417,15 +327,6 @@ parameters: count: 6 path: src/Bundle/ChillEventBundle/Controller/EventController.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\EventBundle\\\\Controller\\\\EventController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillEventBundle/Controller/EventController.php - - message: """ @@ -444,42 +345,6 @@ parameters: count: 1 path: src/Bundle/ChillEventBundle/Form/Type/PickEventType.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\EventBundle\\\\Form\\\\Type\\\\PickEventType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillEventBundle/Form/Type/PickEventType.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\EventBundle\\\\Form\\\\Type\\\\PickRoleType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\EventBundle\\\\Form\\\\Type\\\\PickStatusType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\EventBundle\\\\Menu\\\\PersonMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php - - message: """ @@ -489,24 +354,6 @@ parameters: count: 1 path: src/Bundle/ChillEventBundle/Search/EventSearch.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\AMLI\\\\FamilyMembersBundle\\\\Controller\\\\FamilyMemberController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillFamilyMembersBundle/Controller/FamilyMemberController.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\AMLI\\\\FamilyMembersBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillFamilyMembersBundle/Menu/UserMenuBuilder.php - - message: """ @@ -516,24 +363,6 @@ parameters: count: 1 path: src/Bundle/ChillFamilyMembersBundle/Security/Voter/FamilyMemberVoter.php - - - message: - """ - #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php - - - - message: - """ - #^Fetching class constant class of deprecated class Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php - - message: """ @@ -543,15 +372,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php - - - message: - """ - #^Return type of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:getTranslator\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php - - message: """ @@ -570,24 +390,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Controller/ExportController.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\MainBundle\\\\Controller\\\\PasswordController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Controller/PasswordController.php - - message: """ @@ -660,42 +462,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Export/ExportManager.php - - - message: - """ - #^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\CSVListFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php - - - - message: - """ - #^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\CSVPivotedListFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php - - - - message: - """ - #^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\SpreadSheetFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php - - - - message: - """ - #^Parameter \\$translatorInterface of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\SpreadsheetListFormatter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php - - message: """ @@ -714,15 +480,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\MainBundle\\\\Form\\\\Type\\\\PostalCodeType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php - - message: """ @@ -746,38 +503,11 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Form/UserType.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\MainBundle\\\\Notification\\\\Mailer\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Notification/Mailer.php - - message: "#^Only booleans are allowed in an if condition, mixed given\\.$#" count: 2 path: src/Bundle/ChillMainBundle/Repository/NotificationRepository.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\MainBundle\\\\Routing\\\\MenuBuilder\\\\SectionMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\MainBundle\\\\Routing\\\\MenuComposer\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Routing/MenuComposer.php - - message: """ @@ -864,15 +594,6 @@ parameters: count: 1 path: src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\MainBundle\\\\Validation\\\\Validator\\\\RoleScopeScopePresence\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php - - message: """ @@ -918,33 +639,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\HouseholdController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Controller/HouseholdController.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\HouseholdMemberController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\PersonController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Controller/PersonController.php - - message: """ @@ -954,15 +648,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Controller\\\\PersonDuplicateController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php - - message: "#^Access to deprecated property \\$proxyAccompanyingPeriodOpenState of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\.$#" count: 2 @@ -977,15 +662,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Export/Aggregator/AgeAggregator.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\CountryOfBirthAggregator\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php - - message: """ @@ -995,15 +671,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\GenderAggregator\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php - - message: """ @@ -1013,15 +680,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Export/Aggregator/GenderAggregator.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Aggregator\\\\NationalityAggregator\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php - - message: """ @@ -1058,15 +716,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPerson\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php - - message: """ @@ -1094,15 +743,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Export\\\\ListPersonDuplicate\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php - - message: """ @@ -1148,15 +788,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Export/Filter/BirthdateFilter.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Export\\\\Filter\\\\GenderFilter\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Export/Filter/GenderFilter.php - - message: """ @@ -1198,24 +829,6 @@ parameters: count: 1 path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Form\\\\Type\\\\PickPersonType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\PersonBundle\\\\Menu\\\\SectionMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php - - message: """ @@ -1279,15 +892,6 @@ parameters: count: 1 path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\ReportBundle\\\\Export\\\\Export\\\\ReportList\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php - - message: """ @@ -1297,15 +901,6 @@ parameters: count: 1 path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\ReportBundle\\\\Export\\\\Export\\\\ReportListProvider\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php - - message: """ @@ -1387,15 +982,6 @@ parameters: count: 1 path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Controller\\\\TaskController\\:\\:applyTransitionAction\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillTaskBundle/Controller/TaskController.php - - message: """ @@ -1441,33 +1027,6 @@ parameters: count: 1 path: src/Bundle/ChillTaskBundle/Form/SingleTaskType.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Menu\\\\MenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Menu\\\\SectionMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\TaskBundle\\\\Menu\\\\UserMenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php - - message: """ @@ -1504,33 +1063,6 @@ parameters: count: 3 path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php - - - message: - """ - #^Parameter \\$translator of method Chill\\\\ThirdPartyBundle\\\\Controller\\\\ThirdPartyController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\ThirdPartyBundle\\\\Form\\\\Type\\\\PickThirdPartyType\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php - - - - message: - """ - #^Parameter \\$translator of method Chill\\\\ThirdPartyBundle\\\\Menu\\\\MenuBuilder\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\: - since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$# - """ - count: 1 - path: src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php - - message: """ diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 33107d40b..392b3026a 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + 'ChillActivityBundle:ActivityReasonCategory' @@ -47,6 +47,11 @@ Activity[]|array + + + AppKernel + + require __DIR__ . '/../../../../../vendor/autoload.php' @@ -164,72 +169,18 @@ type - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - public function setUp() - \Chill\PersonBundle\Export\Filter\PersonHavingActivityBetweenDateFilter - - - public function setUp() - - - - public function setUp() - Prophecy\Prophet - - - public function setUp() - - - - public function setUp() - type @@ -254,11 +205,6 @@ $asideActivityCategory - - - public function setUp() - - $calculator::getAlias() @@ -288,11 +234,6 @@ 'ChillCalendarBundle:Calendar' - - - public function setUp() - - 'ChillCustomFieldsBundle:CustomFieldsGroup' @@ -397,10 +338,6 @@ - - public function setUp() - public function tearDown() - type type @@ -408,61 +345,6 @@ type - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - 'ChillDocStoreBundle:AccompanyingCourseDocument' - - 'ChillDocStoreBundle:DocumentCategory' @@ -470,11 +352,6 @@ 'ChillDocStoreBundle:DocumentCategory' - - - 'ChillDocStoreBundle:PersonDocument' - - \Chill\PersonBundle\Entity\user @@ -570,9 +447,6 @@ type - - public function setUp() - 'ChillEventBundle:Event' 'ChillEventBundle:Event' @@ -588,10 +462,6 @@ - - public function setUp() - public function tearDown() - 'ChillMainBundle:Scope' @@ -891,11 +761,6 @@ OptionsResolverInterface - - - \Symfony\Component\Mailer\Exception\TransportExceptionInterface - - $current @@ -924,11 +789,6 @@ $onlyEnabled - - - AppKernel - - require __DIR__ . '/../../../../../vendor/autoload.php' @@ -1056,158 +916,15 @@ - - public function setUp() - type - - - public function setUp() - - - - - public function setUp() - - - - - protected function tearDown() - public function setUp() - - - - - public function setUp() - public function tearDown() - - - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - $this->prophet - Prophecy\Prophet - - - - - CenterType - - - CenterType - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - public function setUp() - unknown - - - public function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - unknown @@ -1412,20 +1129,6 @@ OptionsResolverInterface - - - $qb - $qb - $qb - QueryBuilder - SocialAction - SocialAction - - - $action - $orderBy - - AppKernel @@ -1505,33 +1208,13 @@ - - public function setUp() - public static function setUpBeforeClass() - AccompanyingPeriodRepository stdClass - - - public function setUp() - public static function setUpBeforeClass() - - - - - public function setUp() - - - - public function setUp() - public function tearDown() - public static function setUpBeforeClass() - 'ChillMainBundle:Center' 'ChillPersonBundle:AccompanyingPeriod\ClosingMotive' @@ -1543,40 +1226,19 @@ - - protected function tearDown() - User - - - protected function setUp() - - $this - - public function setUp() - public static function setUpBeforeClass() - 'ChillPersonBundle:Person' - - - public static function tearDownAfterClass() - - - - public function setUp() - public function tearDown() - 'ChillMainBundle:Country' 'ChillPersonBundle:Person' @@ -1586,140 +1248,25 @@ - - public function setUp() - public function tearDown() - 'ChillMainBundle:Country' 'ChillPersonBundle:Person' - - public function setUp() - public function tearDown() - 'ChillPersonBundle:Person' - - public function setUp() - public function tearDown() - 'ChillPersonBundle:Person' - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - $participationL - - getEndDate - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - public function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - - - - - protected function setUp() - @@ -1820,20 +1367,13 @@ require __DIR__ . '/../../../../../vendor/autoload.php' - - - public function setUp() - - type - - public function setUp() - public static function setUpBeforeClass() - - + + $client + $client $client $client $client @@ -1865,16 +1405,7 @@ type - - - Exception - - - - public function setUp() - public static function setUpBeforeClass() - type type @@ -1882,10 +1413,6 @@ - - public function setUp() - public function tearDown() - 'ChillCustomFieldsBundle:CustomFieldsGroup' @@ -1958,11 +1485,6 @@ CacheItempPoolInterface - - - protected function setUp() - - $taggedService->getClass()::getKey() @@ -1988,11 +1510,6 @@ $thirdParty - - - protected function setUp() - - $object diff --git a/src/Bundle/ChillActivityBundle/Entity/Activity.php b/src/Bundle/ChillActivityBundle/Entity/Activity.php index 2bb40d432..0a344236c 100644 --- a/src/Bundle/ChillActivityBundle/Entity/Activity.php +++ b/src/Bundle/ChillActivityBundle/Entity/Activity.php @@ -357,7 +357,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac if (null !== $this->accompanyingPeriod) { $personsAssociated = []; - foreach ($this->accompanyingPeriod->getParticipations() as $participation) { + foreach ($this->accompanyingPeriod->getOpenParticipations() as $participation) { if ($this->persons->contains($participation->getPerson())) { $personsAssociated[] = $participation->getPerson(); } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php index 07153fc2c..a99decc6c 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/ListActivity.php @@ -24,9 +24,9 @@ use Doctrine\ORM\Query; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Role\Role; -use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Constraints\Callback; use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use function array_key_exists; use function count; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php index 00a9ac382..6048a1cc0 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php @@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; class ActivityDateFilter implements FilterInterface { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php index f162ed2ef..312486b49 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonHavingActivityBetweenDateFilter.php @@ -29,8 +29,8 @@ use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; use Symfony\Component\Form\FormInterface; -use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use function count; diff --git a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php index 34b18f078..56c21051f 100644 --- a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php @@ -15,7 +15,7 @@ use Chill\ActivityBundle\Security\Authorization\ActivityVoter; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; use Knp\Menu\MenuItem; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; class PersonMenuBuilder implements LocalMenuBuilderInterface { diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups/PersonBadge.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups/PersonBadge.vue index 0a611e217..11b8063a3 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups/PersonBadge.vue +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups/PersonBadge.vue @@ -1,7 +1,7 @@ + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index 648319079..2f3c191b3 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -12,6 +12,7 @@ {{ person.firstName }} {{ person.lastName }} +  {{ person.suffixText }} {{ altNameLabel }} @@ -20,6 +21,7 @@ {{ person.firstName }} {{ person.lastName }} +  {{ person.suffixText }} (‡) {{ altNameLabel }} @@ -85,6 +87,15 @@

+
  • + + {{ person.email }} +
  • +
  • + +

    {{ $t('renderbox.no_data') }}

    +
  • +
  • {{ person.mobilenumber }} diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue index 8f89649d8..8b991e3da 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonText.vue @@ -6,6 +6,7 @@ ({{ altNameLabel }}) +  {{ person.suffixText }} {{ $tc('renderbox.years_old', person.age) }}  (‡) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/notification_location_user_on_period_has_moved.fr.txt.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/notification_location_user_on_period_has_moved.fr.txt.twig new file mode 100644 index 000000000..e4509d78a --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/notification_location_user_on_period_has_moved.fr.txt.twig @@ -0,0 +1,22 @@ +{# + content of the notification if the person move and the person "localize" the period +#}{{ period.user.label }}, + +L'usager {{ oldPersonLocation|chill_entity_render_string }} a déménagé. + +Son adresse était utilisée pour localiser le parcours n°{{ period.id }}, dont vous êtes +le référent. + +En conséquence de ce déménage, le parcours est toujours localisé à cette adresse, mais à l'aide d'une +adresse temporaire. + +Si vous continuez à suivre le parcours, vous pouvez le localiser à nouveau auprès de l'adresse de +l'usager {{ oldPersonLocation|chill_entity_render_string }}. + +Sinon, veillez à vous assurer de la continuité du suivi par vos collègues. + +Pour visualiser le parcours, cliquez ici: + +{{ absolute_url(path('chill_person_accompanying_course_index', {'accompanying_period_id': period.id})) }} + +Cordialement, diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index 9bee504a9..e3280d755 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -12,6 +12,7 @@ * hLevel integer * addDeath bool * addAgeBadge bool + * suffixText bool * address_multiline bool * customButtons [ 'before' Twig\Markup, (injected with macro) @@ -46,6 +47,11 @@ ({{- 'years_old'|trans({ 'age': person.age }) -}}) {% endif %} {% endif %} + {%- if options['suffixText'] is defined -%} + {% for o in options['suffixText'] %} + {{ o }} + {% endfor %} + {% endif %} {% endmacro raw %} {% macro label(person, options) %} @@ -172,7 +178,7 @@ {%- if options['customButtons']['replace'] is defined -%} {{ options['customButtons']['replace'] }} - {%- elseif is_granted('CHILL_PERSON_SEE', person) -%} + {%- elseif is_granted('CHILL_PERSON_SEE', person) and options['addLink'] -%}
  • diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Macro/updatedBy.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Macro/updatedBy.html.twig index a0be22ffc..e40cbd3f7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Macro/updatedBy.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Macro/updatedBy.html.twig @@ -3,10 +3,27 @@ {{ 'Last updated on'|trans }} {{ entity.updatedAt|format_datetime('medium', 'short') }} - , - {{ 'by_user'|trans }} - - {{ entity.updatedBy|chill_entity_render_box }} + {% if entity.updatedBy %} + {{ ', ' ~ 'by_user'|trans }} + + {{ entity.updatedBy|chill_entity_render_box }} + + {% endif %} + +{% endmacro %} + +{% macro createdBy(entity) %} +
    + {{ 'Created on'|trans }} + + {{ entity.createdAt|format_datetime('medium', 'short') }} + + {% if entity.createdBy %} + {{ ', ' ~ 'by_user'|trans }} + + {{ entity.createdBy|chill_entity_render_string }} + + {% endif %}
    {% endmacro %} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/form.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/form.html.twig index 6fa294336..9bda2856b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/form.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonResource/form.html.twig @@ -56,6 +56,11 @@ {% if action is defined %}
      +
    • + + {{ 'Cancel'|trans }} + +
    - +
    @@ -98,6 +124,15 @@ aria-describedby="phonenumber" />
    +
    +
    + + +
    +
    @@ -106,10 +141,11 @@ import ThirdPartyRenderBox from '../Entity/ThirdPartyRenderBox.vue'; import AddAddress from 'ChillMainAssets/vuejs/Address/components/AddAddress'; import { getThirdparty } from '../../_api/OnTheFly'; import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue'; +import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods'; export default { name: "OnTheFlyThirdParty", - props: ['id', 'type', 'action', 'query'], + props: ['id', 'type', 'action', 'query', 'parent'], components: { ThirdPartyRenderBox, AddAddress, @@ -120,7 +156,15 @@ export default { //context: {}, <-- thirdparty: { type: 'thirdparty', + address: null, + kind: 'company', + name: '', + telephone: '', + civility: null, + profession: null, }, + professions: [], + civilities: [], addAddress: { options: { openPanesInModal: true, @@ -129,27 +173,27 @@ export default { size: 'btn-sm' }, title: { - create: 'add_an_address_title', - edit: 'edit_address' + create: 'add_an_address_title', + edit: 'edit_address' } } } } }, computed: { - kind: { - get() { - // note: there are also default to 'institution' set in the "mounted" method - if (this.$data.thirdparty.kind !== undefined) { - return this.$data.thirdparty.kind; - } else { - return 'company'; - } - }, - set(v) { - this.$data.thirdparty.kind = v; - } - }, + kind: { + get() { + // note: there are also default to 'institution' set in the "mounted" method + if (this.$data.thirdparty.kind !== undefined) { + return this.$data.thirdparty.kind; + } else { + return 'company'; + } + }, + set(v) { + this.$data.thirdparty.kind = v; + } + }, context() { let context = { target: { @@ -160,10 +204,10 @@ export default { addressId: null }; if ( !(this.thirdparty.address === undefined || this.thirdparty.address === null) - && this.thirdparty.address.address_id !== null + && this.thirdparty.address.address_id !== null ) { // to complete - context.addressId = this.thirdparty.address.address_id; - context.edit = true; + context.addressId = this.thirdparty.address.address_id; + context.edit = true; } console.log('context', context); //this.context = context; <-- @@ -172,38 +216,73 @@ export default { }, methods: { loadData(){ - getThirdparty(this.id).then(thirdparty => new Promise((resolve, reject) => { + return getThirdparty(this.id).then(thirdparty => new Promise((resolve, reject) => { this.thirdparty = thirdparty; this.thirdparty.kind = thirdparty.kind; - //console.log('get thirdparty', thirdparty); + console.log('get thirdparty', thirdparty); if (this.action !== 'show') { - if (thirdparty.address !== null) { - // bof! we force getInitialAddress because addressId not available when mounted - this.$refs.addAddress.getInitialAddress(thirdparty.address.address_id); - } + if (thirdparty.address !== null) { + // bof! we force getInitialAddress because addressId not available when mounted + this.$refs.addAddress.getInitialAddress(thirdparty.address.address_id); + } } resolve(); })); }, + loadCivilities() { + const url = `/api/1.0/main/civility.json`; + return makeFetch('GET', url) + .then(response => { + this.$data.civilities = response.results; + return Promise.resolve(); + }) + .catch((error) => { + console.log(error) + this.$toast.open({message: error.body}) + }) + }, + loadProfessions() { + const url = `/api/1.0/thirdparty/professions.json`; + return makeFetch('GET', url) + .then(response => { + this.$data.professions = response.results; + return Promise.resolve(); + }) + .catch((error) => { + console.log(error) + this.$toast.open({message: error.body}) + }) + }, submitAddress(payload) { console.log('submitAddress', payload); if (typeof payload.addressId !== 'undefined') { // <-- - this.context.edit = true; - this.context.addressId = payload.addressId; // bof! use legacy and not legacy in payload - this.thirdparty.address = payload.address; // <-- - console.log('switch address to edit mode', this.context); - } + this.context.edit = true; + this.context.addressId = payload.addressId; // bof! use legacy and not legacy in payload + this.thirdparty.address = payload.address; // <-- + console.log('switch address to edit mode', this.context); + } }, addQuery(query) { - this.thirdparty.text = query; - } + this.thirdparty.name = query; + }, }, - mounted() { - //console.log('mounted', this.action); + mounted() { + let dependencies = []; + dependencies.push(this.loadProfessions()); + dependencies.push(this.loadCivilities()); if (this.action !== 'create') { - this.loadData(); + if (this.id) { + dependencies.push(this.loadData()); + // here we can do something when all promises are resolve, with + // Promise.all(dependencies).then(() => { /* do something */ }); + } + if (this.action === 'addContact') { + this.$data.thirdparty.kind = 'child' + // this.$data.thirdparty.parent = this.parent.id + this.$data.thirdparty.address = null + } } else { - this.thirdparty.kind = 'company'; + this.thirdparty.kind = 'company'; } }, } @@ -224,5 +303,16 @@ dl { margin-left: 1em; } } +.parent-info { + margin-bottom: 1rem; +} + +#child-info { + display: flex; + justify-content: space-between; + div { + width: 49%; + } +} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js index 37d09320d..76f01e3f4 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js @@ -4,7 +4,12 @@ const thirdpartyMessages = { name: "Dénomination", email: "Courriel", phonenumber: "Téléphone", - } + comment: "Commentaire", + profession: "Qualité", + civility: "Civilité" + }, + child_of: "Contact de: ", + children: "Personnes de contact: ", } }; diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig index 6b76b5cb0..4827ba19c 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig @@ -23,15 +23,15 @@ {{ form_row(form.contactDataAnonymous) }} {% endif %} +{% if form.address is defined %} + {{ form_row(form.address) }} +{% endif %} + {% if form.activeChildren is defined %}

    {{ 'Contacts'|trans }}

    {{ form_widget(form.activeChildren) }} {% endif %} -{% if form.address is defined %} - {{ form_row(form.address) }} -{% endif %} - {{ form_row(form.comment) }} {% if form.centers is defined %} diff --git a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php index 994b9d65c..e4b7f43af 100644 --- a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php +++ b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php @@ -87,14 +87,24 @@ class ThirdPartyApiSearch implements SearchApiInterface foreach ($strs as $str) { if (!empty($str)) { $wheres[] = "(LOWER(UNACCENT(?)) <<% tparty.canonicalized OR - tparty.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%')"; - $whereArgs[] = [$str, $str]; - $pertinence[] = 'STRICT_WORD_SIMILARITY(LOWER(UNACCENT(?)), tparty.canonicalized) + ' . - "(tparty.canonicalized LIKE '%s' || LOWER(UNACCENT(?)) || '%')::int + " . + tparty.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%') + OR + (LOWER(UNACCENT(?)) <<% parent.canonicalized OR + parent.canonicalized LIKE '%' || LOWER(UNACCENT(?)) || '%') + "; + $whereArgs[] = [$str, $str, $str, $str]; + $pertinence[] = 'GREATEST( + STRICT_WORD_SIMILARITY(LOWER(UNACCENT(?)), tparty.canonicalized), + STRICT_WORD_SIMILARITY(LOWER(UNACCENT(?)), parent.canonicalized) + ) + ' . + "GREATEST( + (tparty.canonicalized LIKE '%s' || LOWER(UNACCENT(?)) || '%')::int, + (parent.canonicalized LIKE '%s' || LOWER(UNACCENT(?)) || '%')::int + ) + " . // take postcode label into account, but lower than the canonicalized field "COALESCE((LOWER(UNACCENT(cmpc.label)) LIKE '%' || LOWER(UNACCENT(?)) || '%')::int * 0.3, 0) + " . "COALESCE((LOWER(UNACCENT(cmpc_p.label)) LIKE '%' || LOWER(UNACCENT(?)) || '%')::int * 0.3, 0)"; - $pertinenceArgs[] = [$str, $str, $str, $str]; + $pertinenceArgs[] = [$str, $str, $str, $str, $str, $str]; } } diff --git a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php index 6ffcc2dea..d518a9f2b 100644 --- a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php +++ b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php @@ -36,6 +36,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf { return [ 'type' => 'thirdparty', + 'name' => $thirdParty->getName(), 'text' => $this->thirdPartyRender->renderString($thirdParty, []), 'id' => $thirdParty->getId(), 'kind' => $thirdParty->getKind(), @@ -45,6 +46,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf 'isChild' => $thirdParty->isChild(), 'parent' => $this->normalizer->normalize($thirdParty->getParent(), $format, $context), 'civility' => $this->normalizer->normalize($thirdParty->getCivility(), $format, $context), + 'profession' => $this->normalizer->normalize($thirdParty->getProfession(), $format, $context), 'contactDataAnonymous' => $thirdParty->isContactDataAnonymous(), ]; } diff --git a/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml b/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml index 52db7589c..eb303a4f0 100644 --- a/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml @@ -110,3 +110,14 @@ paths: description: "OK" 422: description: "Object with validation errors" + + /1.0/thirdparty/professions.json: + get: + tags: + - thirdparty + summary: Return all thirdparty professions + responses: + 200: + description: "ok" + 401: + description: "Unauthorized" diff --git a/src/Bundle/ChillThirdPartyBundle/config/services/menu.yaml b/src/Bundle/ChillThirdPartyBundle/config/services/menu.yaml index 21f271b58..4b6ffd83f 100644 --- a/src/Bundle/ChillThirdPartyBundle/config/services/menu.yaml +++ b/src/Bundle/ChillThirdPartyBundle/config/services/menu.yaml @@ -1,7 +1,7 @@ services: Chill\ThirdPartyBundle\Menu\MenuBuilder: arguments: - $translator: '@Symfony\Component\Translation\TranslatorInterface' + $translator: '@Symfony\Contracts\Translation\TranslatorInterface' $authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface' tags: - { name: 'chill.menu_builder' }