Merge remote-tracking branch 'origin/master' into issue439_residential_address_otf

This commit is contained in:
Julien Fastré 2022-02-28 15:11:50 +01:00
commit cdd21c94c6
166 changed files with 2682 additions and 1555 deletions

View File

@ -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)
<!-- write down unreleased development here -->
* [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)
<!-- write down unreleased development here -->
## 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)

View File

@ -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

View File

@ -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:
"""

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="v4.15.0@a1b5e489e6fcebe40cb804793d964e99fc347820">
<files psalm-version="4.18.0.0">
<file src="src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php">
<UndefinedClass occurrences="4">
<code>'ChillActivityBundle:ActivityReasonCategory'</code>
@ -47,6 +47,11 @@
<code>Activity[]|array</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/AppKernel.php">
<DuplicateClass occurrences="1">
<code>AppKernel</code>
</DuplicateClass>
</file>
<file src="src/Bundle/ChillActivityBundle/Resources/test/Fixtures/App/app/autoload.php">
<MissingFile occurrences="1">
<code>require __DIR__ . '/../../../../../vendor/autoload.php'</code>
@ -164,72 +169,18 @@
<code>type</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Export/CountActivityTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Export/ListActivityTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Export/StatActivityDurationSumTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
<UndefinedDocblockClass occurrences="1">
<code>\Chill\PersonBundle\Export\Filter\PersonHavingActivityBetweenDateFilter</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
<TooFewArguments occurrences="2"/>
<UndefinedDocblockClass occurrences="1">
<code>Prophecy\Prophet</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
<UndefinedDocblockClass occurrences="1">
<code>type</code>
</UndefinedDocblockClass>
@ -254,11 +205,6 @@
<code>$asideActivityCategory</code>
</ParamNameMismatch>
</file>
<file src="src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php">
<InvalidStaticInvocation occurrences="3">
<code>$calculator::getAlias()</code>
@ -288,11 +234,6 @@
<code>'ChillCalendarBundle:Calendar'</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php">
<UndefinedClass occurrences="1">
<code>'ChillCustomFieldsBundle:CustomFieldsGroup'</code>
@ -397,10 +338,6 @@
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public function tearDown()</code>
</MethodSignatureMismatch>
<UndefinedDocblockClass occurrences="4">
<code>type</code>
<code>type</code>
@ -408,61 +345,6 @@
<code>type</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php">
<UndefinedClass occurrences="1">
<code>'ChillDocStoreBundle:AccompanyingCourseDocument'</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillDocStoreBundle/Controller/DocumentCategoryController.php">
<UndefinedClass occurrences="3">
<code>'ChillDocStoreBundle:DocumentCategory'</code>
@ -470,11 +352,6 @@
<code>'ChillDocStoreBundle:DocumentCategory'</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php">
<UndefinedClass occurrences="1">
<code>'ChillDocStoreBundle:PersonDocument'</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillDocStoreBundle/Entity/Document.php">
<UndefinedDocblockClass occurrences="1">
<code>\Chill\PersonBundle\Entity\user</code>
@ -570,9 +447,6 @@
<InvalidParamDefault occurrences="1">
<code>type</code>
</InvalidParamDefault>
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="8">
<code>'ChillEventBundle:Event'</code>
<code>'ChillEventBundle:Event'</code>
@ -588,10 +462,6 @@
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public function tearDown()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="1">
<code>'ChillMainBundle:Scope'</code>
</UndefinedClass>
@ -891,11 +761,6 @@
<code>OptionsResolverInterface</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillMainBundle/Notification/Mailer.php">
<UndefinedDocblockClass occurrences="1">
<code>\Symfony\Component\Mailer\Exception\TransportExceptionInterface</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillMainBundle/Pagination/PageGenerator.php">
<UndefinedVariable occurrences="1">
<code>$current</code>
@ -924,11 +789,6 @@
<code>$onlyEnabled</code>
</ParamNameMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/AppKernel.php">
<DuplicateClass occurrences="1">
<code>AppKernel</code>
</DuplicateClass>
</file>
<file src="src/Bundle/ChillMainBundle/Resources/test/Fixtures/App/app/autoload.php">
<MissingFile occurrences="1">
<code>require __DIR__ . '/../../../../../vendor/autoload.php'</code>
@ -1056,158 +916,15 @@
</UndefinedClass>
</file>
<file src="src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
<UndefinedDocblockClass occurrences="1">
<code>type</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php">
<MethodSignatureMismatch occurrences="2">
<code>protected function tearDown()</code>
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public function tearDown()</code>
</MethodSignatureMismatch>
<UndefinedDocblockClass occurrences="40">
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>$this-&gt;prophet</code>
<code>Prophecy\Prophet</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php">
<UndefinedClass occurrences="1">
<code>CenterType</code>
</UndefinedClass>
<UndefinedDocblockClass occurrences="1">
<code>CenterType</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
<UndefinedDocblockClass occurrences="1">
<code>unknown</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php">
<UndefinedDocblockClass occurrences="1">
<code>unknown</code>
@ -1412,20 +1129,6 @@
<code>OptionsResolverInterface</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php">
<UndefinedClass occurrences="6">
<code>$qb</code>
<code>$qb</code>
<code>$qb</code>
<code>QueryBuilder</code>
<code>SocialAction</code>
<code>SocialAction</code>
</UndefinedClass>
<UndefinedVariable occurrences="2">
<code>$action</code>
<code>$orderBy</code>
</UndefinedVariable>
</file>
<file src="src/Bundle/ChillPersonBundle/Resources/test/Fixtures/App/app/AppKernel.php">
<DuplicateClass occurrences="1">
<code>AppKernel</code>
@ -1505,33 +1208,13 @@
</ParamNameMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public static function setUpBeforeClass()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="2">
<code>AccompanyingPeriodRepository</code>
<code>stdClass</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public static function setUpBeforeClass()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php">
<InvalidThrow occurrences="1"/>
<MethodSignatureMismatch occurrences="3">
<code>public function setUp()</code>
<code>public function tearDown()</code>
<code>public static function setUpBeforeClass()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="3">
<code>'ChillMainBundle:Center'</code>
<code>'ChillPersonBundle:AccompanyingPeriod\ClosingMotive'</code>
@ -1543,40 +1226,19 @@
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function tearDown()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="1">
<code>User</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php">
<InvalidScope occurrences="1">
<code>$this</code>
</InvalidScope>
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public static function setUpBeforeClass()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="1">
<code>'ChillPersonBundle:Person'</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public static function tearDownAfterClass()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public function tearDown()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="2">
<code>'ChillMainBundle:Country'</code>
<code>'ChillPersonBundle:Person'</code>
@ -1586,140 +1248,25 @@
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public function tearDown()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="2">
<code>'ChillMainBundle:Country'</code>
<code>'ChillPersonBundle:Person'</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public function tearDown()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="1">
<code>'ChillPersonBundle:Person'</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public function tearDown()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="1">
<code>'ChillPersonBundle:Person'</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Controller/SocialIssueApiControllerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php">
<AssignmentToVoid occurrences="1">
<code>$participationL</code>
</AssignmentToVoid>
<NullReference occurrences="1">
<code>getEndDate</code>
</NullReference>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AgeAggregatorTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/GenderAggregatorTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/NationalityAggregatorTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodFilterTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Filter/BirthdayFilterTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Export/Filter/GenderFilterTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php">
<UndefinedClass occurrences="1">
@ -1820,20 +1367,13 @@
<code>require __DIR__ . '/../../../../../vendor/autoload.php'</code>
</MissingFile>
</file>
<file src="src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php">
<MethodSignatureMismatch occurrences="1">
<code>public function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php">
<InvalidParamDefault occurrences="1">
<code>type</code>
</InvalidParamDefault>
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public static function setUpBeforeClass()</code>
</MethodSignatureMismatch>
<UndefinedDocblockClass occurrences="29">
<UndefinedDocblockClass occurrences="31">
<code>$client</code>
<code>$client</code>
<code>$client</code>
<code>$client</code>
<code>$client</code>
@ -1865,16 +1405,7 @@
<code>type</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php">
<UndefinedClass occurrences="1">
<code>Exception</code>
</UndefinedClass>
</file>
<file src="src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public static function setUpBeforeClass()</code>
</MethodSignatureMismatch>
<UndefinedDocblockClass occurrences="3">
<code>type</code>
<code>type</code>
@ -1882,10 +1413,6 @@
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php">
<MethodSignatureMismatch occurrences="2">
<code>public function setUp()</code>
<code>public function tearDown()</code>
</MethodSignatureMismatch>
<UndefinedClass occurrences="1">
<code>'ChillCustomFieldsBundle:CustomFieldsGroup'</code>
</UndefinedClass>
@ -1958,11 +1485,6 @@
<code>CacheItempPoolInterface</code>
</UndefinedDocblockClass>
</file>
<file src="src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php">
<UndefinedClass occurrences="1">
<code>$taggedService-&gt;getClass()::getKey()</code>
@ -1988,11 +1510,6 @@
<code>$thirdParty</code>
</ParamNameMismatch>
</file>
<file src="src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php">
<MethodSignatureMismatch occurrences="1">
<code>protected function setUp()</code>
</MethodSignatureMismatch>
</file>
<file src="src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php">
<UndefinedDocblockClass occurrences="6">
<code>$object</code>

View File

@ -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();
}

View File

@ -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;

View File

@ -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
{

View File

@ -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;

View File

@ -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
{

View File

@ -1,7 +1,7 @@
<template>
<li>
<span :title="person.text">
<span class="chill_denomination" @click.prevent="$emit('remove', person)">
<span :title="person.text" @click.prevent="$emit('remove', person)">
<span class="chill_denomination">
<person-text :person="person" :isCut="true"></person-text>
</span>
</span>

View File

@ -22,7 +22,7 @@ use Chill\DocStoreBundle\Repository\DocumentCategoryRepository;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Templating\Entity\PersonRender;
use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
@ -43,7 +43,7 @@ class ActivityContext implements
private NormalizerInterface $normalizer;
private PersonRender $personRender;
private PersonRenderInterface $personRender;
private TranslatableStringHelperInterface $translatableStringHelper;
@ -54,7 +54,7 @@ class ActivityContext implements
NormalizerInterface $normalizer,
TranslatableStringHelperInterface $translatableStringHelper,
EntityManagerInterface $em,
PersonRender $personRender,
PersonRenderInterface $personRender,
TranslatorInterface $translator,
BaseContextData $baseContextData
) {

View File

@ -16,7 +16,7 @@ use Chill\TaskBundle\Templating\UI\CountNotificationTask;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class UserMenuBuilder implements LocalMenuBuilderInterface
{

View File

@ -20,7 +20,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function get_class;

View File

@ -21,7 +21,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_merge;
use function count;

View File

@ -15,7 +15,7 @@ use Chill\AMLI\BudgetBundle\Security\Authorization\BudgetElementVoter;
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 UserMenuBuilder implements LocalMenuBuilderInterface
{

View File

@ -2,6 +2,6 @@ services:
Chill\AMLI\BudgetBundle\Menu\UserMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@ -16,7 +16,7 @@ use Chill\TaskBundle\Templating\UI\CountNotificationTask;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class UserMenuBuilder implements LocalMenuBuilderInterface
{

View File

@ -19,7 +19,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;

View File

@ -2,11 +2,11 @@ docgen:
Generate a document: Génerer un document
Generate: Génerer
Document generation: Génération de documents
Manage templates and document generation: Gestion des documents générés et de leurs gabarits
Manage templates and document generation: Gestion des documents générés et de leurs modèles
Pick template context: Choisir un contexte
Context: Contexte
New template: Nouveau gabarit
Edit template: Modifier gabarit
New template: Nouveau modèle
Edit template: Modifier modèle
test generate: Tester la génération
With context: 'Avec le contexte :'

View File

@ -19,7 +19,7 @@
{% endblock %}
{% block content %}
<div class="col-md-10 col-xxl">
<div class="document-list">
<h1>{{ 'Documents' }}</h1>
{% if documents|length == 0 %}
@ -27,7 +27,7 @@
{% else %}
<div class="flex-table chill-task-list">
{% for document in documents %}
{% include 'ChillDocStoreBundle:List:list_item.html.twig' %}
{% include '@ChillDocStore/List/list_item.html.twig' %}
{% endfor %}
</div>
{% endif %}

View File

@ -1,8 +1,10 @@
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
{% import '@ChillPerson/Macro/updatedBy.html.twig' as mmm %}
<div class="item-bloc">
<div class="item-row">
<div class="item-col">
<div class="item-col" style="width: unset">
<div class="denomination h2">
{{ document.title }}
</div>
@ -30,54 +32,50 @@
</div>
</div>
{% if document.description is not empty %}
<div class="item-row separator">
<blockquote class="chill-user-quote">
<div class="item-row">
<blockquote class="chill-user-quote col">
{{ document.description|chill_markdown_to_html }}
</blockquote>
</div>
{% endif %}
<div class="item-row separator">
<div class="item-col item-meta">
<div class="updatedBy">
{{ 'Created by'|trans }}:
<span class="user">{{ document.createdBy|chill_entity_render_string }}</span>
<span class="date">le {{ document.createdAt|format_date('long') }}</span>
</div>
{{ mmm.createdBy(document) }}
</div>
<div class="item-col">
{% if document.course is defined %}
<ul class="record_actions">
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
<li>
<a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': accompanyingCourse.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('accompanying_course_document_edit', {'course': accompanyingCourse.id, 'id': document.id }) }}" class="btn btn-update"></a>
</li>
{% endif %}
</ul>
{% else %}
<ul class="record_actions">
{% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
<li>
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="btn btn-update"></a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
</div>
<div>
{% if document.course is defined %}
<ul class="record_actions">
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
<li>
<a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': accompanyingCourse.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('accompanying_course_document_edit', {'course': accompanyingCourse.id, 'id': document.id }) }}" class="btn btn-update"></a>
</li>
{% endif %}
</ul>
{% else %}
<ul class="record_actions">
{% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
<li>
{{ m.download_button(document.object, document.title) }}
</li>
<li>
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="btn btn-update"></a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
</div>

View File

@ -14,19 +14,46 @@ namespace Chill\DocStoreBundle\Workflow;
use Chill\DocStoreBundle\Entity\AccompanyingCourseDocument;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Symfony\Contracts\Translation\TranslatorInterface;
class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandlerInterface
{
private EntityRepository $repository;
private TranslatorInterface $translator;
/**
* TODO: injecter le repository directement.
*/
public function __construct(EntityManagerInterface $em)
public function __construct(EntityManagerInterface $em, TranslatorInterface $translator)
{
$this->repository = $em->getRepository(AccompanyingCourseDocument::class);
$this->translator = $translator;
}
public function getEntityData(EntityWorkflow $entityWorkflow, array $options = []): array
{
$course = $this->getRelatedEntity($entityWorkflow)
->getCourse();
$persons = [];
if (null !== $course) {
$persons = $course->getCurrentParticipations()->map(static function (AccompanyingPeriodParticipation $participation) {
return $participation->getPerson();
})->toArray();
}
return [
'persons' => array_values($persons),
];
}
public function getEntityTitle(EntityWorkflow $entityWorkflow, array $options = []): string
{
return $this->translator->trans('workflow.Document (n°%doc%)', ['%doc%' => $entityWorkflow->getRelatedEntityId()]);
}
public function getRelatedEntity(EntityWorkflow $entityWorkflow): ?AccompanyingCourseDocument

View File

@ -38,7 +38,7 @@ use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;

View File

@ -28,7 +28,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array;
use function is_array;

View File

@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Allow to pick a choice amongst different choices.

View File

@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Allow to pick amongst type.

View File

@ -15,7 +15,7 @@ use Chill\EventBundle\Security\Authorization\EventVoter;
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
{

View File

@ -5,7 +5,7 @@ services:
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
$formFactoryInterface: '@Symfony\Component\Form\FormFactoryInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
$paginator: '@chill_main.paginator_factory'
public: true
tags: ['controller.service_arguments']

View File

@ -44,6 +44,6 @@ services:
$tokenStorage: "@security.token_storage"
$authorizationHelper: "@chill.main.security.authorization.helper"
$urlGenerator: '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: form.type }

View File

@ -2,6 +2,6 @@ services:
Chill\EventBundle\Menu\PersonMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@ -24,7 +24,7 @@ use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class FamilyMemberController extends AbstractController
{

View File

@ -15,7 +15,7 @@ use Chill\AMLI\FamilyMembersBundle\Security\Voter\FamilyMemberVoter;
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 UserMenuBuilder implements LocalMenuBuilderInterface
{

View File

@ -2,6 +2,6 @@ services:
Chill\AMLI\FamilyMembersBundle\Menu\UserMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@ -20,8 +20,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_merge;

View File

@ -27,7 +27,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
use function array_merge;

View File

@ -29,7 +29,6 @@ use Chill\MainBundle\Security\ProvideRoleInterface;
use Chill\MainBundle\Security\Resolver\CenterResolverInterface;
use Chill\MainBundle\Security\Resolver\ScopeResolverInterface;
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
use Chill\MainBundle\Templating\Entity\CompilerPass as RenderEntityCompilerPass;
use Chill\MainBundle\Templating\UI\NotificationCounterInterface;
use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@ -70,7 +69,6 @@ class ChillMainBundle extends Bundle
$container->addCompilerPass(new MenuCompilerPass());
$container->addCompilerPass(new ACLFlagsCompilerPass());
$container->addCompilerPass(new GroupingCenterCompilerPass());
$container->addCompilerPass(new RenderEntityCompilerPass());
$container->addCompilerPass(new CRUDControllerCompilerPass());
}
}

View File

@ -0,0 +1,24 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Controller;
use Chill\MainBundle\CRUD\Controller\ApiController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class CivilityApiController extends ApiController
{
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format)
{
return $query->addOrderBy('e.order', 'ASC');
}
}

View File

@ -24,7 +24,7 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;
use function serialize;

View File

@ -27,9 +27,9 @@ use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Constraints\Callback;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Class PasswordController.

View File

@ -11,7 +11,12 @@ declare(strict_types=1);
namespace Chill\MainBundle\Controller;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Pagination\PaginatorFactory;
use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
use Chill\MainBundle\Serializer\Model\Collection;
use Chill\MainBundle\Serializer\Model\Counter;
use Doctrine\ORM\EntityManagerInterface;
use LogicException;
use Symfony\Component\HttpFoundation\JsonResponse;
@ -21,17 +26,71 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Serializer\SerializerInterface;
class WorkflowApiController
{
private EntityManagerInterface $entityManager;
private EntityWorkflowRepository $entityWorkflowRepository;
private PaginatorFactory $paginatorFactory;
private Security $security;
public function __construct(Security $security, EntityManagerInterface $entityManager)
{
private SerializerInterface $serializer;
public function __construct(
EntityManagerInterface $entityManager,
EntityWorkflowRepository $entityWorkflowRepository,
PaginatorFactory $paginatorFactory,
Security $security,
SerializerInterface $serializer
) {
$this->entityManager = $entityManager;
$this->entityWorkflowRepository = $entityWorkflowRepository;
$this->paginatorFactory = $paginatorFactory;
$this->security = $security;
$this->serializer = $serializer;
}
/**
* Return a list of workflow which are waiting an action for the user.
*
* @Route("/api/1.0/main/workflow/my", methods={"GET"})
*/
public function myWorkflow(Request $request): JsonResponse
{
if (!$this->security->isGranted('ROLE_USER') || !$this->security->getUser() instanceof User) {
throw new AccessDeniedException();
}
$total = $this->entityWorkflowRepository->countByDest($this->security->getUser());
if ($request->query->getBoolean('countOnly', false)) {
return new JsonResponse(
$this->serializer->serialize(new Counter($total), 'json'),
JsonResponse::HTTP_OK,
[],
true
);
}
$paginator = $this->paginatorFactory->create($total);
$workflows = $this->entityWorkflowRepository->findByDest(
$this->security->getUser(),
['id' => 'DESC'],
$paginator->getItemsPerPage(),
$paginator->getCurrentPageFirstItemNumber()
);
return new JsonResponse(
$this->serializer->serialize(new Collection($workflows, $paginator), 'json', ['groups' => ['read']]),
JsonResponse::HTTP_OK,
[],
true
);
}
/**

View File

@ -197,6 +197,8 @@ class WorkflowController extends AbstractController
);
}
$entityWorkflow->futureDestUsers = $transitionForm['future_dest_users']->getData();
$workflow->apply($entityWorkflow, $transition);
foreach ($transitionForm['future_dest_users']->getData() as $user) {

View File

@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\DependencyInjection;
use Chill\MainBundle\Controller\AddressApiController;
use Chill\MainBundle\Controller\CivilityApiController;
use Chill\MainBundle\Controller\LocationController;
use Chill\MainBundle\Controller\LocationTypeController;
use Chill\MainBundle\Controller\UserController;
@ -559,6 +560,21 @@ class ChillMainExtension extends Extension implements
],
],
],
[
'class' => \Chill\MainBundle\Entity\Civility::class,
'name' => 'civility',
'base_path' => '/api/1.0/main/civility',
'base_role' => 'ROLE_USER',
'controller' => CivilityApiController::class,
'actions' => [
'_index' => [
'methods' => [
Request::METHOD_GET => true,
Request::METHOD_HEAD => true,
],
],
],
],
],
]);
}

View File

@ -139,12 +139,10 @@ class Address
private $point;
/**
* @var PostalCode
*
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
* @Groups({"write"})
*/
private $postcode;
private ?PostalCode $postcode = null;
/**
* @var string|null
@ -306,10 +304,8 @@ class Address
/**
* Get postcode.
*
* @return PostalCode
*/
public function getPostcode()
public function getPostcode(): ?PostalCode
{
return $this->postcode;
}

View File

@ -17,6 +17,7 @@ use Symfony\Component\Serializer\Annotation as Serializer;
/**
* @ORM\Table(name="chill_main_civility")
* @ORM\Entity
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={"chill_main_civility": Civility::class})
*/
class Civility
{
@ -29,6 +30,7 @@ class Civility
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({"read"})
*/
private bool $active = true;

View File

@ -41,6 +41,17 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
use TrackUpdateTrait;
/**
* a list of future dest users for the next steps.
*
* This is in used in order to let controller inform who will be the future users which will validate
* the next step. This is necessary to perform some computation about the next users, before they are
* associated to the entity EntityWorkflowStep.
*
* @var array|User[]
*/
public array $futureDestUsers = [];
/**
* @ORM\OneToMany(targetEntity=EntityWorkflowComment::class, mappedBy="entityWorkflow", orphanRemoval=true)
*

View File

@ -18,7 +18,7 @@ use OutOfBoundsException;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
use function array_keys;

View File

@ -17,7 +17,7 @@ use LogicException;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_map;
use function count;

View File

@ -19,7 +19,7 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_map;
use function array_merge;

View File

@ -23,7 +23,7 @@ use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
use function array_keys;

View File

@ -0,0 +1,57 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Form\Type;
use Chill\MainBundle\Entity\Civility;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class PickCivilityType extends AbstractType
{
private TranslatableStringHelper $translatableStringHelper;
public function __construct(TranslatableStringHelper $translatableStringHelper)
{
$this->translatableStringHelper = $translatableStringHelper;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver
->setDefault('label', 'Civility')
->setDefault(
'choice_label',
function (Civility $civility): string {
return $this->translatableStringHelper->localize($civility->getName());
}
)
->setDefault(
'query_builder',
static function (EntityRepository $er): QueryBuilder {
return $er->createQueryBuilder('c')
->where('c.active = true')
->orderBy('c.order');
},
)
->setDefault('placeholder', 'choose civility')
->setDefault('class', Civility::class);
}
public function getParent()
{
return EntityType::class;
}
}

View File

@ -20,7 +20,7 @@ use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* A form to pick between PostalCode.

View File

@ -16,7 +16,7 @@ use Psr\Log\LoggerInterface;
use Swift_Mailer;
use Swift_Message;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment;
use function call_user_func;

View File

@ -72,7 +72,7 @@ section.chill-entity {
}
}
p {
display: inline-block;
// display: inline-block;
margin: 0 0 0 1.5em;
text-indent: -1.5em;

View File

@ -1,7 +1,7 @@
<template>
<h2>{{ $t('main_title') }}</h2>
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link"
@ -23,7 +23,6 @@
:class="{'active': activeTab === 'MyAccompanyingCourses'}"
@click="selectTab('MyAccompanyingCourses')">
{{ $t('my_accompanying_courses.tab') }}
<tab-counter :count="state.accompanyingCourses.count"></tab-counter>
</a>
</li>
<li class="nav-item">
@ -51,11 +50,19 @@
<tab-counter :count="state.tasks.alert.count"></tab-counter>
</a>
</li>
<li class="nav-item">
<a class="nav-link"
:class="{'active': activeTab === 'MyWorkflows'}"
@click="selectTab('MyWorkflows')">
{{ $t('my_workflows.tab') }}
<tab-counter :count="state.workflows.count"></tab-counter>
</a>
</li>
<li class="nav-item loading ms-auto py-2" v-if="loading">
<i class="fa fa-circle-o-notch fa-spin fa-lg text-chill-gray" :title="$t('loading')"></i>
</li>
</ul>
<div class="my-4">
<my-customs
v-if="activeTab === 'MyCustoms'">
@ -75,6 +82,9 @@
<my-notifications
v-else-if="activeTab === 'MyNotifications'">
</my-notifications>
<my-workflows
v-else-if="activeTab === 'MyWorkflows'">
</my-workflows>
</div>
</template>
@ -85,6 +95,7 @@ import MyEvaluations from './MyEvaluations';
import MyTasks from './MyTasks';
import MyAccompanyingCourses from './MyAccompanyingCourses';
import MyNotifications from './MyNotifications';
import MyWorkflows from './MyWorkflows.vue';
import TabCounter from './TabCounter';
import { mapState } from "vuex";
@ -95,6 +106,7 @@ export default {
MyWorks,
MyEvaluations,
MyTasks,
MyWorkflows,
MyAccompanyingCourses,
MyNotifications,
TabCounter,
@ -126,6 +138,7 @@ export default {
'MyWorks',
'MyEvaluations',
'MyTasks',
'MyWorkflows',
]) {
this.$store.dispatch('getByTab', { tab: m, param: "countOnly=1" });
}

View File

@ -66,6 +66,8 @@ export default {
return appMessages.fr.the_activity;
case 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod':
return appMessages.fr.the_course;
case 'Chill\\MainBundle\\Entity\\Workflow\\EntityWorkflow':
return appMessages.fr.the_workflow;
default:
throw 'notification type unknown';
}
@ -76,6 +78,8 @@ export default {
return `/fr/activity/${n.relatedEntityId}/show`
case 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod':
return `/fr/parcours/${n.relatedEntityId}`
case 'Chill\\MainBundle\\Entity\\Workflow\\EntityWorkflow':
return `/fr/main/workflow/${n.relatedEntityId}/show`
default:
throw 'notification type unknown';
}

View File

@ -0,0 +1,88 @@
<template>
<div class="alert alert-light">{{ $t('my_workflows.description') }}</div>
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span>
<tab-table v-else>
<template v-slot:thead>
<th scope="col">{{ $t('Object_workflow') }}</th>
<th scope="col">{{ $t('Step') }}</th>
<th scope="col">{{ $t('concerned_users') }}</th>
<th scope="col"></th>
</template>
<template v-slot:tbody>
<tr v-for="(w, i) in workflows.results" :key="`workflow-${i}`">
<td>{{ w.title }}</td>
<td>
<div class="workflow">
<div class="breadcrumb">
<i class="fa fa-circle me-1 text-chill-yellow mx-2"></i>
<span class="mx-2">{{ getStep(w) }}</span>
</div>
</div>
</td>
<td v-if="w.datas.persons !== null">
<span v-for="p in w.datas.persons" class="me-1" :key="p.id">
<on-the-fly
:type="p.type"
:id="p.id"
:buttonText="p.textAge"
:displayBadge="'true' === 'true'"
action="show">
</on-the-fly>
</span>
</td>
<td>
<a class="btn btn-sm btn-show" :href="getUrl(w)">
{{ $t('show_entity', { entity: $t('the_workflow') }) }}
</a>
</td>
</tr>
</template>
</tab-table>
</template>
<script>
import { mapState, mapGetters } from "vuex";
import TabTable from "./TabTable";
import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly';
export default {
name: "MyWorkflows",
components: {
TabTable,
OnTheFly
},
computed: {
...mapState([
'workflows',
]),
...mapGetters([
'isWorkflowsLoaded',
]),
noResults() {
if (!this.isWorkflowsLoaded) {
return false;
} else {
return this.workflows.count === 0;
}
},
},
methods: {
getUrl(w) {
return `/fr/main/workflow/${w.id}/show`;
},
getStep(w) {
const lastStep = w.steps.length - 1
return w.steps[lastStep].currentStep.text;
}
},
}
</script>
<style scoped>
span.outdated {
font-weight: bold;
color: var(--bs-warning);
}
</style>

View File

@ -22,6 +22,10 @@ const appMessages = {
tab: "Mes notifications",
description: "Liste des notifications reçues et non lues.",
},
my_workflows: {
tab: "Mes workflows",
description: "Liste des workflows en attente d'une action."
},
opening_date: "Date d'ouverture",
social_issues: "Problématiques sociales",
concerned_persons: "Usagers concernés",
@ -33,12 +37,16 @@ const appMessages = {
From: "Expéditeur",
Subject: "Objet",
Entity: "Associé à",
Step: "Étape",
concerned_users: "Usagers concernés",
Object_workflow: "Objet du workflow",
show_entity: "Voir {entity}",
the_activity: "l'échange",
the_course: "le parcours",
the_action: "l'action",
the_evaluation: "l'évaluation",
the_task: "la tâche",
the_workflow: "le workflow",
StartDate: "Date d'ouverture",
SocialAction: "Action d'accompagnement",
no_data: "Aucun résultats",
@ -61,4 +69,4 @@ Object.assign(appMessages.fr);
export {
appMessages
};
};

View File

@ -1,12 +1,6 @@
import 'es6-promise/auto';
import { createStore } from 'vuex';
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
import MyCustoms from "../MyCustoms";
import MyWorks from "../MyWorks";
import MyEvaluations from "../MyEvaluations";
import MyTasks from "../MyTasks";
import MyAccompanyingCourses from "../MyAccompanyingCourses";
import MyNotifications from "../MyNotifications";
const debug = process.env.NODE_ENV !== 'production';
@ -27,6 +21,7 @@ const store = createStore({
},
accompanyingCourses: {},
notifications: {},
workflows: {},
errorMsg: [],
loading: false
},
@ -49,6 +44,9 @@ const store = createStore({
isNotificationsLoaded(state) {
return !isEmpty(state.notifications);
},
isWorkflowsLoaded(state) {
return !isEmpty(state.workflows);
},
counter(state) {
return {
works: state.works.count,
@ -57,6 +55,7 @@ const store = createStore({
tasksAlert: state.tasks.alert.count,
accompanyingCourses: state.accompanyingCourses.count,
notifications: state.notifications.count,
workflows: state.workflows.count
}
}
},
@ -85,6 +84,9 @@ const store = createStore({
//console.log('addNotifications', notifications);
state.notifications = notifications;
},
addWorkflows(state, workflows) {
state.workflows = workflows;
},
setLoading(state, bool) {
state.loading = bool;
},
@ -180,14 +182,30 @@ const store = createStore({
const url = `/api/1.0/main/notification/my/unread${'?'+ param}`;
makeFetch('GET', url)
.then((response) => {
console.log('notifications', response)
commit('addNotifications', response);
commit('setLoading', false);
})
.catch((error) => {
commit('catchError', error);
throw error;
})
;
});
}
break;
case 'MyWorkflows':
if (!getters.isWorflowsLoaded) {
commit('setLoading', true);
const url = '/api/1.0/main/workflow/my';
makeFetch('GET', url)
.then((response) => {
console.log('workflows', response)
commit('addWorkflows', response);
commit('setLoading', false);
})
.catch((error) => {
commit('catchError', error);
throw error;
});
}
break;
default:

View File

@ -77,8 +77,7 @@ export default {
return this.$refs.castPerson.$data.person;
case 'thirdparty':
let data = this.$refs.castThirdparty.$data.thirdparty;
data.name = data.text;
if (data.address !== undefined) {
if (data.address !== undefined && data.address !== null) {
data.address = { id: data.address.address_id }
} else {
data.address = null;

View File

@ -18,7 +18,8 @@
@close="modal.showModal = false">
<template v-slot:header>
<h3 class="modal-title">{{ $t(titleModal) }}</h3>
<h3 v-if="parent" class="modal-title">{{ $t(titleModal, {q: parent.text}) }}</h3>
<h3 v-else class="modal-title">{{ $t(titleModal) }}</h3>
</template>
<template v-slot:body v-if="type === 'person'">
@ -29,10 +30,10 @@
ref="castPerson">
</on-the-fly-person>
<div v-if="hasResourceComment">
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
<blockquote class="chill-user-quote">
{{ parent.comment }}
</blockquote>
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
<blockquote class="chill-user-quote">
{{ parent.comment }}
</blockquote>
</div>
</template>
@ -44,13 +45,22 @@
ref="castThirdparty">
</on-the-fly-thirdparty>
<div v-if="hasResourceComment">
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
<blockquote class="chill-user-quote">
{{ parent.comment }}
</blockquote>
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
<blockquote class="chill-user-quote">
{{ parent.comment }}
</blockquote>
</div>
</template>
<template v-slot:body v-else-if="parent">
<on-the-fly-thirdparty
:parent="parent"
:action="action"
type="thirdparty"
ref="castThirdparty">
</on-the-fly-thirdparty>
</template>
<template v-slot:body v-else>
<on-the-fly-create
:action="action"
@ -83,6 +93,7 @@ import Modal from 'ChillMainAssets/vuejs/_components/Modal.vue';
import OnTheFlyCreate from './Create.vue';
import OnTheFlyPerson from 'ChillPersonAssets/vuejs/_components/OnTheFly/Person.vue';
import OnTheFlyThirdparty from 'ChillThirdPartyAssets/vuejs/_components/OnTheFly/ThirdParty.vue';
import { postThirdparty } from "ChillThirdPartyAssets/vuejs/_api/OnTheFly";
export default {
name: 'OnTheFly',
@ -105,11 +116,11 @@ export default {
computed: {
hasResourceComment() {
//console.log('hasResourceComment', this.parent);
return (typeof this.parent !== 'undefined' && this.parent !== null)
&& this.action === 'show'
&& this.parent.type === 'accompanying_period_resource'
&& (this.parent.comment !== null && this.parent.comment !== '')
;
return (typeof this.parent !== 'undefined' && this.parent !== null)
&& this.action === 'show'
&& this.parent.type === 'accompanying_period_resource'
&& (this.parent.comment !== null && this.parent.comment !== '')
;
},
classAction() {
switch (this.action) {
@ -119,6 +130,8 @@ export default {
return 'btn-update';
case 'create':
return 'btn-create';
case 'addContact':
return 'btn-tpchild';
}
},
titleAction() {
@ -129,6 +142,8 @@ export default {
return 'action.edit';
case 'create':
return 'action.create';
case 'addContact':
return 'action.addContact';
}
},
titleCreate() {
@ -146,6 +161,8 @@ export default {
return 'onthefly.edit.' + this.type;
case 'create':
return this.titleCreate;
case 'addContact':
return 'onthefly.addContact.title';
}
},
titleMessage() {
@ -179,8 +196,8 @@ export default {
this.modal.showModal = false;
},
openModal() {
//console.log('## OPEN ON THE FLY MODAL');
//console.log('## type:', this.type, ', action:', this.action);
// console.log('## OPEN ON THE FLY MODAL');
// console.log('## type:', this.type, ', action:', this.action);
this.modal.showModal = true;
this.$nextTick(function() {
//this.$refs.search.focus();
@ -190,7 +207,7 @@ export default {
this.$data.action = action;
},
saveAction() {
console.log('saveAction button: create/edit action with', this.type);
// console.log('saveAction button: create/edit action with', this.type);
let
type = this.type,
data = {} ;
@ -202,17 +219,28 @@ export default {
case 'thirdparty':
data = this.$refs.castThirdparty.$data.thirdparty;
/* never executed ? */
break;
default:
if (typeof this.type === 'undefined') { // action=create
type = this.$refs.castNew.radioType;
data = this.$refs.castNew.castDataByType();
if (typeof this.type === 'undefined') { // action=create or addContact
console.log('will rewrite data');
if (this.action === 'addContact') {
type = 'thirdparty'
data = this.$refs.castThirdparty.$data.thirdparty;
console.log('data original', data);
data.parent = {type: "thirdparty", id: this.parent.id};
} else {
type = this.$refs.castNew.radioType;
data = this.$refs.castNew.castDataByType();
console.log(data)
}
} else {
throw 'error with object type';
}
}
console.log('type', type);
console.log('data', data);
// pass datas to parent
this.$emit('saveFormOnTheFly', { type: type, data: data });
},
@ -232,4 +260,8 @@ export default {
a {
cursor: pointer;
}
/* .btn-add-contact {
background-color: pink;
} */
</style>

View File

@ -21,7 +21,13 @@ const ontheflyMessages = {
person: "un nouvel usager",
thirdparty: "un nouveau tiers professionnel"
},
resource_comment_title: "Un commentaire est associé à cet interlocuteur"
addContact: {
title: "Créer un contact pour {q}"
},
resource_comment_title: "Un commentaire est associé à cet interlocuteur",
addContact: {
title: "Créer un contact pour {q}"
}
}
}
}

View File

@ -46,7 +46,8 @@ const messages = {
person: "Quitter la page et ouvrir la fiche de l'usager",
thirdparty: "Quitter la page et voir le tiers",
},
refresh: 'Rafraîchir'
refresh: 'Rafraîchir',
addContact: 'Ajouter un contact'
},
nav: {
next: "Suivant",

View File

@ -15,7 +15,7 @@ use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Chill\MainBundle\Security\Authorization\ChillExportVoter;
use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Class SectionMenuBuilder.

View File

@ -15,7 +15,7 @@ use Knp\Menu\FactoryInterface;
use Knp\Menu\ItemInterface;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
use function array_merge;

View File

@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Serializer\Normalizer;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Workflow\EntityWorkflowManager;
use Chill\MainBundle\Workflow\Helper\MetadataExtractor;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
@ -22,12 +23,18 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn
{
use NormalizerAwareTrait;
private EntityWorkflowManager $entityWorkflowManager;
private MetadataExtractor $metadataExtractor;
private Registry $registry;
public function __construct(MetadataExtractor $metadataExtractor, Registry $registry)
{
public function __construct(
EntityWorkflowManager $entityWorkflowManager,
MetadataExtractor $metadataExtractor,
Registry $registry
) {
$this->entityWorkflowManager = $entityWorkflowManager;
$this->metadataExtractor = $metadataExtractor;
$this->registry = $registry;
}
@ -40,6 +47,7 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn
public function normalize($object, ?string $format = null, array $context = [])
{
$workflow = $this->registry->get($object, $object->getWorkflowName());
$handler = $this->entityWorkflowManager->getHandler($object);
return [
'type' => 'entity_workflow',
@ -49,6 +57,8 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn
'workflow' => $this->metadataExtractor->buildArrayPresentationForWorkflow($workflow),
'currentStep' => $this->normalizer->normalize($object->getCurrentStep(), $format, $context),
'steps' => $this->normalizer->normalize($object->getStepsChained(), $format, $context),
'datas' => $this->normalizer->normalize($handler->getEntityData($object), $format, $context),
'title' => $handler->getEntityTitle($object),
];
}

View File

@ -25,21 +25,17 @@ class ChillEntityRenderExtension extends AbstractExtension
protected $defaultRender;
/**
* @var ChillEntityRenderInterface
* @var iterable|ChillEntityRenderInterface[]
*/
protected $renders = [];
/**
* ChillEntityRenderExtension constructor.
*/
public function __construct()
public function __construct(iterable $renders)
{
$this->defaultRender = new ChillEntityRender();
}
public function addRender(ChillEntityRenderInterface $render)
{
$this->renders[] = $render;
$this->renders = $renders;
}
/**

View File

@ -1,31 +0,0 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Templating\Entity;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
/**
* Add service tagged with `chill.render_entity` to appropriate service.
*/
class CompilerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
$extension = $container->getDefinition(ChillEntityRenderExtension::class);
foreach ($container->findTaggedServiceIds('chill.render_entity') as $id => $tags) {
$extension->addMethodCall('addRender', [new Reference($id)]);
}
}
}

View File

@ -16,9 +16,10 @@ use Chill\MainBundle\Security\RoleProvider;
use Chill\MainBundle\Validation\Constraint\RoleScopeScopePresenceConstraint;
use Psr\Log\LoggerInterface;
use RuntimeException;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array;
class RoleScopeScopePresence extends ConstraintValidator

View File

@ -15,6 +15,10 @@ use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
interface EntityWorkflowHandlerInterface
{
public function getEntityData(EntityWorkflow $entityWorkflow, array $options = []): array;
public function getEntityTitle(EntityWorkflow $entityWorkflow, array $options = []): string;
public function getRelatedEntity(EntityWorkflow $entityWorkflow): ?object;
/**

View File

@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Workflow\EventSubscriber;
use Chill\MainBundle\Entity\Notification;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Workflow\Helper\MetadataExtractor;
use Doctrine\ORM\EntityManagerInterface;
@ -34,8 +35,13 @@ class NotificationOnTransition implements EventSubscriberInterface
private Security $security;
public function __construct(EntityManagerInterface $entityManager, EngineInterface $engine, MetadataExtractor $metadataExtractor, Security $security, Registry $registry)
{
public function __construct(
EntityManagerInterface $entityManager,
EngineInterface $engine,
MetadataExtractor $metadataExtractor,
Security $security,
Registry $registry
) {
$this->entityManager = $entityManager;
$this->engine = $engine;
$this->metadataExtractor = $metadataExtractor;
@ -62,7 +68,7 @@ class NotificationOnTransition implements EventSubscriberInterface
$dests = array_merge(
$entityWorkflow->getSubscriberToStep()->toArray(),
$entityWorkflow->isFinal() ? $entityWorkflow->getSubscriberToFinal()->toArray() : [],
$entityWorkflow->getCurrentStep()->getDestUser()->toArray()
$entityWorkflow->getCurrentStepChained()->getPrevious()->getDestUser()->toArray()
);
$place = $this->metadataExtractor->buildArrayPresentationForPlace($entityWorkflow);
@ -85,7 +91,7 @@ class NotificationOnTransition implements EventSubscriberInterface
'dest' => $subscriber,
'place' => $place,
'workflow' => $workflow,
'is_dest' => $entityWorkflow->getCurrentStep()->getDestUser()->contains($subscriber),
'is_dest' => in_array($subscriber->getId(), array_map(static function (User $u) { return $u->getId(); }, $entityWorkflow->futureDestUsers), true),
];
$notification = new Notification();

View File

@ -125,6 +125,11 @@ components:
type: object
type:
type: string
Workflow:
type: object
properties:
id:
type: integer
paths:
/1.0/search.json:
@ -165,13 +170,6 @@ paths:
200:
description: "OK"
/1.0/main/address.json:
get:
tags:
- address
summary: Return a list of all Chill addresses
responses:
200:
description: "ok"
post:
tags:
- address
@ -222,10 +220,44 @@ paths:
description: "Unprocessable entity (validation errors)"
400:
description: "transition cannot be applyed"
/1.0/main/address/{id}.json:
get:
tags:
- address
summary: Return an address by id
parameters:
- name: id
in: path
required: true
description: The address id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "ok"
content:
application/json:
schema:
$ref: '#/components/schemas/Address'
404:
description: "not found"
401:
description: "Unauthorized"
patch:
tags:
- address
summary: patch an address
parameters:
- name: id
in: path
required: true
description: The address id
schema:
type: integer
format: integer
minimum: 1
requestBody:
required: true
content:
@ -277,31 +309,6 @@ paths:
400:
description: "transition cannot be applyed"
/1.0/main/address/{id}.json:
get:
tags:
- address
summary: Return an address by id
parameters:
- name: id
in: path
required: true
description: The address id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "ok"
content:
application/json:
schema:
$ref: '#/components/schemas/Address'
404:
description: "not found"
401:
description: "Unauthorized"
/1.0/main/address/{id}/duplicate.json:
post:
@ -781,6 +788,16 @@ paths:
description: "accepted"
403:
description: "unauthorized"
/1.0/main/civility.json:
get:
tags:
- civility
summary: Return all civility types
responses:
200:
description: "ok"
401:
description: "Unauthorized"
/1.0/main/user-job.json:
get:
tags:
@ -793,4 +810,20 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/UserJob'
/1.0/main/workflow/my:
get:
tags:
- workflow
summary: Return a list of workflows awaiting for user's action
responses:
200:
description: "ok"
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Workflow'
403:
description: "Unauthorized"

View File

@ -19,7 +19,7 @@ services:
chill.main.export.spreadsheet_formatter:
class: Chill\MainBundle\Export\Formatter\SpreadSheetFormatter
arguments:
$translatorInterface: '@Symfony\Component\Translation\TranslatorInterface'
$translatorInterface: '@Symfony\Contracts\Translation\TranslatorInterface'
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'spreadsheet' }
@ -27,7 +27,7 @@ services:
chill.main.export.list_formatter:
class: Chill\MainBundle\Export\Formatter\CSVListFormatter
arguments:
$translatorInterface: '@Symfony\Component\Translation\TranslatorInterface'
$translatorInterface: '@Symfony\Contracts\Translation\TranslatorInterface'
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'csvlist' }
@ -35,7 +35,7 @@ services:
chill.main.export.list_spreadsheet_formatter:
class: Chill\MainBundle\Export\Formatter\SpreadsheetListFormatter
arguments:
$translatorInterface: '@Symfony\Component\Translation\TranslatorInterface'
$translatorInterface: '@Symfony\Contracts\Translation\TranslatorInterface'
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'spreadlist' }
@ -43,7 +43,7 @@ services:
chill.main.export.pivoted_list_formatter:
class: Chill\MainBundle\Export\Formatter\CSVPivotedListFormatter
arguments:
$translatorInterface: '@Symfony\Component\Translation\TranslatorInterface'
$translatorInterface: '@Symfony\Contracts\Translation\TranslatorInterface'
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'csv_pivoted_list' }

View File

@ -59,7 +59,7 @@ services:
- "@chill.main.helper.translatable_string"
- '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
- '@Chill\MainBundle\Form\ChoiceLoader\PostalCodeChoiceLoader'
- '@Symfony\Component\Translation\TranslatorInterface'
- '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: form.type }

View File

@ -15,7 +15,7 @@ services:
Chill\MainBundle\Routing\MenuBuilder\SectionMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@ -10,7 +10,7 @@ services:
$mailer: '@swiftmailer.mailer.default'
# $mailerTransporter: '@swiftmailer.transport'
$router: '@Symfony\Component\Routing\RouterInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$translator: '@Symfony\Contracts\Translation\TranslatorInterface'
$routeParameters: '%chill_main.notifications%'
Chill\MainBundle\Notification\NotificationHandlerManager:

View File

@ -8,7 +8,7 @@ services:
arguments:
- '@Symfony\Component\Routing\RouterInterface'
- '@Knp\Menu\FactoryInterface'
- '@Symfony\Component\Translation\TranslatorInterface'
- '@Symfony\Contracts\Translation\TranslatorInterface'
Chill\MainBundle\Routing\MenuComposer: '@chill.main.menu_composer'
chill.main.routes_loader:

View File

@ -32,6 +32,8 @@ services:
- { name: twig.extension }
Chill\MainBundle\Templating\Entity\ChillEntityRenderExtension:
arguments:
$renders: !tagged_iterator chill.render_entity
tags:
- { name: twig.extension }

View File

@ -9,7 +9,7 @@ notification:
My notifications with counter: >-
{nb, plural,
=0 {Mes notifications}
one {Une notification}
one {# notification}
few {# notifications}
other {# notifications}
}
@ -41,7 +41,7 @@ workflow:
My workflows with counter: >-
{wc, plural,
=0 {Mes workflows}
one {Une workflow}
one {# workflow}
few {# workflows}
other {# workflows}
}

View File

@ -356,6 +356,7 @@ By: Par
For: Pour
Created for: Créé pour
Created by: Créé par
Created on: Créé le
# Workflows 💊

View File

@ -0,0 +1,95 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\AccompanyingPeriod\Events;
use Chill\MainBundle\Entity\Address;
use Chill\MainBundle\Entity\Notification;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Event\Person\PersonAddressMoveEvent;
use DateTimeImmutable;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Templating\EngineInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class PersonAddressMoveEventSubscriber implements EventSubscriberInterface
{
private EngineInterface $engine;
private EntityManagerInterface $entityManager;
private Security $security;
private TranslatorInterface $translator;
public function __construct(
EngineInterface $engine,
EntityManagerInterface $entityManager,
Security $security,
TranslatorInterface $translator
) {
$this->engine = $engine;
$this->entityManager = $entityManager;
$this->security = $security;
$this->translator = $translator;
}
public static function getSubscribedEvents(): array
{
return [
PersonAddressMoveEvent::class => 'resetPeriodLocation',
];
}
public function resetPeriodLocation(PersonAddressMoveEvent $event)
{
if ($event->getPreviousAddress() !== $event->getNextAddress()
&& null !== $event->getPreviousAddress()
) {
$person = $event->getPerson();
foreach ($person->getCurrentAccompanyingPeriods() as $period) {
if ($period->getStep() === AccompanyingPeriod::STEP_DRAFT) {
continue;
}
if (
$period->getPersonLocation() === $person
&& (
$event->getMoveDate() >= $period->getLastLocationHistory()->getStartDate()
|| $event->willChangeBeActiveAt(new DateTimeImmutable('now'))
)
&& null !== $period->getUser()
&& $period->getUser() !== $this->security->getUser()
) {
// reset the location, back to an address
$period->setPersonLocation(null);
$period->setAddressLocation(Address::createFromAddress($event->getPreviousAddress()));
$notification = new Notification();
$notification
->addAddressee($period->getUser())
->setTitle($this->translator->trans('period_notification.Person locating period has moved'))
->setRelatedEntityClass(AccompanyingPeriod::class)
->setRelatedEntityId($period->getId())
->setMessage($this->engine->render('@ChillPerson/AccompanyingPeriod/notification_location_user_on_period_has_moved.fr.txt.twig', [
'oldPersonLocation' => $person,
'period' => $period,
]));
$this->entityManager->persist($notification);
}
}
}
}
}

View File

@ -60,6 +60,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
{
if ($period->hasPreviousUser()
&& $period->getUser() !== $this->security->getUser()
&& null !== $period->getUser()
&& $period->getStep() !== AccompanyingPeriod::STEP_DRAFT
) {
$this->generateNotificationToUser($period);

View File

@ -32,6 +32,7 @@ use Symfony\Component\Workflow\Registry;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_slice;
use function is_array;
/**
@ -221,9 +222,11 @@ class AccompanyingCourseController extends Controller
$activities = $this->getDoctrine()->getManager()->getRepository(Activity::class)->findBy(
['accompanyingPeriod' => $accompanyingCourse],
['date' => 'DESC'],
['date' => 'DESC', 'id' => 'DESC'],
);
$activities = array_slice($activities, 0, 3);
$works = $this->workRepository->findByAccompanyingPeriod(
$accompanyingCourse,
['startDate' => 'DESC', 'endDate' => 'DESC'],

View File

@ -16,28 +16,37 @@ use Chill\MainBundle\Entity\Address;
use Chill\MainBundle\Entity\AddressReference;
use Chill\MainBundle\Serializer\Model\Collection;
use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Event\Person\PersonAddressMoveEvent;
use Chill\PersonBundle\Repository\Household\HouseholdACLAwareRepositoryInterface;
use Chill\PersonBundle\Repository\Household\HouseholdRepository;
use Chill\PersonBundle\Security\Authorization\HouseholdVoter;
use DateTimeImmutable;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use function array_filter;
use function array_values;
class HouseholdApiController extends ApiController
{
private EventDispatcherInterface $eventDispatcher;
private HouseholdACLAwareRepositoryInterface $householdACLAwareRepository;
private HouseholdRepository $householdRepository;
public function __construct(
EventDispatcherInterface $eventDispatcher,
HouseholdRepository $householdRepository,
HouseholdACLAwareRepositoryInterface $householdACLAwareRepository
) {
$this->eventDispatcher = $eventDispatcher;
$this->householdRepository = $householdRepository;
$this->householdACLAwareRepository = $householdACLAwareRepository;
}
@ -66,9 +75,51 @@ class HouseholdApiController extends ApiController
]);
}
public function householdAddressApi($id, Request $request, string $_format): Response
/**
* Add an address to a household.
*
* @Route("/api/1.0/person/household/{id}/address.{_format}", name="chill_api_single_household_address",
* methods={"POST"}, requirements={"_format": "json"})
*/
public function householdAddressApi(Household $household, Request $request, string $_format): Response
{
return $this->addRemoveSomething('address', $id, $request, $_format, 'address', Address::class, ['groups' => ['read']]);
$this->denyAccessUnlessGranted(HouseholdVoter::EDIT, $household);
/** @var Address $address */
$address = $this->getSerializer()->deserialize($request->getContent(), Address::class, $_format, [
AbstractNormalizer::GROUPS => ['write'],
]);
$household->addAddress($address);
foreach ($household->getMembersOnRange(
DateTimeImmutable::createFromMutable($address->getValidFrom()),
null === $address->getValidTo() ? null :
DateTimeImmutable::createFromMutable($address->getValidTo())
) as $member) {
/** @var HouseholdMember $member */
$event = new PersonAddressMoveEvent($member->getPerson());
$event
->setPreviousAddress($household->getPreviousAddressOf($address))
->setNextAddress($address);
dump($event);
$this->eventDispatcher->dispatch($event);
}
$errors = $this->getValidator()->validate($household);
if ($errors->count() > 0) {
return $this->json($errors, 422);
}
$this->getDoctrine()->getManager()->flush();
return $this->json(
$address,
Response::HTTP_OK,
[],
[AbstractNormalizer::GROUPS => ['read']]
);
}
/**

View File

@ -24,7 +24,7 @@ use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
use function count;

View File

@ -26,7 +26,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Serializer\Exception;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;
@ -180,6 +180,7 @@ class HouseholdMemberController extends ApiController
public function move(Request $request, $_format): Response
{
try {
/** @var MembersEditor $editor */
$editor = $this->getSerializer()
->deserialize(
$request->getContent(),
@ -199,6 +200,9 @@ class HouseholdMemberController extends ApiController
return $this->json($errors, 422);
}
// launch events on post move
$editor->postMove();
$em = $this->getDoctrine()->getManager();
// if new household, persist it

View File

@ -30,8 +30,8 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;
use function hash;

View File

@ -28,7 +28,7 @@ use http\Exception\InvalidArgumentException;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;

View File

@ -12,12 +12,9 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Controller;
use Chill\MainBundle\CRUD\Controller\ApiController;
use Chill\MainBundle\Doctrine\ORM\Hydration\FlatHierarchyEntityHydrator;
use Chill\MainBundle\Pagination\PaginatorInterface;
use DateTimeImmutable;
use Doctrine\ORM\Query;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class SocialIssueApiController extends ApiController
{
@ -32,22 +29,10 @@ class SocialIssueApiController extends ApiController
$query->setParameter('now', new DateTimeImmutable());
}
protected function getQueryResult(string $action, Request $request, string $_format, int $totalItems, PaginatorInterface $paginator, $query)
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format)
{
// In order to work, this hydrator only works with
// entities having the field "children" set up.
return $query
->getQuery()
->setHint(Query::HINT_INCLUDE_META_COLUMNS, true)
->getResult(FlatHierarchyEntityHydrator::LIST);
}
$query->addOrderBy('e.ordering', 'ASC');
protected function onPostIndexBuildQuery(string $action, Request $request, string $_format, int $totalItems, PaginatorInterface $paginator, $query): ?Response
{
$query
->orderBy('GET_JSON_FIELD_BY_KEY(e.title, :locale)', 'ASC')
->setParameter(':locale', $request->getLocale());
return null;
return $query;
}
}

View File

@ -527,15 +527,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
Request::METHOD_HEAD => true,
],
],
'address' => [
'methods' => [
Request::METHOD_POST => true,
Request::METHOD_DELETE => true,
Request::METHOD_GET => false,
Request::METHOD_HEAD => false,
],
'controller_action' => 'householdAddressApi',
],
'suggestHouseholdByAccompanyingPeriodParticipation' => [
'path' => '/suggest/by-person/{person_id}/through-accompanying-period-participation.{_format}',
'methods' => [

View File

@ -21,6 +21,7 @@ use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\UserJob;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodLocationHistory;
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
use Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive;
use Chill\PersonBundle\Entity\AccompanyingPeriod\Comment;
@ -37,17 +38,19 @@ use DateTimeImmutable;
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM;
use Iterator;
use LogicException;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Validator\GroupSequenceProviderInterface;
use UnexpectedValueException;
use function in_array;
use const SORT_REGULAR;
/**
@ -212,6 +215,12 @@ class AccompanyingPeriod implements
*/
private ?UserJob $job = null;
/**
* @ORM\OneToMany(targetEntity=AccompanyingPeriodLocationHistory::class,
* mappedBy="period", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private Collection $locationHistories;
/**
* @var DateTime
*
@ -384,6 +393,7 @@ class AccompanyingPeriod implements
$this->works = new ArrayCollection();
$this->resources = new ArrayCollection();
$this->userHistories = new ArrayCollection();
$this->locationHistories = new ArrayCollection();
}
/**
@ -434,6 +444,39 @@ class AccompanyingPeriod implements
return $this;
}
public function addLocationHistory(AccompanyingPeriodLocationHistory $history): self
{
if ($this->getStep() === self::STEP_DRAFT) {
return $this;
}
if (!$this->locationHistories->contains($history)) {
$this->locationHistories[] = $history;
$history->setPeriod($this);
}
// ensure continuity of histories
$criteria = new Criteria();
$criteria->orderBy(['startDate' => Criteria::ASC, 'id' => Criteria::ASC]);
/** @var Iterator $locations */
$locations = $this->getLocationHistories()->matching($criteria)->getIterator();
$locations->rewind();
do {
/** @var AccompanyingPeriodLocationHistory $current */
$current = $locations->current();
$locations->next();
if ($locations->valid()) {
$next = $locations->current();
$current->setEndDate($next->getStartDate());
}
} while ($locations->valid());
return $this;
}
public function addPerson(?Person $person = null): self
{
if (null !== $person) {
@ -666,6 +709,17 @@ class AccompanyingPeriod implements
return $this->job;
}
public function getLastLocationHistory(): ?AccompanyingPeriodLocationHistory
{
foreach ($this->getLocationHistories() as $locationHistory) {
if (null === $locationHistory->getEndDate()) {
return $locationHistory;
}
}
return null;
}
/**
* Get the location, taking precedence into account.
*
@ -680,6 +734,14 @@ class AccompanyingPeriod implements
return $this->getAddressLocation();
}
/**
* @return Collection|AccompanyingPeriodLocationHistory[]
*/
public function getLocationHistories(): Collection
{
return $this->locationHistories;
}
/**
* Get where the location is.
*
@ -982,6 +1044,15 @@ class AccompanyingPeriod implements
$this->comments->removeElement($comment);
}
public function removeLocationHistory(AccompanyingPeriodLocationHistory $history): self
{
if ($this->locationHistories->removeElement($history)) {
$history->setPeriod(null);
}
return $this;
}
/**
* Remove Participation.
*/
@ -1036,7 +1107,18 @@ class AccompanyingPeriod implements
*/
public function setAddressLocation(?Address $addressLocation = null): self
{
$this->addressLocation = $addressLocation;
if ($this->addressLocation !== $addressLocation) {
$this->addressLocation = $addressLocation;
if (null !== $addressLocation) {
$locationHistory = new AccompanyingPeriodLocationHistory();
$locationHistory
->setStartDate(new DateTimeImmutable('now'))
->setAddressLocation($addressLocation);
$this->addLocationHistory($locationHistory);
}
}
return $this;
}
@ -1139,7 +1221,18 @@ class AccompanyingPeriod implements
*/
public function setPersonLocation(?Person $person = null): self
{
$this->personLocation = $person;
if ($this->personLocation !== $person) {
$this->personLocation = $person;
if (null !== $person) {
$locationHistory = new AccompanyingPeriodLocationHistory();
$locationHistory
->setStartDate(new DateTimeImmutable('now'))
->setPersonLocation($person);
$this->addLocationHistory($locationHistory);
}
}
return $this;
}
@ -1206,8 +1299,14 @@ class AccompanyingPeriod implements
public function setStep(string $step): self
{
$previous = $this->step;
$this->step = $step;
if (self::STEP_DRAFT === $previous && self::STEP_DRAFT !== $step) {
$this->bootPeriod();
}
return $this;
}
@ -1246,6 +1345,17 @@ class AccompanyingPeriod implements
return $this;
}
private function bootPeriod(): void
{
// first location history
$locationHistory = new AccompanyingPeriodLocationHistory();
$locationHistory
->setStartDate(new DateTimeImmutable('now'))
->setPersonLocation($this->getPersonLocation())
->setAddressLocation($this->getAddressLocation());
$this->addLocationHistory($locationHistory);
}
private function setRequestorPerson(?Person $requestorPerson = null): self
{
$this->requestorPerson = $requestorPerson;

View File

@ -0,0 +1,129 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Chill\MainBundle\Entity\Address;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table("chill_person_accompanying_period_location_history")
*/
class AccompanyingPeriodLocationHistory implements TrackCreationInterface
{
use TrackCreationTrait;
/**
* @ORM\ManyToOne(targetEntity=Address::class, cascade={"persist"})
*/
private ?Address $addressLocation = null;
/**
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
*/
private ?DateTimeImmutable $endDate = null;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class)
*/
private AccompanyingPeriod $period;
/**
* @ORM\ManyToOne(targetEntity=Person::class)
*/
private ?Person $personLocation = null;
/**
* @ORM\Column(type="date_immutable")
*/
private ?DateTimeImmutable $startDate = null;
public function getAddressLocation(): ?Address
{
return $this->addressLocation;
}
public function getEndDate(): ?DateTimeImmutable
{
return $this->endDate;
}
public function getId(): ?int
{
return $this->id;
}
public function getPeriod(): AccompanyingPeriod
{
return $this->period;
}
public function getPersonLocation(): ?Person
{
return $this->personLocation;
}
public function getStartDate(): ?DateTimeImmutable
{
return $this->startDate;
}
public function setAddressLocation(?Address $addressLocation): AccompanyingPeriodLocationHistory
{
$this->addressLocation = $addressLocation;
return $this;
}
public function setEndDate(?DateTimeImmutable $endDate): AccompanyingPeriodLocationHistory
{
$this->endDate = $endDate;
return $this;
}
/**
* @internal use AccompanyingPeriod::addLocationHistory
*/
public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriodLocationHistory
{
$this->period = $period;
return $this;
}
public function setPersonLocation(?Person $personLocation): AccompanyingPeriodLocationHistory
{
$this->personLocation = $personLocation;
return $this;
}
public function setStartDate(?DateTimeImmutable $startDate): AccompanyingPeriodLocationHistory
{
$this->startDate = $startDate;
return $this;
}
}

View File

@ -66,6 +66,7 @@ class AccompanyingPeriodParticipation
$this->startDate = new DateTime('now');
$this->accompanyingPeriod = $accompanyingPeriod;
$this->person = $person;
$person->getAccompanyingPeriodParticipations()->add($this);
}
public function getAccompanyingPeriod(): ?AccompanyingPeriod

View File

@ -106,19 +106,13 @@ class Household
$this->compositions = new ArrayCollection();
}
/**
* @return $this
*/
public function addAddress(Address $address)
public function addAddress(Address $address): self
{
foreach ($this->getAddresses() as $a) {
if ($a->getValidFrom() <= $address->getValidFrom() && $a->getValidTo() === null) {
$a->setValidTo($address->getValidFrom());
}
if (!$this->addresses->contains($address)) {
$this->addresses[] = $address;
$this->makeAddressConsistent();
}
$this->addresses[] = $address;
return $this;
}
@ -157,6 +151,31 @@ class Household
return $this->addresses;
}
public function getAddressesOrdered(): array
{
$addresses = $this->getAddresses()->toArray();
usort($addresses, static function (Address $a, Address $b) {
$validFromA = $a->getValidFrom()->format('Y-m-d');
$validFromB = $b->getValidFrom()->format('Y-m-d');
if ($a === $b) {
if (null === $a->getId()) {
return 1;
}
if (null === $b->getId()) {
return -1;
}
return $a->getId() <=> $b->getId();
}
return $validFromA <=> $validFromB;
});
return $addresses;
}
public function getCommentMembers(): CommentEmbeddable
{
return $this->commentMembers;
@ -339,7 +358,7 @@ class Household
$membership->getEndDate()
)->filter(
static function (HouseholdMember $m) use ($membership) {
return $m !== $membership;
return $m->getPerson() !== $membership->getPerson();
}
);
}
@ -358,24 +377,25 @@ class Household
public function getMembersOnRange(DateTimeImmutable $from, ?DateTimeImmutable $to): Collection
{
$criteria = new Criteria();
$expr = Criteria::expr();
return $this->getMembers()->filter(static function (HouseholdMember $m) use ($from, $to) {
if (null === $m->getEndDate() && null !== $to) {
return $m->getStartDate() <= $to;
}
$criteria->where(
$expr->gte('startDate', $from)
);
if (null === $to) {
return $m->getStartDate() >= $from || null === $m->getEndDate();
}
if (null !== $to) {
$criteria->andWhere(
$expr->orX(
$expr->lte('endDate', $to),
$expr->eq('endDate', null)
),
);
}
if (null !== $m->getEndDate() && $m->getEndDate() < $from) {
return false;
}
return $this->getMembers()
->matching($criteria);
if ($m->getStartDate() <= $to) {
return true;
}
return false;
});
}
public function getNonCurrentMembers(?DateTimeImmutable $now = null): Collection
@ -418,6 +438,25 @@ class Household
return $this->getNonCurrentMembers($now)->matching($criteria);
}
public function getPreviousAddressOf(Address $address): ?Address
{
$iterator = new ArrayIterator($this->getAddressesOrdered());
$iterator->rewind();
while ($iterator->valid()) {
$current = $iterator->current();
$iterator->next();
if ($iterator->valid()) {
if ($iterator->current() === $address) {
return $current;
}
}
}
return null;
}
public function getWaitingForBirth(): bool
{
return $this->waitingForBirth;
@ -462,6 +501,23 @@ class Household
} while ($iterator->valid());
}
public function makeAddressConsistent(): void
{
$iterator = new ArrayIterator($this->getAddressesOrdered());
$iterator->rewind();
while ($iterator->valid()) {
$current = $iterator->current();
$iterator->next();
if ($iterator->valid()) {
$current->setValidTo($iterator->current()->getValidFrom());
}
}
}
public function removeAddress(Address $address)
{
$this->addresses->removeElement($address);

View File

@ -930,6 +930,8 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* Get current accompanyingPeriods array.
*
* @return AccompanyingPeriod[]|array
*/
public function getCurrentAccompanyingPeriods(): array
{

View File

@ -0,0 +1,209 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Event\Person;
use Chill\MainBundle\Entity\Address;
use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Entity\Person;
use DateTime;
use DateTimeImmutable;
use Symfony\Contracts\EventDispatcher\Event;
class PersonAddressMoveEvent extends Event
{
public const PERSON_MOVE_POST = 'chill_person.person_move_post';
private ?Address $nextAddress = null;
private ?HouseholdMember $nextMembership = null;
private Person $person;
private ?Address $previousAddress = null;
private ?HouseholdMember $previousMembership = null;
public function __construct(
Person $person
) {
$this->person = $person;
}
/**
* Get the date of the move.
*
* It might be either:
*
* * the date of the new membership;
* * or the date of the move
* * or the date when the household leaving take place (the end date of the previous membership)
*/
public function getMoveDate(): DateTimeImmutable
{
if ($this->personLeaveWithoutHousehold()) {
return $this->getPreviousMembership()->getEndDate();
}
if ($this->personChangeHousehold()) {
return $this->getNextMembership()->getStartDate();
}
// person is changing address without household
return DateTimeImmutable::createFromMutable($this->getNextAddress()->getValidFrom());
}
public function getNextAddress(): ?Address
{
if (null !== $this->getNextMembership()) {
return $this->getNextMembership()->getHousehold()
->getCurrentAddress(
$this->getMoveDate() === null ? null :
DateTime::createFromImmutable($this->getMoveDate())
);
}
return $this->nextAddress;
}
public function getNextHousehold(): ?Household
{
if (null !== $nextMembership = $this->getNextMembership()) {
return $nextMembership->getHousehold();
}
return null;
}
public function getNextMembership(): ?HouseholdMember
{
return $this->nextMembership;
}
public function getPerson(): Person
{
return $this->person;
}
public function getPreviousAddress(): ?Address
{
if (null !== $this->getPreviousMembership()) {
return $this->getPreviousMembership()->getHousehold()
->getCurrentAddress(
null === $this->getMoveDate() ? null :
DateTime::createFromImmutable($this->getMoveDate())
);
}
return $this->previousAddress;
}
public function getPreviousHousehold(): ?Household
{
if (null !== $previousMembership = $this->getPreviousMembership()) {
return $previousMembership->getHousehold();
}
return null;
}
public function getPreviousMembership(): ?HouseholdMember
{
return $this->previousMembership;
}
public function personChangeAddress(): bool
{
return $this->getPreviousAddress() !== $this->getNextAddress();
}
/**
* Return true if the user change household (this include the fact that a person
* leave household without a new one).
*/
public function personChangeHousehold(): bool
{
return $this->getPreviousHousehold() !== $this->getNextHousehold();
}
public function personLeaveWithoutHousehold(): bool
{
return null === $this->getNextMembership()
&& null === $this->getNextAddress();
}
public function setNextAddress(?Address $nextAddress): PersonAddressMoveEvent
{
$this->nextAddress = $nextAddress;
return $this;
}
public function setNextMembership(?HouseholdMember $nextMembership): PersonAddressMoveEvent
{
$this->nextMembership = $nextMembership;
return $this;
}
public function setPreviousAddress(?Address $previousAddress): PersonAddressMoveEvent
{
$this->previousAddress = $previousAddress;
return $this;
}
public function setPreviousMembership(?HouseholdMember $previousMembership): PersonAddressMoveEvent
{
$this->previousMembership = $previousMembership;
return $this;
}
/**
* Will the change affect this date ?
*/
public function willChangeBeActiveAt(DateTimeImmutable $date): bool
{
if ($this->getMoveDate() < $date && $this->personLeaveWithoutHousehold()) {
return true;
}
if ($this->personChangeHousehold()) {
if ($this->getMoveDate() > $date) {
return false;
}
if (null === $this->getNextMembership()->getEndDate()) {
return true;
}
if ($this->getNextMembership()->getEndDate() > $date) {
return true;
}
} else {
if ($this->getNextAddress()->getValidFrom() > $date) {
return false;
}
if (null === $this->getNextAddress()->getValidTo()) {
return true;
}
if ($this->getNextAddress()->getValidTo() > $date) {
return true;
}
}
return false;
}
}

View File

@ -20,8 +20,8 @@ use Doctrine\ORM\QueryBuilder;
use LogicException;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
final class CountryOfBirthAggregator implements AggregatorInterface, ExportElementValidatedInterface
{

View File

@ -17,7 +17,7 @@ use Chill\PersonBundle\Export\Declarations;
use Doctrine\ORM\QueryBuilder;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
final class GenderAggregator implements AggregatorInterface
{

View File

@ -20,8 +20,8 @@ use Doctrine\ORM\QueryBuilder;
use LogicException;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
final class NationalityAggregator implements AggregatorInterface, ExportElementValidatedInterface
{

View File

@ -29,9 +29,9 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
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 addcslashes;
use function array_key_exists;

View File

@ -24,8 +24,8 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Render a list of duplicate peoples.
@ -67,7 +67,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
$this->translator = $translator;
$this->router = $router;
$this->baseUrl = $routeParameters['scheme'] .
'://' . $routeParameters['host'];
'://' . $routeParameters['host'];
}
public function buildForm(FormBuilderInterface $builder)

Some files were not shown because too many files have changed in this diff Show More