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

This commit is contained in:
Julien Fastré 2022-05-06 14:47:15 +02:00
commit 189974d5e4
486 changed files with 4991 additions and 41741 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ docs/build/
/.php-cs-fixer.cache /.php-cs-fixer.cache
/.idea/ /.idea/
/.psalm/

View File

@ -11,9 +11,89 @@ and this project adheres to
## Unreleased ## Unreleased
<!-- write down unreleased development here --> <!-- write down unreleased development here -->
* [person] add civility when creating a person (with the on-the-fly component or in the php form) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/557)
* [person] add address when creating a person (with the on-the-fly component or in the php form) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/557)
* [person] add household creation API point (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/557)
## Test releases
### 2021-04-29
* [person] prevent circular references in PersonDocGenNormalizer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/527)
* [person] add maritalStatusComment to PersonDocGenNormalizer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/582)
* Load relationships without gender in french fixtures
* Add command to remove old draft accompanying periods
### 2021-04-28
* [address] fix bug when editing address: update location and addressreferenceId + better update of the map in edition (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/593)
* [main] avoid address reference search on undefined post code (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/561)
* [person] prevent duplicate relationship in filiation/household graph (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/560)
* [Documents] Validate storedObject and allow for null data (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/565)
* [parcours]: Comments can be unpinned + edit/delete for all users that are allowed to edit parcours (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/566)
### 2021-04-26
* [Datepickers] datepickers fixed when using keyboard to enter date (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/545)
* [social_action] Display 'agents traitants' in parcours resumé and social action list (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/568)
* [Person_search] Closed parcours shown within an accordeon that can be opened/closed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/574)
### 2021-04-24
* [notification email on course designation] allow raw string in email content generation
* [Accompanying period work] list evaluations associated to a work by startDate, and then by id, from the most recent to older
* [Documents] Change wording 'créer' to 'enregistrer' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/634)
* [Parcours]: The number of 'mes parcours' displayed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/572)
* [Hompage_widget]: Renaming of tabs and removal of social actions tab (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/570)
* [activity]: Ignore thirdparties when creating a social action via an activity (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/573)
* [parcours]: change wording of warning message and button when user is not associated to a household yet (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/590#note_918370943)
* [Accompanying period work evaluations] list documents associated to a work by creation date, and then by id, from the most recent to older
* [Course comment] add validationConstraint NotNull and NotBlank on comment content, to avoid sql error
* [Notifications] delay the sending of notificaiton to kernel.terminate
* [Notifications / Period user change] fix the sending of notification when user changes
* [Activity form] invert 'incoming' and 'receiving' in Activity form
* [Activity form] keep the same order for 'attendee' field in new and edit form
* [list with period] use "sameas" test operator to introduce requestor in list
* [notification email on course designation] allow raw string in email content generation
* [Accompanying period work] list evaluations associated to a work by startDate, and then by id, from the most recent to older
* [evaluation_document] changing date to datetime in order to display the time at which document was created (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/569)
### 2021-04-13
* [person] household address: add a form for editing the validFrom date (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/541)
* [person] householdmemberseditor: fix composition type bug in select form (vuejs) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/543)
* [docgen] add more persons choices in docgen for course: amongst requestor (if person), resources of course (if person), and PersonResource (if person);
* [docgen] add a new context with a list of activities in course
* [docgen] add a comment in budget lines
* [notifications] allow to send a notification to an email address. The address receive an access link
* [adresses] add constraints in database to avoid errors later: postcode not null, and validfrom <= validto
* [accompanying work editor] add a label on document title input
### 2021-04-07
* notification list: move action buttons outside of the toggle
* fix detecting of non-read notification
* filter users which are disabled in search user api
* order query for location and add pagination in list
* allow every person which has part for a workflow to see the workflow page
* able to see the workflow if the evaluation document has been deleted
* hardcode the list of supported mime types for edition with collabora
* list of accompanying course: allow to see the pinned comment in list_item
### 2021-04-06
* [main] notification toggle read: correct js syntax for compilation in production (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/548)
* [parcours] Display of interlocuteurs changed to flex-table in parcours edit page to prevent cut-off of information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/535)
* [activity] espace entre les boutons pour supprimer les documents
### continuous release in February and March
* Creation of PickCivilityType, and implementation in PersonType and ThirdpartyType
* [person] Accompanying course evaluation documents: disable the WOPI edit link if mimetype not supported and if no keyInfos * [person] Accompanying course evaluation documents: disable the WOPI edit link if mimetype not supported and if no keyInfos
(https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/585) (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/585)
* [activity] display error messages above the form in creating a new location (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/481) * [activity] display error messages above the form in creating a new location (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/481)
* [activity] show required field in activity edit/new by an asterix in the vuejs fields (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/494) * [activity] show required field in activity edit/new by an asterix in the vuejs fields (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/494)
* [ACL] fix allow to see the course, event if the scope'course does not contains the scope's user * [ACL] fix allow to see the course, event if the scope'course does not contains the scope's user
@ -52,6 +132,7 @@ and this project adheres to
* [household] bugfix if position of member is null, renderbox no longer throws an error (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/480) * [household] bugfix if position of member is null, renderbox no longer throws an error (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/480)
* [parcours] location cannot be removed if linked to a user (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/478) * [parcours] location cannot be removed if linked to a user (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/478)
* [person] email added to twig personRenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/490) * [person] email added to twig personRenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/490)
* [activity] Only youngest descendant is kept for social issues and actions (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/471)
* [person] Add link to current household in person banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/484) * [person] Add link to current household in person banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/484)
* [address] person badge in address history changed to open OnTheFly with all person info (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/489) * [address] person badge in address history changed to open OnTheFly with all person info (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/489)
* [person] Change 'personne' with 'usager' and '&' with 'ET' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/499) * [person] Change 'personne' with 'usager' and '&' with 'ET' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/499)
@ -72,7 +153,14 @@ and this project adheres to
* [household] Within parcours listing page of household add create button (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/560) * [household] Within parcours listing page of household add create button (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/560)
* [person_resource] bugfix when adding thirdparty or freetext resource + prevent personOwner themselves to be added. (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/526) * [person_resource] bugfix when adding thirdparty or freetext resource + prevent personOwner themselves to be added. (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/526)
* [aside_activity] style correction + sticky-form create button (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/529) * [aside_activity] style correction + sticky-form create button (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/529)
* [budget] order within the menu adjusted (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/592)
* [onthefly] fix create person. Bug was noticed in filiation (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/591)
* [parcours] Create document buttons made sticky (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/532)
* [person] Trailing guillemet removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/530)
* [notification] Display of social action within workflow notification set to display block (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/537)
* [onthefly] trim trailing whitespace in email of person and thirdparty (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/542)
* [action] Only youngest descendant is kept for social issues and actions (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/471)
## Test releases ## Test releases
### test release 2022-02-21 ### test release 2022-02-21
@ -101,8 +189,6 @@ and this project adheres to
* [bug]: fix confidential toggle of address in thirdpartyrenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/460) * [bug]: fix confidential toggle of address in thirdpartyrenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/460)
## Test releases
* Creation of PickCivilityType, and implementation in PersonType and ThirdpartyType
### test release 2022-02-14 ### test release 2022-02-14
@ -129,6 +215,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) * [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) * [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) * [Thirdparty_contact]: address blurred if confidential in view page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/450)
* [thirdparty] Add a contact to a thirdparty from within onTheFly (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/345)
### test release 2021-02-01 ### test release 2021-02-01
@ -151,18 +238,9 @@ and this project adheres to
* [fast_actions] improve fast-actions buttons override mechanism, fix https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/413 * [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. * [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) * [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. * [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 ### 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) * [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

@ -21,7 +21,7 @@
"knplabs/knp-time-bundle": "^1.12", "knplabs/knp-time-bundle": "^1.12",
"league/csv": "^9.7.1", "league/csv": "^9.7.1",
"nyholm/psr7": "^1.4", "nyholm/psr7": "^1.4",
"ocramius/package-versions": "^1.10", "ocramius/package-versions": "^1.10 || ^2",
"odolbeau/phone-number-bundle": "^3.6", "odolbeau/phone-number-bundle": "^3.6",
"phpoffice/phpspreadsheet": "^1.16", "phpoffice/phpspreadsheet": "^1.16",
"ramsey/uuid-doctrine": "^1.7", "ramsey/uuid-doctrine": "^1.7",
@ -33,6 +33,7 @@
"symfony/expression-language": "^4.4", "symfony/expression-language": "^4.4",
"symfony/form": "^4.4", "symfony/form": "^4.4",
"symfony/framework-bundle": "^4.4", "symfony/framework-bundle": "^4.4",
"symfony/http-foundation": "^4.4",
"symfony/intl": "^4.4", "symfony/intl": "^4.4",
"symfony/mailer": "^5.4", "symfony/mailer": "^5.4",
"symfony/mime": "^5.4", "symfony/mime": "^5.4",
@ -103,7 +104,8 @@
"ergebnis/composer-normalize": true, "ergebnis/composer-normalize": true,
"ocramius/package-versions": true, "ocramius/package-versions": true,
"phpro/grumphp": true, "phpro/grumphp": true,
"phpstan/extension-installer": true "phpstan/extension-installer": true,
"roave/you-are-using-it-wrong": true
}, },
"bin-dir": "bin", "bin-dir": "bin",
"optimize-autoloader": true, "optimize-autoloader": true,

View File

@ -5,11 +5,6 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
-
message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:\\$currentHouseholdParticipationAt\\.$#"
count: 3
path: src/Bundle/ChillPersonBundle/Entity/Person.php
- -
message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Entity\\\\Household\\\\PersonHouseholdAddress\\:\\:\\$relation\\.$#" message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Entity\\\\Household\\\\PersonHouseholdAddress\\:\\:\\$relation\\.$#"
count: 1 count: 1

View File

@ -450,18 +450,8 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php path: src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php
- -
message: "#^Method Chill\\\\ThirdPartyBundle\\\\Search\\\\ThirdPartySearch\\:\\:renderResult\\(\\) should return string but return statement is missing\\.$#" message: "#^Method Chill\\\\ThirdPartyBundle\\\\Search\\\\ThirdPartySearch\\:\\:renderResult\\(\\) should return string but return statement is missing\\.$#"
count: 1 count: 1
path: src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php path: src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php

View File

@ -3,6 +3,7 @@ parameters:
paths: paths:
- src/ - src/
excludePaths: excludePaths:
- .php_cs*
- docs/ - docs/
- src/Bundle/*/Tests/* - src/Bundle/*/Tests/*
- src/Bundle/*/tests/* - src/Bundle/*/tests/*

View File

@ -6,6 +6,7 @@
xmlns="https://getpsalm.org/schema/config" xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config tests/app/vendor/vimeo/psalm/config.xsd" xsi:schemaLocation="https://getpsalm.org/schema/config tests/app/vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml" errorBaseline="psalm-baseline.xml"
cacheDirectory="./.psalm"
> >
<projectFiles> <projectFiles>
<directory name="src" /> <directory name="src" />
@ -13,4 +14,15 @@
<directory name="./tests/" /> <directory name="./tests/" />
</ignoreFiles> </ignoreFiles>
</projectFiles> </projectFiles>
<!-- suppress error around parameter bags - see https://github.com/symfony/symfony/issues/45609#issuecomment-1056816975 -->
<!-- maybe to desactivate with php 8.1 ? -->
<issueHandlers>
<UndefinedDocblockClass>
<errorLevel type="suppress">
<referencedClass name="UnitEnum" />
</errorLevel>
</UndefinedDocblockClass>
</issueHandlers>
</psalm> </psalm>

View File

@ -54,7 +54,7 @@ class ActivityReasonCategoryController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillActivityBundle:ActivityReasonCategory')->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
@ -75,7 +75,7 @@ class ActivityReasonCategoryController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('ChillActivityBundle:ActivityReasonCategory')->findAll(); $entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->findAll();
return $this->render('ChillActivityBundle:ActivityReasonCategory:index.html.twig', [ return $this->render('ChillActivityBundle:ActivityReasonCategory:index.html.twig', [
'entities' => $entities, 'entities' => $entities,
@ -105,7 +105,7 @@ class ActivityReasonCategoryController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillActivityBundle:ActivityReasonCategory')->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
@ -125,7 +125,7 @@ class ActivityReasonCategoryController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillActivityBundle:ActivityReasonCategory')->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');

View File

@ -54,7 +54,7 @@ class ActivityReasonController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillActivityBundle:ActivityReason')->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReason entity.'); throw $this->createNotFoundException('Unable to find ActivityReason entity.');
@ -75,7 +75,7 @@ class ActivityReasonController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('ChillActivityBundle:ActivityReason')->findAll(); $entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->findAll();
return $this->render('ChillActivityBundle:ActivityReason:index.html.twig', [ return $this->render('ChillActivityBundle:ActivityReason:index.html.twig', [
'entities' => $entities, 'entities' => $entities,
@ -105,7 +105,7 @@ class ActivityReasonController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillActivityBundle:ActivityReason')->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReason entity.'); throw $this->createNotFoundException('Unable to find ActivityReason entity.');
@ -125,7 +125,7 @@ class ActivityReasonController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillActivityBundle:ActivityReason')->find($id); $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReason entity.'); throw $this->createNotFoundException('Unable to find ActivityReason entity.');

View File

@ -35,6 +35,7 @@ use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap; use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\SerializedName; use Symfony\Component\Serializer\Annotation\SerializedName;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* Class Activity. * Class Activity.
@ -93,6 +94,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
/** /**
* @ORM\ManyToMany(targetEntity="Chill\DocStoreBundle\Entity\StoredObject", cascade={"persist"}) * @ORM\ManyToMany(targetEntity="Chill\DocStoreBundle\Entity\StoredObject", cascade={"persist"})
* @Assert\Valid(traverse=true)
*/ */
private Collection $documents; private Collection $documents;
@ -231,11 +233,22 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
{ {
if (!$this->socialActions->contains($socialAction)) { if (!$this->socialActions->contains($socialAction)) {
$this->socialActions[] = $socialAction; $this->socialActions[] = $socialAction;
$this->ensureSocialActionConsistency();
} }
return $this; return $this;
} }
/**
* Add a social issue.
*
* Note: the social issue consistency (the fact that only yougest social issues
* are kept) is processed by an entity listener:
*
* @see{\Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodSocialIssueConsistencyEntityListener}
*
* @return $this
*/
public function addSocialIssue(SocialIssue $socialIssue): self public function addSocialIssue(SocialIssue $socialIssue): self
{ {
if (!$this->socialIssues->contains($socialIssue)) { if (!$this->socialIssues->contains($socialIssue)) {
@ -631,4 +644,13 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this; return $this;
} }
private function ensureSocialActionConsistency(): void
{
$ancestors = SocialAction::findAncestorSocialActions($this->getSocialActions());
foreach ($ancestors as $ancestor) {
$this->removeSocialAction($ancestor);
}
}
} }

View File

@ -66,9 +66,6 @@ class ActivityEntityListener
$newAction->addPerson($person); $newAction->addPerson($person);
} }
foreach ($associatedThirdparties as $thirdparty) {
$newAction->setHandlingThierparty($thirdparty);
}
$this->em->persist($newAction); $this->em->persist($newAction);
$this->em->flush(); $this->em->flush();
} }

View File

@ -373,8 +373,8 @@ class ActivityType extends AbstractType
'label' => $activityType->getLabel('sentReceived'), 'label' => $activityType->getLabel('sentReceived'),
'required' => $activityType->isRequired('sentReceived'), 'required' => $activityType->isRequired('sentReceived'),
'choices' => [ 'choices' => [
'Sent' => Activity::SENTRECEIVED_SENT,
'Received' => Activity::SENTRECEIVED_RECEIVED, 'Received' => Activity::SENTRECEIVED_RECEIVED,
'Sent' => Activity::SENTRECEIVED_SENT,
], ],
]); ]);
} }

View File

@ -12,13 +12,20 @@ declare(strict_types=1);
namespace Chill\ActivityBundle\Repository; namespace Chill\ActivityBundle\Repository;
use Chill\ActivityBundle\Entity\Activity; use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Entity\ActivityPresence;
use Chill\ActivityBundle\Entity\ActivityType;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter; use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\LocationType;
use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface; use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\AbstractQuery;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query\ResultSetMappingBuilder;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\Security;
@ -72,6 +79,86 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
->findByAccompanyingPeriod($period, $scopes, true, $limit, $start, $orderBy); ->findByAccompanyingPeriod($period, $scopes, true, $limit, $start, $orderBy);
} }
public function findByAccompanyingPeriodSimplified(AccompanyingPeriod $period, ?int $limit = 1000): array
{
$rsm = new ResultSetMappingBuilder($this->em);
$sql = '
SELECT
a.id AS activity_id,
date,
CASE WHEN durationtime IS NOT NULL THEN (EXTRACT(EPOCH from durationtime) / 60)::int ELSE 0 END AS durationtimeminute,
attendee_id,
comment_comment,
emergency,
sentreceived,
CASE WHEN traveltime IS NOT NULL THEN (EXTRACT(EPOCH from traveltime) / 60)::int ELSE 0 END AS traveltimeminute,
t.id AS type_id, t.name as type_name,
p.id AS presence_id, p.name AS presence_name,
location.id AS location_id, location.address_id, location.name AS location_name, location.phonenumber1, location.phonenumber2, location.email,
location.locationtype_id, locationtype.title AS locationtype_title,
users.userids AS userids,
thirdparties.thirdpartyids,
persons.personids,
actions.socialactionids,
issues.socialissueids
FROM activity a
LEFT JOIN chill_main_location location ON a.location_id = location.id
LEFT JOIN chill_main_location_type locationtype ON location.locationtype_id = locationtype.id
LEFT JOIN activitytpresence p ON a.attendee_id = p.id
LEFT JOIN activitytype t ON a.type_id = t.id
LEFT JOIN LATERAL (SELECT jsonb_agg(user_id) userids, activity_id FROM activity_user AS au WHERE a.id = au.activity_id GROUP BY activity_id) AS users ON TRUE
LEFT JOIN LATERAL (SELECT jsonb_agg(thirdparty_id) thirdpartyids, activity_id FROM activity_thirdparty AS au WHERE a.id = au.activity_id GROUP BY activity_id) AS thirdparties ON TRUE
LEFT JOIN LATERAL (SELECT jsonb_agg(person_id) personids, activity_id FROM activity_person AS au WHERE a.id = au.activity_id GROUP BY activity_id) AS persons ON TRUE
LEFT JOIN LATERAL (SELECT jsonb_agg(socialaction_id) socialactionids, activity_id FROM chill_activity_activity_chill_person_socialaction AS au WHERE a.id = au.activity_id GROUP BY activity_id) AS actions ON TRUE
LEFT JOIN LATERAL (SELECT jsonb_agg(socialissue_id) socialissueids, activity_id FROM chill_activity_activity_chill_person_socialissue AS au WHERE a.id = au.activity_id GROUP BY activity_id) AS issues ON TRUE
WHERE accompanyingperiod_id = ?
ORDER BY a.date DESC, a.id DESC
LIMIT ?
';
$rsm
->addEntityResult(Activity::class, 'a')
->addFieldResult('a', 'activity_id', 'id')
->addFieldResult('a', 'date', 'date')
->addFieldResult('a', 'comment', 'comment')
->addFieldResult('a', 'sentreceived', 'sentReceived')
->addFieldResult('a', 'emergency', 'emergency')
->addJoinedEntityResult(Location::class, 'location', 'a', 'location')
->addFieldResult('location', 'location_id', 'id')
->addFieldResult('location', 'location_name', 'name')
->addFieldResult('location', 'phonenumber1', 'phonenumber1')
->addFieldResult('location', 'phonenumber2', 'phonenumber2')
->addFieldResult('location', 'email', 'email')
->addJoinedEntityResult(LocationType::class, 'locationType', 'location', 'locationType')
->addFieldResult('locationType', 'locationtype_id', 'id')
->addFieldResult('locationType', 'locationtype_title', 'title')
->addJoinedEntityResult(ActivityType::class, 'activityType', 'a', 'activityType')
->addFieldResult('activityType', 'type_id', 'id')
->addFieldResult('activityType', 'type_name', 'name')
->addJoinedEntityResult(ActivityPresence::class, 'activityPresence', 'a', 'attendee')
->addFieldResult('activityPresence', 'presence_id', 'id')
->addFieldResult('activityPresence', 'presence_name', 'name')
// results which cannot be mapped into entity
->addScalarResult('comment_comment', 'comment', Types::TEXT)
->addScalarResult('userids', 'userIds', Types::JSON)
->addScalarResult('thirdpartyids', 'thirdPartyIds', Types::JSON)
->addScalarResult('personids', 'personIds', Types::JSON)
->addScalarResult('socialactionids', 'socialActionIds', Types::JSON)
->addScalarResult('socialissueids', 'socialIssueIds', Types::JSON)
->addScalarResult('durationtimeminute', 'durationTimeMinute', Types::INTEGER)
->addScalarResult('traveltimeminute', 'travelTimeMinute', Types::INTEGER);
$nq = $this->em->createNativeQuery($sql, $rsm);
$nq->setParameter(0, $period->getId())->setParameter(1, $limit);
return $nq->getResult(AbstractQuery::HYDRATE_ARRAY);
}
/** /**
* @param array $orderBy * @param array $orderBy
* *

View File

@ -21,6 +21,15 @@ interface ActivityACLAwareRepositoryInterface
*/ */
public function findByAccompanyingPeriod(AccompanyingPeriod $period, string $role, ?int $start = 0, ?int $limit = 1000, ?array $orderBy = []): array; public function findByAccompanyingPeriod(AccompanyingPeriod $period, string $role, ?int $start = 0, ?int $limit = 1000, ?array $orderBy = []): array;
/**
* Return a list of activities, simplified as array (not object).
*
* The aim of this method is to get a long list of activities and keep performance.
*
* @return array an array of array, each item representing an activity
*/
public function findByAccompanyingPeriodSimplified(AccompanyingPeriod $period, ?int $limit = 1000): array;
/** /**
* @return Activity[]|array * @return Activity[]|array
*/ */

View File

@ -4,6 +4,13 @@ div.chill-dropzone__below-zone {
} }
} }
ul[data-collection-name="documents"] {
button.remove-entry {
margin: 0.5rem 0!important;
}
}
// do it in js does not work // do it in js does not work
// document.addEventListener('DOMContentLoaded', e => { // document.addEventListener('DOMContentLoaded', e => {
// const dropzoneBelow = document.querySelectorAll('div.chill-dropzone__below-zone'); // const dropzoneBelow = document.querySelectorAll('div.chill-dropzone__below-zone');

View File

@ -54,19 +54,19 @@
{{ $t('activity.select_first_a_social_issue') }} {{ $t('activity.select_first_a_social_issue') }}
</span> </span>
<template v-else-if="socialActionsList.length > 0"> <template v-else-if="socialActionsList.length > 0">
<check-social-action <check-social-action
v-if="socialIssuesSelected.length || socialActionsSelected.length" v-if="socialIssuesSelected.length || socialActionsSelected.length"
v-for="action in socialActionsList" v-for="action in socialActionsList"
:key="action.id" :key="action.id"
:action="action" :action="action"
:selection="socialActionsSelected" :selection="socialActionsSelected"
@updateSelected="updateActionsSelected"> @updateSelected="updateActionsSelected">
</check-social-action> </check-social-action>
</template> </template>
<span v-else-if="actionAreLoaded && socialActionsList.length === 0" class="inline-choice chill-no-data-statement mt-3"> <span v-else-if="actionAreLoaded && socialActionsList.length === 0" class="inline-choice chill-no-data-statement mt-3">
{{ $t('activity.social_action_list_empty') }} {{ $t('activity.social_action_list_empty') }}
</span> </span>
@ -111,7 +111,7 @@ export default {
return this.$store.state.socialIssuesOther; return this.$store.state.socialIssuesOther;
}, },
socialActionsList() { socialActionsList() {
return this.$store.state.socialActionsList; return this.$store.getters.socialActionsListSorted;
}, },
socialActionsSelected() { socialActionsSelected() {
return this.$store.state.activity.socialActions; return this.$store.state.activity.socialActions;

View File

@ -101,6 +101,9 @@ const store = createStore({
state.activity.activityType.thirdPartiesVisible !== 0) state.activity.activityType.thirdPartiesVisible !== 0)
); );
}, },
socialActionsListSorted(state) {
return [ ...state.socialActionsList].sort((a, b) => a.ordering - b.ordering);
},
}, },
mutations: { mutations: {
// SocialIssueAcc // SocialIssueAcc
@ -131,7 +134,6 @@ const store = createStore({
state.socialActionsList = []; state.socialActionsList = [];
}, },
addActionInList(state, action) { addActionInList(state, action) {
//console.log('add action list', action.id);
state.socialActionsList.push(action); state.socialActionsList.push(action);
}, },
updateActionsSelected(state, actions) { updateActionsSelected(state, actions) {

View File

@ -1,56 +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);
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
/**
* @return string
*/
public function getCacheDir()
{
return sys_get_temp_dir() . '/ActivityBundle/cache';
}
/**
* @return string
*/
public function getLogDir()
{
return sys_get_temp_dir() . '/ActivityBundle/logs';
}
public function registerBundles()
{
return [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Chill\CustomFieldsBundle\ChillCustomFieldsBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new \Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Chill\PersonBundle\ChillPersonBundle(),
new Chill\MainBundle\ChillMainBundle(),
new Chill\ActivityBundle\ChillActivityBundle(),
new \Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
//add here all the required bundle (some bundle are not required)
];
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
}
}

View File

@ -1,20 +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);
use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
/** @var ClassLoader $loader */
$loader = require __DIR__ . '/../../../../../vendor/autoload.php';
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
return $loader;

File diff suppressed because one or more lines are too long

View File

@ -1,438 +0,0 @@
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "assets._default_package" (parent: assets.path_package).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.user.provider.concrete.chain_provider" (parent: security.user.provider.chain).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.user.provider.concrete.in_memory" (parent: security.user.provider.in_memory).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.user.provider.concrete.in_memory_admin" (parent: security.user.provider.in_memory.user).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.user.provider.concrete.users" (parent: doctrine.orm.security.user.provider).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.firewall.map.context.dev" (parent: security.firewall.context).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.context_listener.0" (parent: security.context_listener).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.logout_listener.default" (parent: security.logout_listener).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.logout.success_handler.default" (parent: security.logout.success_handler).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.authentication.provider.dao.default" (parent: security.authentication.provider.dao).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.authentication.success_handler.default.form_login" (parent: security.authentication.success_handler).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.authentication.failure_handler.default.form_login" (parent: security.authentication.failure_handler).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.authentication.listener.form" (parent: security.authentication.listener.abstract).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.authentication.listener.form.default" (parent: security.authentication.listener.form).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.authentication.form_entry_point.default" (parent: security.authentication.form_entry_point).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.authentication.listener.anonymous.default" (parent: security.authentication.listener.anonymous).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.authentication.provider.anonymous.default" (parent: security.authentication.provider.anonymous).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.exception_listener.default" (parent: security.exception_listener).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "security.firewall.map.context.default" (parent: security.firewall.context).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "swiftmailer.mailer.default.transport.eventdispatcher" (parent: swiftmailer.transport.eventdispatcher.abstract).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "swiftmailer.mailer.default.transport.authhandler" (parent: swiftmailer.transport.authhandler.abstract).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "swiftmailer.mailer.default.transport.buffer" (parent: swiftmailer.transport.buffer.abstract).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "swiftmailer.mailer.default.transport.smtp" (parent: swiftmailer.transport.smtp.abstract).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "swiftmailer.mailer.default" (parent: swiftmailer.mailer.abstract).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "swiftmailer.mailer.default.plugin.messagelogger" (parent: swiftmailer.plugin.messagelogger.abstract).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine.dbal.default_connection.configuration" (parent: doctrine.dbal.connection.configuration).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine.dbal.logger.profiling.default" (parent: doctrine.dbal.logger.profiling).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine.dbal.logger.chain.default" (parent: doctrine.dbal.logger.chain).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine.dbal.default_connection.event_manager" (parent: doctrine.dbal.connection.event_manager).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine.dbal.default_connection" (parent: doctrine.dbal.connection).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine.orm.default_configuration" (parent: doctrine.orm.configuration).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine_cache.providers.doctrine.orm.default_metadata_cache" (parent: doctrine_cache.abstract.array).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine_cache.providers.doctrine.orm.default_result_cache" (parent: doctrine_cache.abstract.array).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine_cache.providers.doctrine.orm.default_query_cache" (parent: doctrine_cache.abstract.array).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine.orm.default_manager_configurator" (parent: doctrine.orm.manager_configurator.abstract).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "doctrine.orm.default_entity_manager" (parent: doctrine.orm.entity_manager.abstract).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.request" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.translation" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.security" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.templating" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.profiler" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.router" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.php" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.event" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.assetic" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass: Resolving inheritance for "monolog.logger.doctrine" (parent: monolog.logger_prototype).
Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "validator.mapping.class_metadata_factory"; reason: private alias
Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "assetic.value_supplier"; reason: private alias
Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.dbal.event_manager"; reason: private alias
Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.orm.metadata.annotation_reader"; reason: private alias
Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "doctrine.orm.default_entity_manager.event_manager"; reason: private alias
Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "sensio_framework_extra.security.expression_language"; reason: private alias
Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "translator.logging.inner"; reason: private alias
Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass: Removed service "translator.data_collector.inner"; reason: private alias
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "assets.path_package"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "assets.url_package"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "assets.static_version_strategy"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.firewall.context"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.user.provider.in_memory"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.user.provider.in_memory.user"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.user.provider.chain"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.logout_listener"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.logout.handler.cookie_clearing"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.logout.success_handler"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.form_entry_point"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.listener.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.custom_success_handler"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.success_handler"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.custom_failure_handler"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.failure_handler"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.listener.form"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.listener.simple_form"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.simple_success_failure_handler"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.listener.simple_preauth"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.listener.x509"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.listener.remote_user"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.listener.basic"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.listener.digest"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.provider.dao"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.provider.simple"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.provider.pre_authenticated"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.exception_listener"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.switchuser_listener"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.listener.rememberme"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.provider.rememberme"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.rememberme.services.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.rememberme.services.persistent"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "security.authentication.rememberme.services.simplehash"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "monolog.logger_prototype"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.mailer.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.transport.sendmail.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.transport.mail.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.transport.null.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.transport.buffer.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.transport.authhandler.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.transport.eventdispatcher.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.plugin.redirecting.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.plugin.antiflood.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.plugin.impersonate.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.plugin.messagelogger.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.transport.smtp.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.transport.spool.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.spool.file.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "swiftmailer.spool.memory.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "assetic.worker.ensure_filter"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.apc"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.array"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.file_system"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.php_file"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.memcache"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.memcached"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.redis"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.wincache"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.xcache"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.zenddata"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.mongodb"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.riak"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine_cache.abstract.couchbase"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.logger.chain"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.logger.profiling"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.connection"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.connection.event_manager"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.dbal.connection.configuration"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.orm.configuration"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.orm.entity_manager.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.orm.manager_configurator.abstract"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass: Removed service "doctrine.orm.security.user.provider"; reason: abstract
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "session" previously pointing to "session.storage.mock_file" to "session.storage.filesystem".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "session.storage.native" previously pointing to "session.handler.native_file" to "session.handler".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "session.storage.php_bridge" previously pointing to "session.handler.native_file" to "session.handler".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "assetic.twig_directory_resource.kernel" previously pointing to "templating.loader.filesystem" to "templating.loader".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "chill.custom_field.text" previously pointing to "templating.engine.twig" to "templating".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "chill.custom_field.choice" previously pointing to "templating.engine.twig" to "templating".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "chill.custom_field.title" previously pointing to "templating.engine.twig" to "templating".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "translator_listener" previously pointing to "translator.data_collector" to "translator".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "validator.builder" previously pointing to "translator.data_collector" to "translator".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "data_collector.translation" previously pointing to "translator.data_collector" to "translator".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "twig.extension.trans" previously pointing to "translator.data_collector" to "translator".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "chill.custom_field.custom_fields_group_type" previously pointing to "translator.data_collector" to "translator".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "locale_listener" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "templating.helper.router" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "router.cache_warmer" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "router_listener" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "security.logout_url_generator" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "security.http_utils" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "security.http_utils" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "twig.extension.routing" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "web_profiler.controller.profiler" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "web_profiler.controller.router" previously pointing to "router.default" to "router".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "sensio_framework_extra.controller.listener" previously pointing to "annotations.file_cache_reader" to "annotation_reader".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "sensio_framework_extra.routing.loader.annot_class" previously pointing to "annotations.file_cache_reader" to "annotation_reader".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "security.user_password_encoder.generic" previously pointing to "security.encoder_factory.generic" to "security.encoder_factory".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "security.validator.user_password" previously pointing to "security.encoder_factory.generic" to "security.encoder_factory".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "security.authentication.provider.dao.default" previously pointing to "security.encoder_factory.generic" to "security.encoder_factory".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "twig" previously pointing to "twig.loader.filesystem" to "twig.loader".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "swiftmailer.email_sender.listener" previously pointing to "monolog.logger" to "logger".
Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass: Changed reference of service "swiftmailer.mailer.default" previously pointing to "swiftmailer.mailer.default.transport.smtp" to "swiftmailer.mailer.default.transport".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "templating.cache_warmer.template_paths" to "cache_warmer".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.asset_manager_cache_warmer" to "cache_warmer".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "translation.warmer" to "cache_warmer".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "router.cache_warmer" to "cache_warmer".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.proxy_cache_warmer" to "cache_warmer".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "translator.selector" to "translator.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "test.client.history" to "test.client".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "test.client.cookiejar" to "test.client".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "session.attribute_bag" to "session".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "session.flash_bag" to "session".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "16f9ce82abe2adc8b44c9c8d29afbc93d322e7fad5e23fae42fb16c689658c58_1" to "form.resolved_type_factory".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "form.extension" to "form.registry".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "form.type_extension.form.request_handler" to "form.type_extension.form.http_foundation".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "form.server_params" to "form.type_extension.form.request_handler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.csrf.token_generator" to "security.csrf.token_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.csrf.token_storage" to "security.csrf.token_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assets._default_package" to "assets.packages".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "validator.validator_factory" to "validator.builder".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "profiler.storage" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.config" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.ajax" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.exception" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.events" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.logger" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.time" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.memory" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.twig" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.security" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "swiftmailer.data_collector" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "data_collector.doctrine" to "profiler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.xml" to "routing.resolver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.yml" to "routing.resolver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.loader.php" to "routing.resolver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "sensio_framework_extra.routing.loader.annot_dir" to "routing.resolver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "sensio_framework_extra.routing.loader.annot_file" to "routing.resolver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "routing.resolver" to "routing.loader".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "debug.event_dispatcher.parent" to "debug.event_dispatcher".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "controller_resolver" to "debug.controller_resolver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.authentication.provider.dao.default" to "security.authentication.manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.authentication.provider.anonymous.default" to "security.authentication.manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.access.expression_voter" to "security.access.decision_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.access.role_hierarchy_voter" to "security.access.decision_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.access.authenticated_voter" to "security.access.decision_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.expression_language" to "security.access.expression_voter".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.firewall.map" to "security.firewall".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.request_matcher.5314eeb91110adf24b9b678372bb11bbe00e8858c519c088bfb65f525181ad3bf573fd1d" to "security.firewall.map".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.authentication.retry_entry_point" to "security.channel_listener".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.user.provider.concrete.in_memory_admin" to "security.user.provider.concrete.in_memory".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.logout.success_handler.default" to "security.logout_listener.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.logout.handler.session" to "security.logout_listener.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.user_checker" to "security.authentication.provider.dao.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.authentication.session_strategy" to "security.authentication.listener.form.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.authentication.success_handler.default.form_login" to "security.authentication.listener.form.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.authentication.failure_handler.default.form_login" to "security.authentication.listener.form.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.authentication.form_entry_point.default" to "security.exception_listener.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.channel_listener" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.context_listener.0" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.logout_listener.default" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.authentication.listener.form.default" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.authentication.listener.anonymous.default" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.access_listener" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.exception_listener.default" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.logout_url" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.security" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.profiler" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.trans" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.assets" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.actions" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.code" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.routing" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.yaml" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.debug.stopwatch" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.expression" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.httpkernel" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.form" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.debug" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.twig_extension" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.twig.doctrine_extension" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.dump" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.webprofiler" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.app_variable" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.configurator.environment" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.form.renderer" to "twig.extension.form".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.form.engine" to "twig.form.renderer".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "0ae0165e1c986a63ecc244514317fc4860d8c97fd0529833a00cfb95d75a4d92_1" to "swiftmailer.mailer.default.transport.authhandler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "0ae0165e1c986a63ecc244514317fc4860d8c97fd0529833a00cfb95d75a4d92_2" to "swiftmailer.mailer.default.transport.authhandler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "0ae0165e1c986a63ecc244514317fc4860d8c97fd0529833a00cfb95d75a4d92_3" to "swiftmailer.mailer.default.transport.authhandler".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "swiftmailer.transport.replacementfactory" to "swiftmailer.mailer.default.transport.buffer".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.twig_formula_loader" to "assetic.asset_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.twig_directory_resource.chillpersonbundle" to "assetic.asset_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.twig_directory_resource.chillmainbundle" to "assetic.asset_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.twig_directory_resource.kernel" to "assetic.asset_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.parameter_bag" to "assetic.asset_factory".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.value_supplier.default" to "assetic.twig_extension".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.twig_formula_loader.real" to "assetic.twig_formula_loader".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assetic.config_cache" to "assetic.twig_formula_loader".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.logger.chain.default" to "doctrine.dbal.default_connection.configuration".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.logger" to "doctrine.dbal.logger.chain.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.default_connection.configuration" to "doctrine.dbal.default_connection".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.dbal.default_connection.event_manager" to "doctrine.dbal.default_connection".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.default_metadata_driver" to "doctrine.orm.default_configuration".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.naming_strategy.default" to "doctrine.orm.default_configuration".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.quote_strategy.default" to "doctrine.orm.default_configuration".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.default_yml_metadata_driver" to "doctrine.orm.default_metadata_driver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.default_yml_metadata_driver" to "doctrine.orm.default_metadata_driver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.default_yml_metadata_driver" to "doctrine.orm.default_metadata_driver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.default_yml_metadata_driver" to "doctrine.orm.default_metadata_driver".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "doctrine.orm.default_configuration" to "doctrine.orm.default_entity_manager".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "sensio_framework_extra.security.expression_language.default" to "sensio_framework_extra.security.listener".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "sensio_distribution.webconfigurator.doctrine_step" to "sensio_distribution.webconfigurator".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "sensio_distribution.webconfigurator.secret_step" to "sensio_distribution.webconfigurator".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "translator.logging" to "translator".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "swiftmailer.mailer.default.transport.buffer" to "swiftmailer.mailer.default.transport".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "swiftmailer.mailer.default.transport.authhandler" to "swiftmailer.mailer.default.transport".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "swiftmailer.mailer.default.transport.eventdispatcher" to "swiftmailer.mailer.default.transport".
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "controller_resolver"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "translator.logging"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "translator.selector"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "translation.warmer"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "session.flash_bag"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "session.attribute_bag"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "session.handler.write_check"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "form.extension"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "form.type_extension.form.request_handler"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "form.server_params"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.csrf.token_generator"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.csrf.token_storage"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assets.empty_package"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assets._default_package"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "templating.engine.delegating"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "templating.cache_warmer.template_paths"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "templating.loader.cache"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "templating.loader.chain"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "validator.mapping.cache.apc"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "validator.validator_factory"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "profiler.storage"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.config"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.ajax"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.exception"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.events"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.logger"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.time"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.memory"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "16f9ce82abe2adc8b44c9c8d29afbc93d322e7fad5e23fae42fb16c689658c58_1"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "routing.resolver"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "routing.loader.xml"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "routing.loader.yml"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "routing.loader.php"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "router.cache_warmer"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "annotations.cached_reader"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "debug.event_dispatcher.parent"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.session_strategy"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.user_checker"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.expression_language"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.access.authenticated_voter"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.access.role_hierarchy_voter"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.access.expression_voter"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.firewall.map"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.listener.anonymous"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.provider.anonymous"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.retry_entry_point"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.basic_entry_point"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.digest_entry_point"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.channel_listener"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.context_listener"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.logout.handler.session"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.access_listener"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.rememberme.token.provider.in_memory"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.logout_url"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.security"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.security"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.user.provider.concrete.in_memory_admin"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.request_matcher.5314eeb91110adf24b9b678372bb11bbe00e8858c519c088bfb65f525181ad3bf573fd1d"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.context_listener.0"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.logout_listener.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.logout.success_handler.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.provider.dao.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.success_handler.default.form_login"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.failure_handler.default.form_login"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.listener.form.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.form_entry_point.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.listener.anonymous.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.authentication.provider.anonymous.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.exception_listener.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.app_variable"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.cache_warmer"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.loader.native_filesystem"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.loader.chain"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.profiler"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.twig"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.trans"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.assets"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.actions"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.code"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.routing"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.yaml"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.debug.stopwatch"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.expression"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.httpkernel"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.form"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.debug"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.form.engine"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.form.renderer"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.configurator.environment"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "monolog.formatter.chrome_php"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "monolog.formatter.gelf_message"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "monolog.formatter.html"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "monolog.formatter.json"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "monolog.formatter.line"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "monolog.formatter.loggly"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "monolog.formatter.normalizer"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "monolog.formatter.scalar"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "monolog.formatter.wildfire"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "0ae0165e1c986a63ecc244514317fc4860d8c97fd0529833a00cfb95d75a4d92_3"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "0ae0165e1c986a63ecc244514317fc4860d8c97fd0529833a00cfb95d75a4d92_2"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "0ae0165e1c986a63ecc244514317fc4860d8c97fd0529833a00cfb95d75a4d92_1"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "swiftmailer.transport.failover"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "swiftmailer.transport.mailinvoker"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "swiftmailer.transport.replacementfactory"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "swiftmailer.data_collector"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "swiftmailer.mailer.default.transport.eventdispatcher"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "swiftmailer.mailer.default.transport.authhandler"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "swiftmailer.mailer.default.transport.buffer"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.config_cache"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.asset_manager_cache_warmer"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.worker.cache_busting"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.parameter_bag"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.value_supplier.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.twig_extension"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.twig_formula_loader"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.twig_formula_loader.real"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.dbal.logger"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "data_collector.doctrine"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.twig.doctrine_extension"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.dbal.default_connection.configuration"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.dbal.logger.chain.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.dbal.default_connection.event_manager"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.proxy_cache_warmer"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.listeners.resolve_target_entity"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.naming_strategy.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.naming_strategy.underscore"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.quote_strategy.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.quote_strategy.ansi"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.default_configuration"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.default_yml_metadata_driver"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "doctrine.orm.default_metadata_driver"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "sensio_framework_extra.routing.loader.annot_dir"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "sensio_framework_extra.routing.loader.annot_file"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "sensio_framework_extra.security.expression_language.default"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.dump"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.webprofiler"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "sensio_distribution.webconfigurator.doctrine_step"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "sensio_distribution.webconfigurator.secret_step"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.twig_directory_resource.chillpersonbundle"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.twig_directory_resource.chillmainbundle"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assetic.twig_directory_resource.kernel"; reason: unused
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "templating.finder" to "cache_warmer".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "assets.empty_version_strategy" to "assets.packages".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "sensio_framework_extra.routing.loader.annot_class" to "routing.loader".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "sensio_framework_extra.routing.loader.annot_class" to "routing.loader".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "sensio_framework_extra.routing.loader.annot_class" to "routing.loader".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.access_map" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.http_utils" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.http_utils" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.http_utils" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.http_utils" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.http_utils" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.access_map" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.http_utils" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "security.http_utils" to "security.firewall.map.context.default".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.httpfoundation" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "twig.extension.httpfoundation" to "twig".
Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass: Inlined service "annotations.reader" to "annotation_reader".
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "assets.empty_version_strategy"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "templating.finder"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "annotations.reader"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.http_utils"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "security.access_map"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "twig.extension.httpfoundation"; reason: unused
Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass: Removed service "sensio_framework_extra.routing.loader.annot_class"; reason: unused

View File

@ -1,88 +0,0 @@
<?php return array (
0 => 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener',
1 => 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage',
2 => 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage',
3 => 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler',
4 => 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy',
5 => 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy',
6 => 'Symfony\\Component\\HttpFoundation\\Session\\Session',
7 => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables',
8 => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateReference',
9 => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateNameParser',
10 => 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocator',
11 => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator',
12 => 'Symfony\\Component\\Routing\\RequestContext',
13 => 'Symfony\\Component\\Routing\\Router',
14 => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher',
15 => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\Router',
16 => 'Symfony\\Component\\Config\\FileLocator',
17 => 'Symfony\\Component\\Debug\\ErrorHandler',
18 => 'Symfony\\Component\\EventDispatcher\\Event',
19 => 'Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher',
20 => 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener',
21 => 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener',
22 => 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver',
23 => 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent',
24 => 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent',
25 => 'Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent',
26 => 'Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent',
27 => 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent',
28 => 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent',
29 => 'Symfony\\Component\\HttpKernel\\KernelEvents',
30 => 'Symfony\\Component\\HttpKernel\\Config\\FileLocator',
31 => 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser',
32 => 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver',
33 => 'Symfony\\Component\\Security\\Http\\Firewall',
34 => 'Symfony\\Component\\Security\\Core\\User\\UserProviderInterface',
35 => 'Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager',
36 => 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage',
37 => 'Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManager',
38 => 'Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker',
39 => 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface',
40 => 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallMap',
41 => 'Symfony\\Bundle\\SecurityBundle\\Security\\FirewallContext',
42 => 'Symfony\\Component\\HttpFoundation\\RequestMatcher',
43 => 'Twig_Environment',
44 => 'Twig_Extension',
45 => 'Twig_Extension_Core',
46 => 'Twig_Extension_Escaper',
47 => 'Twig_Extension_Optimizer',
48 => 'Twig_LoaderInterface',
49 => 'Twig_Markup',
50 => 'Twig_Template',
51 => 'Monolog\\Formatter\\FormatterInterface',
52 => 'Monolog\\Formatter\\LineFormatter',
53 => 'Monolog\\Handler\\HandlerInterface',
54 => 'Monolog\\Handler\\AbstractHandler',
55 => 'Monolog\\Handler\\AbstractProcessingHandler',
56 => 'Monolog\\Handler\\StreamHandler',
57 => 'Monolog\\Handler\\FingersCrossedHandler',
58 => 'Monolog\\Handler\\FilterHandler',
59 => 'Monolog\\Handler\\TestHandler',
60 => 'Monolog\\Logger',
61 => 'Symfony\\Bridge\\Monolog\\Logger',
62 => 'Symfony\\Bridge\\Monolog\\Handler\\DebugHandler',
63 => 'Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface',
64 => 'Monolog\\Handler\\FingersCrossed\\ErrorLevelActivationStrategy',
65 => 'Symfony\\Bundle\\AsseticBundle\\DefaultValueSupplier',
66 => 'Symfony\\Bundle\\AsseticBundle\\Factory\\AssetFactory',
67 => 'Doctrine\\Common\\Annotations\\DocLexer',
68 => 'Doctrine\\Common\\Annotations\\FileCacheReader',
69 => 'Doctrine\\Common\\Annotations\\PhpParser',
70 => 'Doctrine\\Common\\Annotations\\Reader',
71 => 'Doctrine\\Common\\Lexer',
72 => 'Doctrine\\Common\\Persistence\\ConnectionRegistry',
73 => 'Doctrine\\Common\\Persistence\\Proxy',
74 => 'Doctrine\\Common\\Util\\ClassUtils',
75 => 'Doctrine\\Bundle\\DoctrineBundle\\Registry',
76 => 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener',
77 => 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener',
78 => 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DateTimeParamConverter',
79 => 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\DoctrineParamConverter',
80 => 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterInterface',
81 => 'Sensio\\Bundle\\FrameworkExtraBundle\\Request\\ParamConverter\\ParamConverterManager',
82 => 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener',
83 => 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener',
84 => 'Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener',
85 => 'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ConfigurationAnnotation',
);

View File

@ -1,77 +0,0 @@
imports:
- { resource: parameters.yml }
framework:
secret: Not very secret
router: { resource: "%kernel.root_dir%/config/routing.yml" }
form: true
csrf_protection: true
session: ~
default_locale: fr
translator: { fallback: fr }
profiler: { only_exceptions: false }
templating:
engines: ['twig']
doctrine:
dbal:
driver: pdo_pgsql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
mapping_types:
jsonb: json_array
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ ]
#java: /usr/bin/java
filters:
cssrewrite: ~
security:
providers:
chain_provider:
chain :
providers: [in_memory, users]
in_memory:
memory:
users:
admin: { password: olala, roles: 'ROLE_ADMIN' }
users:
entity:
class: Chill\MainBundle\Entity\User
property: username
encoders:
Chill\MainBundle\Entity\User:
algorithm: bcrypt
Symfony\Component\Security\Core\User\User: plaintext
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
default:
anonymous: ~
form_login:
csrf_parameter: _csrf_token
csrf_token_id: authenticate
csrf_provider: form.csrf_provider
logout: ~
http_basic:
access_control:
#disable authentication for tests
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
#- { path: ^/admin, roles: ROLE_ADMIN }
#- { path: ^/, roles: ROLE_USER }

View File

@ -1,7 +0,0 @@
imports:
- { resource: config.yml } #here we import a config.yml file, this is not required
framework:
test: ~
session:
storage_id: session.storage.filesystem

View File

@ -1,8 +0,0 @@
# config/config_test.yml
imports:
- { resource: config.yml } #here we import a config.yml file, this is not required
framework:
test: ~
session:
storage_id: session.storage.filesystem

View File

@ -1,9 +0,0 @@
#required by ConfigCustomizablesEntitiesTest::testNotEmptyConfig
imports:
- { resource: config_test.yml }
chill_custom_fields:
customizables_entities:
- { class: Test\With\A\Dummy\Entity, name: test }

View File

@ -1,7 +0,0 @@
parameters:
database_host: chill__database
database_port: 5432
database_name: postgres
database_user: postgres
database_password: postgres
locale: fr

View File

@ -1,7 +0,0 @@
parameters:
database_host: 127.0.0.1
database_port: 5432
database_name: test0
database_user: postgres
database_password: postgres
locale: fr

View File

@ -1,7 +0,0 @@
parameters:
database_host: 127.0.0.1
database_port: 5434
database_name: symfony
database_user: symfony
database_password: symfony
locale: fr

View File

@ -1,10 +0,0 @@
cl_custom_fields:
resource: .
type: chill_routes
chill_main:
resource: "@ChillMainBundle/Resources/config/routing.yml"
test_custom_field_form_render:
path: /customfieldsgroup/test/render/{id}
defaults: { _controller: ChillCustomFieldsBundle:CustomFieldsGroup:renderForm }

View File

@ -1,28 +0,0 @@
#!/usr/bin/env php
<?php
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);
set_time_limit(0);
/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require __DIR__.'/autoload.php';
$input = new ArgvInput();
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
if ($debug) {
Debug::enable();
}
$kernel = new AppKernel($env, $debug);
$application = new Application($kernel);
$application->run($input);

View File

@ -1,41 +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);
use Symfony\Component\Debug\Debug;
use Symfony\Component\HttpFoundation\Request;
// If you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
//umask(0000);
// This check prevents access to debug front controllers that are deployed by accident to production servers.
// Feel free to remove this, extend it, or make something more sophisticated.
if (
isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|| !(in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1'], true) || \PHP_SAPI === 'cli-server')
) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.');
}
$loader = require_once __DIR__ . '/../app/bootstrap.php.cache';
Debug::enable();
require_once __DIR__ . '/../app/AppKernel.php';
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

View File

@ -85,15 +85,15 @@
{{ form_row(form.comment) }} {{ form_row(form.comment) }}
{% endif %} {% endif %}
{%- if form.attendee is defined -%}
{{ form_row(form.attendee) }}
{% endif %}
{%- if form.documents is defined -%} {%- if form.documents is defined -%}
{{ form_row(form.documents) }} {{ form_row(form.documents) }}
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\ActivityBundle\Entity\Activity" data-entity-id="{{ entity.id }}"></div> <div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\ActivityBundle\Entity\Activity" data-entity-id="{{ entity.id }}"></div>
{% endif %} {% endif %}
{%- if form.attendee is defined -%}
{{ form_row(form.attendee) }}
{% endif %}
{# TODO .. status #} {# TODO .. status #}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">

View File

@ -0,0 +1,286 @@
<?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\ActivityBundle\Service\DocGenerator;
use Chill\ActivityBundle\Entity\ActivityPresence;
use Chill\ActivityBundle\Entity\ActivityType;
use Chill\ActivityBundle\Repository\ActivityACLAwareRepositoryInterface;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithAdminFormInterface;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Repository\UserRepository;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Chill\PersonBundle\Repository\PersonRepository;
use Chill\PersonBundle\Repository\SocialWork\SocialActionRepository;
use Chill\PersonBundle\Repository\SocialWork\SocialIssueRepository;
use Chill\PersonBundle\Service\DocGenerator\AccompanyingPeriodContext;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Repository\ThirdPartyRepository;
use DateTime;
use libphonenumber\PhoneNumber;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
class ListActivitiesByAccompanyingPeriodContext implements
DocGeneratorContextWithAdminFormInterface,
DocGeneratorContextWithPublicFormInterface
{
private AccompanyingPeriodContext $accompanyingPeriodContext;
private ActivityACLAwareRepositoryInterface $activityACLAwareRepository;
private NormalizerInterface $normalizer;
private PersonRepository $personRepository;
private SocialActionRepository $socialActionRepository;
private SocialIssueRepository $socialIssueRepository;
private ThirdPartyRepository $thirdPartyRepository;
private TranslatableStringHelperInterface $translatableStringHelper;
private UserRepository $userRepository;
public function __construct(
AccompanyingPeriodContext $accompanyingPeriodContext,
ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
NormalizerInterface $normalizer,
PersonRepository $personRepository,
SocialActionRepository $socialActionRepository,
SocialIssueRepository $socialIssueRepository,
ThirdPartyRepository $thirdPartyRepository,
TranslatableStringHelperInterface $translatableStringHelper,
UserRepository $userRepository
) {
$this->accompanyingPeriodContext = $accompanyingPeriodContext;
$this->activityACLAwareRepository = $activityACLAwareRepository;
$this->normalizer = $normalizer;
$this->personRepository = $personRepository;
$this->socialActionRepository = $socialActionRepository;
$this->socialIssueRepository = $socialIssueRepository;
$this->thirdPartyRepository = $thirdPartyRepository;
$this->translatableStringHelper = $translatableStringHelper;
$this->userRepository = $userRepository;
}
public function adminFormReverseTransform(array $data): array
{
return $this->accompanyingPeriodContext->adminFormReverseTransform($data);
}
public function adminFormTransform(array $data): array
{
return $this->accompanyingPeriodContext->adminFormTransform($data);
}
public function buildAdminForm(FormBuilderInterface $builder): void
{
$this->accompanyingPeriodContext->buildAdminForm($builder);
}
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void
{
$this->accompanyingPeriodContext->buildPublicForm($builder, $template, $entity);
}
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array
{
$data = $this->accompanyingPeriodContext->getData($template, $entity, $contextGenerationData);
$data['activities'] = $this->getActivitiesSimplified($entity);
return $data;
}
public function getDescription(): string
{
return 'docgen.Accompanying period with a list of activities description';
}
public function getEntityClass(): string
{
return AccompanyingPeriod::class;
}
public function getFormData(DocGeneratorTemplate $template, $entity): array
{
return $this->accompanyingPeriodContext->getFormData($template, $entity);
}
public static function getKey(): string
{
return self::class;
}
public function getName(): string
{
return 'docgen.Accompanying period with a list of activities';
}
public function hasAdminForm(): bool
{
return $this->accompanyingPeriodContext->hasAdminForm();
}
public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool
{
return $this->accompanyingPeriodContext->hasPublicForm($template, $entity);
}
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
{
$this->accompanyingPeriodContext->storeGenerated($template, $storedObject, $entity, $contextGenerationData);
}
private function getActivitiesSimplified(AccompanyingPeriod $period)
{
$activities =
$this->activityACLAwareRepository->findByAccompanyingPeriodSimplified($period);
$results = [];
foreach ($activities as $row) {
$activity = $row[0];
$activity['date'] = $this->normalizer->normalize($activity['date'], 'docgen', [
AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => DateTime::class,
]);
if (null === $activity['location']) {
$activity['location'] = $this->normalizer->normalize(null, 'docgen', [
AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => Location::class,
]);
$activity['location']['type'] = 'location';
} else {
$activity['location']['isNull'] = false;
$activity['location']['type'] = 'location';
foreach (['1', '2'] as $key) {
$activity['location']['phonenumber' . $key] = $this->normalizer->normalize(
$activity['location']['phonenumber' . $key],
'docgen',
[AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => PhoneNumber::class]
);
}
}
if (is_numeric($activity['location']['locationType']['id'])) {
$activity['location']['locationType']['title'] = $this->translatableStringHelper->localize(
$activity['location']['locationType']['title']
);
$activity['location']['locationType']['isNull'] = false;
$activity['location']['locationType']['type'] = 'locationType';
}
if (null !== $activity['activityType']) {
$activity['activityType']['name'] = $this->translatableStringHelper->localize(
$activity['activityType']['name']
);
$activity['activityType']['isNull'] = false;
$activity['activityType']['type'] = 'activityType';
} else {
$activity['activityType'] = $this->normalizer->normalize(null, 'docgen', [
AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => ActivityType::class,
]);
}
if (null !== $activity['attendee']) {
$activity['attendee']['name'] = $this->translatableStringHelper->localize(
$activity['attendee']['name']
);
$activity['attendee']['isNull'] = false;
$activity['attendee']['type'] = 'activityPresence';
} else {
$activity['attendee'] = $this->normalizer->normalize(null, 'docgen', [
AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => ActivityPresence::class,
]);
}
$activity['comment'] = (string) $row['comment'];
$activity['travelTimeMinute'] = $row['travelTimeMinute'];
$activity['durationTimeMinute'] = $row['durationTimeMinute'];
if (null !== $row['userIds']) {
foreach ($row['userIds'] as $id) {
$activity['users'][] = $this->normalizer->normalize(
$this->userRepository->find($id),
'docgen',
[AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => User::class]
);
}
} else {
$activity['users'] = [];
}
if (null !== $row['personIds']) {
foreach ($row['personIds'] as $id) {
$activity['persons'][] = $this->normalizer->normalize(
$this->personRepository->find($id),
'docgen',
[AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => Person::class]
);
}
} else {
$activity['persons'] = [];
}
if (null !== $row['thirdPartyIds']) {
foreach ($row['thirdPartyIds'] as $id) {
$activity['thirdParties'][] = $this->normalizer->normalize(
$this->thirdPartyRepository->find($id),
'docgen',
[AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => ThirdParty::class]
);
}
} else {
$activity['thirdParties'] = [];
}
if (null !== $row['socialActionIds']) {
foreach ($row['socialActionIds'] as $id) {
$activity['socialActions'][] = $this->normalizer->normalize(
$this->socialActionRepository->find($id),
'docgen',
[AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => SocialAction::class]
);
}
} else {
$activity['socialActions'] = [];
}
if (null !== $row['socialIssueIds']) {
foreach ($row['socialIssueIds'] as $id) {
$activity['socialIssues'][] = $this->normalizer->normalize(
$this->socialIssueRepository->find($id),
'docgen',
[AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => SocialIssue::class]
);
}
} else {
$activity['socialIssues'] = [];
}
$results[] = $activity;
}
return $results;
}
}

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
namespace Chill\ActivityBundle\Tests\Controller; namespace Chill\ActivityBundle\Tests\Controller;
use Chill\ActivityBundle\Entity\ActivityType;
use RuntimeException; use RuntimeException;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Security\Core\Role\Role;
@ -209,7 +210,7 @@ final class ActivityControllerTest extends WebTestCase
//get the social PermissionGroup, and remove CHILL_ACTIVITY_* //get the social PermissionGroup, and remove CHILL_ACTIVITY_*
$socialPermissionGroup = $em $socialPermissionGroup = $em
->getRepository('ChillMainBundle:PermissionsGroup') ->getRepository(\Chill\MainBundle\Entity\PermissionsGroup::class)
->findOneByName('social'); ->findOneByName('social');
$withoutActivityPermissionGroup = (new \Chill\MainBundle\Entity\PermissionsGroup()) $withoutActivityPermissionGroup = (new \Chill\MainBundle\Entity\PermissionsGroup())
->setName('social without activity'); ->setName('social without activity');
@ -221,7 +222,7 @@ final class ActivityControllerTest extends WebTestCase
} }
//create groupCenter //create groupCenter
$groupCenter = new \Chill\MainBundle\Entity\GroupCenter(); $groupCenter = new \Chill\MainBundle\Entity\GroupCenter();
$groupCenter->setCenter($em->getRepository('ChillMainBundle:Center') $groupCenter->setCenter($em->getRepository(\Chill\MainBundle\Entity\Center::class)
->findOneBy(['name' => 'Center A'])) ->findOneBy(['name' => 'Center A']))
->setPermissionsGroup($withoutActivityPermissionGroup); ->setPermissionsGroup($withoutActivityPermissionGroup);
$em->persist($withoutActivityPermissionGroup); $em->persist($withoutActivityPermissionGroup);
@ -249,7 +250,7 @@ final class ActivityControllerTest extends WebTestCase
$em = self::$kernel->getContainer() $em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager'); ->get('doctrine.orm.entity_manager');
$activities = $em->getRepository('ChillActivityBundle:Activity') $activities = $em->getRepository(\Chill\ActivityBundle\Entity\Activity::class)
->findBy(['person' => $person]); ->findBy(['person' => $person]);
if (count($activities) === 0) { if (count($activities) === 0) {
@ -281,7 +282,7 @@ final class ActivityControllerTest extends WebTestCase
$em = self::$kernel->getContainer() $em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager'); ->get('doctrine.orm.entity_manager');
$person = $em->getRepository('ChillPersonBundle:Person') $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)
->findOneBy([ ->findOneBy([
'firstName' => 'Depardieu', 'firstName' => 'Depardieu',
'lastName' => 'Gérard', 'lastName' => 'Gérard',
@ -304,7 +305,7 @@ final class ActivityControllerTest extends WebTestCase
{ {
$reasons = self::$kernel->getContainer() $reasons = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager') ->get('doctrine.orm.entity_manager')
->getRepository('ChillActivityBundle:ActivityReason') ->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)
->findAll(); ->findAll();
$reason = $reasons[array_rand($reasons)]; $reason = $reasons[array_rand($reasons)];
@ -323,7 +324,7 @@ final class ActivityControllerTest extends WebTestCase
{ {
$types = self::$kernel->getContainer() $types = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager') ->get('doctrine.orm.entity_manager')
->getRepository('ChillActivityBundle:ActivityType') ->getRepository(ActivityType::class)
->findAll(); ->findAll();
return $types[array_rand($types)]; return $types[array_rand($types)];
@ -339,7 +340,7 @@ final class ActivityControllerTest extends WebTestCase
{ {
$user = self::$kernel->getContainer() $user = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager') ->get('doctrine.orm.entity_manager')
->getRepository('ChillMainBundle:User') ->getRepository(\Chill\MainBundle\Entity\User::class)
->findOneByUsername($username); ->findOneByUsername($username);
if (null === $user) { if (null === $user) {
@ -349,7 +350,7 @@ final class ActivityControllerTest extends WebTestCase
$center = self::$kernel->getContainer() $center = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager') ->get('doctrine.orm.entity_manager')
->getRepository('ChillMainBundle:Center') ->getRepository(\Chill\MainBundle\Entity\Center::class)
->findOneByName($centerName); ->findOneByName($centerName);
// get scope reachable by both role UPDATE and DELETE // get scope reachable by both role UPDATE and DELETE

View File

@ -0,0 +1,114 @@
<?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\ActivityBundle\Tests\Entity;
use Chill\ActivityBundle\Entity\Activity;
use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodSocialIssueConsistencyEntityListener;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Doctrine\ORM\Event\LifecycleEventArgs;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
/**
* @internal
* @coversNothing
*/
final class ActivityTest extends TestCase
{
use ProphecyTrait;
public function testHierarchySocialActions(): void
{
$parent = new SocialAction();
$child = new SocialAction();
$parent->addChild($child);
$grandChild = new SocialAction();
$child->addChild($grandChild);
$activity = new Activity();
$activity->addSocialAction($parent);
$this->assertCount(1, $activity->getSocialActions());
$this->assertContains($parent, $activity->getSocialActions());
$activity->addSocialAction($grandChild);
$this->assertCount(1, $activity->getSocialActions());
$this->assertContains($grandChild, $activity->getSocialActions());
$this->assertNotContains($parent, $activity->getSocialActions());
$activity->addSocialAction($child);
$this->assertCount(1, $activity->getSocialActions());
$this->assertContains($grandChild, $activity->getSocialActions());
$this->assertNotContains($parent, $activity->getSocialActions());
$this->assertNotContains($child, $activity->getSocialActions());
$activity->addSocialAction($another = new SocialAction());
$this->assertCount(2, $activity->getSocialActions());
$this->assertContains($grandChild, $activity->getSocialActions());
$this->assertContains($another, $activity->getSocialActions());
$this->assertNotContains($parent, $activity->getSocialActions());
$this->assertNotContains($child, $activity->getSocialActions());
}
public function testHierarchySocialIssues(): void
{
$listener = new AccompanyingPeriodSocialIssueConsistencyEntityListener();
$event = $this->prophesize(LifecycleEventArgs::class)->reveal();
$parent = new SocialIssue();
$child = new SocialIssue();
$parent->addChild($child);
$grandChild = new SocialIssue();
$child->addChild($grandChild);
$activity = new Activity();
$activity->setAccompanyingPeriod(new AccompanyingPeriod());
$activity->addSocialIssue($parent);
$listener->preUpdate($activity, $event);
$this->assertCount(1, $activity->getSocialIssues());
$this->assertContains($parent, $activity->getSocialIssues());
$activity->addSocialIssue($grandChild);
$listener->preUpdate($activity, $event);
$this->assertCount(1, $activity->getSocialIssues());
$this->assertContains($grandChild, $activity->getSocialIssues());
$this->assertNotContains($parent, $activity->getSocialIssues());
$activity->addSocialIssue($child);
$listener->preUpdate($activity, $event);
$this->assertCount(1, $activity->getSocialIssues());
$this->assertContains($grandChild, $activity->getSocialIssues());
$this->assertNotContains($parent, $activity->getSocialIssues());
$this->assertNotContains($child, $activity->getSocialIssues());
$activity->addSocialIssue($another = new SocialIssue());
$listener->preUpdate($activity, $event);
$this->assertCount(2, $activity->getSocialIssues());
$this->assertContains($grandChild, $activity->getSocialIssues());
$this->assertContains($another, $activity->getSocialIssues());
$this->assertNotContains($parent, $activity->getSocialIssues());
$this->assertNotContains($child, $activity->getSocialIssues());
}
}

View File

@ -68,10 +68,10 @@ final class ActivityTypeTest extends KernelTestCase
->push($request); ->push($request);
$this->user = $this->container->get('doctrine.orm.entity_manager') $this->user = $this->container->get('doctrine.orm.entity_manager')
->getRepository('ChillMainBundle:User') ->getRepository(\Chill\MainBundle\Entity\User::class)
->findOneBy(['username' => 'center a_social']); ->findOneBy(['username' => 'center a_social']);
$this->center = $this->container->get('doctrine.orm.entity_manager') $this->center = $this->container->get('doctrine.orm.entity_manager')
->getRepository('ChillMainBundle:Center') ->getRepository(\Chill\MainBundle\Entity\Center::class)
->findOneBy(['name' => 'Center A']); ->findOneBy(['name' => 'Center A']);
$token = $prophet->prophesize(); $token = $prophet->prophesize();
$token->willExtend(AbstractToken::class); $token->willExtend(AbstractToken::class);

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
namespace Chill\ActivityBundle\Tests\Form\Type; namespace Chill\ActivityBundle\Tests\Form\Type;
use Chill\ActivityBundle\Entity\ActivityType;
use Chill\ActivityBundle\Form\Type\TranslatableActivityType; use Chill\ActivityBundle\Form\Type\TranslatableActivityType;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\Form\Extension\Core\Type\FormType;
@ -95,7 +96,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
protected function getRandomType($active = true) protected function getRandomType($active = true)
{ {
$types = $this->container->get('doctrine.orm.entity_manager') $types = $this->container->get('doctrine.orm.entity_manager')
->getRepository('ChillActivityBundle:ActivityType') ->getRepository(ActivityType::class)
->findBy(['active' => $active]); ->findBy(['active' => $active]);
return $types[array_rand($types)]; return $types[array_rand($types)];

View File

@ -66,6 +66,14 @@ Choose a type: Choisir un type
1 hour 30: 1 heure 30 1 hour 30: 1 heure 30
1 hour 45: 1 heure 45 1 hour 45: 1 heure 45
2 hours: 2 heures 2 hours: 2 heures
2 hours 15: 2 heures 15
2 hours 30: 2 heures 30
2 hours 45: 2 heures 45
3 hours: 3 heures
3 hours 30: 3 heures 30
4 hours: 4 heures
4 hours 30: 4 heures 30
5 hours: 5 heures
Concerned groups: Parties concernées Concerned groups: Parties concernées
Persons in accompanying course: Usagers du parcours Persons in accompanying course: Usagers du parcours
Third persons: Tiers non-pro. Third persons: Tiers non-pro.
@ -232,3 +240,5 @@ This is the minimal activity data: Activité n°
docgen: docgen:
Activity basic: Echange Activity basic: Echange
A basic context for activity: Contexte pour les échanges A basic context for activity: Contexte pour les échanges
Accompanying period with a list of activities: Parcours d'accompagnement avec liste des échanges
Accompanying period with a list of activities description: Ce contexte reprend les informations du parcours, et tous les échanges pour un parcours. Les échanges ne sont pas filtrés.

View File

@ -31,6 +31,10 @@ class Configuration implements ConfigurationInterface
->isRequired() ->isRequired()
->defaultValue( ->defaultValue(
[ [
['label' => '1 minutes', 'seconds' => 60],
['label' => '2 minutes', 'seconds' => 120],
['label' => '3 minutes', 'seconds' => 180],
['label' => '4 minutes', 'seconds' => 240],
['label' => '5 minutes', 'seconds' => 300], ['label' => '5 minutes', 'seconds' => 300],
['label' => '10 minutes', 'seconds' => 600], ['label' => '10 minutes', 'seconds' => 600],
['label' => '15 minutes', 'seconds' => 900], ['label' => '15 minutes', 'seconds' => 900],

View File

@ -13,6 +13,7 @@ namespace Chill\BudgetBundle\Menu;
use Chill\BudgetBundle\Security\Authorization\BudgetElementVoter; use Chill\BudgetBundle\Security\Authorization\BudgetElementVoter;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface; use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Chill\PersonBundle\Entity\Household\Household;
use Knp\Menu\MenuItem; use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
@ -42,7 +43,7 @@ class HouseholdMenuBuilder implements LocalMenuBuilderInterface
'routeParameters' => [ 'routeParameters' => [
'id' => $household->getId(), 'id' => $household->getId(),
], ]) ], ])
->setExtras(['order' => 50]); ->setExtras(['order' => 19]);
// } // }
} }

View File

@ -13,6 +13,7 @@ namespace Chill\BudgetBundle\Menu;
use Chill\BudgetBundle\Security\Authorization\BudgetElementVoter; use Chill\BudgetBundle\Security\Authorization\BudgetElementVoter;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface; use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Chill\PersonBundle\Entity\Person;
use Knp\Menu\MenuItem; use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
@ -44,7 +45,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
'routeParameters' => ['id' => $person->getId()], 'routeParameters' => ['id' => $person->getId()],
] ]
) )
->setExtra('order', 4000); ->setExtra('order', 59);
} }
} }

View File

@ -23,15 +23,15 @@ use function count;
/** /**
* Helps to find a summary of the budget: the sum of resources and charges. * Helps to find a summary of the budget: the sum of resources and charges.
*/ */
class SummaryBudget class SummaryBudget implements SummaryBudgetInterface
{ {
private const QUERY_CHARGE_BY_HOUSEHOLD = 'select SUM(amount) AS sum, type FROM chill_budget.charge WHERE (person_id IN (_ids_) OR household_id = ?) AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY type'; private const QUERY_CHARGE_BY_HOUSEHOLD = 'select SUM(amount) AS sum, string_agg(comment, \'|\') AS comment, type FROM chill_budget.charge WHERE (person_id IN (_ids_) OR household_id = ?) AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY type';
private const QUERY_CHARGE_BY_PERSON = 'select SUM(amount) AS sum, type FROM chill_budget.charge WHERE person_id = ? AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY type'; private const QUERY_CHARGE_BY_PERSON = 'select SUM(amount) AS sum, string_agg(comment, \'|\') AS comment, type FROM chill_budget.charge WHERE person_id = ? AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY type';
private const QUERY_RESOURCE_BY_HOUSEHOLD = 'select SUM(amount) AS sum, type FROM chill_budget.resource WHERE (person_id IN (_ids_) OR household_id = ?) AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY type'; private const QUERY_RESOURCE_BY_HOUSEHOLD = 'select SUM(amount) AS sum, string_agg(comment, \'|\') AS comment, type FROM chill_budget.resource WHERE (person_id IN (_ids_) OR household_id = ?) AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY type';
private const QUERY_RESOURCE_BY_PERSON = 'select SUM(amount) AS sum, type FROM chill_budget.resource WHERE person_id = ? AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY type'; private const QUERY_RESOURCE_BY_PERSON = 'select SUM(amount) AS sum, string_agg(comment, \'|\') AS comment, type FROM chill_budget.resource WHERE person_id = ? AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY type';
private array $chargeLabels; private array $chargeLabels;
@ -52,26 +52,6 @@ class SummaryBudget
$this->translatableStringHelper = $translatableStringHelper; $this->translatableStringHelper = $translatableStringHelper;
} }
public function getEmptyChargeArray(): array
{
$keys = $this->configRepository->getChargesKeys();
$labels = $this->chargeLabels;
return array_combine($keys, array_map(function ($i) use ($labels) {
return ['sum' => 0.0, 'label' => $this->translatableStringHelper->localize($labels[$i])];
}, $keys));
}
public function getEmptyResourceArray(): array
{
$keys = $this->configRepository->getResourcesKeys();
$labels = $this->resourcesLabels;
return array_combine($keys, array_map(function ($i) use ($labels) {
return ['sum' => 0.0, 'label' => $this->translatableStringHelper->localize($labels[$i])];
}, $keys));
}
public function getSummaryForHousehold(?Household $household): array public function getSummaryForHousehold(?Household $household): array
{ {
if (null === $household) { if (null === $household) {
@ -101,8 +81,15 @@ class SummaryBudget
]; ];
} }
public function getSummaryForPerson(Person $person): array public function getSummaryForPerson(?Person $person): array
{ {
if (null === $person) {
return [
'resources' => $this->getEmptyResourceArray(),
'charges' => $this->getEmptyChargeArray(),
];
}
$rsm = $this->buildRsm(); $rsm = $this->buildRsm();
$resources = $this->em->createNativeQuery(self::QUERY_RESOURCE_BY_PERSON, $rsm) $resources = $this->em->createNativeQuery(self::QUERY_RESOURCE_BY_PERSON, $rsm)
@ -123,11 +110,32 @@ class SummaryBudget
$rsm = new ResultSetMapping(); $rsm = new ResultSetMapping();
$rsm $rsm
->addScalarResult('sum', 'sum') ->addScalarResult('sum', 'sum')
->addScalarResult('type', 'type'); ->addScalarResult('type', 'type')
->addScalarResult('comment', 'comment');
return $rsm; return $rsm;
} }
private function getEmptyChargeArray(): array
{
$keys = $this->configRepository->getChargesKeys();
$labels = $this->chargeLabels;
return array_combine($keys, array_map(function ($i) use ($labels) {
return ['sum' => 0.0, 'label' => $this->translatableStringHelper->localize($labels[$i]), 'comment' => ''];
}, $keys));
}
private function getEmptyResourceArray(): array
{
$keys = $this->configRepository->getResourcesKeys();
$labels = $this->resourcesLabels;
return array_combine($keys, array_map(function ($i) use ($labels) {
return ['sum' => 0.0, 'label' => $this->translatableStringHelper->localize($labels[$i]), 'comment' => ''];
}, $keys));
}
private function rowToArray(array $rows, string $kind): array private function rowToArray(array $rows, string $kind): array
{ {
switch ($kind) { switch ($kind) {
@ -151,6 +159,7 @@ class SummaryBudget
$result[$row['type']] = [ $result[$row['type']] = [
'sum' => (float) $row['sum'], 'sum' => (float) $row['sum'],
'label' => $this->translatableStringHelper->localize($label[$row['type']]), 'label' => $this->translatableStringHelper->localize($label[$row['type']]),
'comment' => (string) $row['comment'],
]; ];
} }

View File

@ -0,0 +1,25 @@
<?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\BudgetBundle\Service\Summary;
use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Person;
/**
* Helps to find a summary of the budget: the sum of resources and charges.
*/
interface SummaryBudgetInterface
{
public function getSummaryForHousehold(?Household $household): array;
public function getSummaryForPerson(?Person $person): array;
}

View File

@ -81,7 +81,7 @@ class CalendarController extends AbstractController
} }
/** @var Calendar $entity */ /** @var Calendar $entity */
$entity = $em->getRepository('ChillCalendarBundle:Calendar')->find($id); $entity = $em->getRepository(\Chill\CalendarBundle\Entity\Calendar::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Calendar entity.'); throw $this->createNotFoundException('Unable to find Calendar entity.');
@ -139,7 +139,7 @@ class CalendarController extends AbstractController
$view = '@ChillCalendar/Calendar/editByUser.html.twig'; $view = '@ChillCalendar/Calendar/editByUser.html.twig';
} }
$entity = $em->getRepository('ChillCalendarBundle:Calendar')->find($id); $entity = $em->getRepository(\Chill\CalendarBundle\Entity\Calendar::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Calendar entity.'); throw $this->createNotFoundException('Unable to find Calendar entity.');
@ -314,7 +314,7 @@ class CalendarController extends AbstractController
} }
/** @var Calendar $entity */ /** @var Calendar $entity */
$entity = $em->getRepository('ChillCalendarBundle:Calendar')->find($id); $entity = $em->getRepository(\Chill\CalendarBundle\Entity\Calendar::class)->find($id);
if (null === $entity) { if (null === $entity) {
throw $this->createNotFoundException('Unable to find Calendar entity.'); throw $this->createNotFoundException('Unable to find Calendar entity.');

View File

@ -119,7 +119,7 @@ class CreateFieldsOnGroupCommand extends Command
$em = $this->entityManager; $em = $this->entityManager;
$customFieldsGroups = $em $customFieldsGroups = $em
->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup') ->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)
->findAll(); ->findAll();
if (count($customFieldsGroups) === 0) { if (count($customFieldsGroups) === 0) {

View File

@ -138,7 +138,7 @@ class CustomFieldController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomField')->find($id); $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomField::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomField entity.'); throw $this->createNotFoundException('Unable to find CustomField entity.');

View File

@ -92,7 +92,7 @@ class CustomFieldsGroupController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->find($id); $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.'); throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
@ -113,7 +113,7 @@ class CustomFieldsGroupController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$cfGroups = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->findAll(); $cfGroups = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->findAll();
$defaultGroups = $this->getDefaultGroupsId(); $defaultGroups = $this->getDefaultGroupsId();
$makeDefaultFormViews = []; $makeDefaultFormViews = [];
@ -143,7 +143,7 @@ class CustomFieldsGroupController extends AbstractController
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$cFGroup = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->findOneById($cFGroupId); $cFGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->findOneById($cFGroupId);
if (!$cFGroup) { if (!$cFGroup) {
throw $this throw $this
@ -151,7 +151,7 @@ class CustomFieldsGroupController extends AbstractController
. "id {$cFGroupId}"); . "id {$cFGroupId}");
} }
$cFDefaultGroup = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsDefaultGroup') $cFDefaultGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsDefaultGroup::class)
->findOneByEntity($cFGroup->getEntity()); ->findOneByEntity($cFGroup->getEntity());
if ($cFDefaultGroup) { if ($cFDefaultGroup) {
@ -204,7 +204,7 @@ class CustomFieldsGroupController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->find($id); $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroups entity.'); throw $this->createNotFoundException('Unable to find CustomFieldsGroups entity.');
@ -248,7 +248,7 @@ class CustomFieldsGroupController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->find($id); $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.'); throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
@ -272,7 +272,7 @@ class CustomFieldsGroupController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->find($id); $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.'); throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');

View File

@ -19,6 +19,9 @@ use function array_key_exists;
use const JSON_THROW_ON_ERROR; use const JSON_THROW_ON_ERROR;
/**
* Not in use ? Deprecated ?
*/
class JsonCustomFieldToArrayTransformer implements DataTransformerInterface class JsonCustomFieldToArrayTransformer implements DataTransformerInterface
{ {
private array $customField; private array $customField;

View File

@ -1,55 +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);
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
/**
* @return string
*/
public function getCacheDir()
{
return sys_get_temp_dir() . '/CustomFieldsBundle/cache';
}
/**
* @return string
*/
public function getLogDir()
{
return $this->getRootDir() . '/../logs';
}
public function registerBundles()
{
return [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Chill\CustomFieldsBundle\ChillCustomFieldsBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new \Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new \Chill\MainBundle\ChillMainBundle(),
new \Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Chill\PersonBundle\ChillPersonBundle(),
//add here all the required bundle (some bundle are not required)
];
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
}
}

View File

@ -1,7 +0,0 @@
{% if inputKeys is defined %}
{% for key in inputKeys %}
{{ form_row(form[key]) }}
{% endfor %}
{% else %}
{{ form(form) }}
{% endif %}

View File

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
{% block javascripts_head %}<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
{% block javascripts %}{% endblock %}
</body>
</html>

View File

@ -1,20 +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);
use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
/** @var ClassLoader $loader */
$loader = require __DIR__ . '/../../../../../vendor/autoload.php';
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
return $loader;

View File

@ -1,76 +0,0 @@
imports:
- { resource: parameters.yml }
framework:
secret: Not very secret
router: { resource: "%kernel.root_dir%/config/routing.yml" }
form: true
csrf_protection: true
session: ~
default_locale: fr
translator: { fallback: fr }
profiler: { only_exceptions: false }
templating:
engines: ['twig']
doctrine:
dbal:
driver: pdo_pgsql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ ]
#java: /usr/bin/java
filters:
cssrewrite: ~
chill_main:
available_languages: [ fr, nl, en ]
security:
providers:
chain_provider:
chain :
providers: [in_memory, users]
in_memory:
memory:
users:
admin: { password: olala, roles: 'ROLE_ADMIN' }
users:
entity:
class: Chill\MainBundle\Entity\User
property: username
encoders:
Chill\MainBundle\Entity\User:
algorithm: bcrypt
Symfony\Component\Security\Core\User\User: plaintext
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
default:
anonymous: ~
form_login:
csrf_parameter: _csrf_token
csrf_token_id: authenticate
csrf_provider: form.csrf_provider
logout: ~
access_control:
#disable authentication for tests
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
#- { path: ^/admin, roles: ROLE_ADMIN }
#- { path: ^/, roles: ROLE_USER }

View File

@ -1,11 +0,0 @@
imports:
- { resource: config.yml } #here we import a config.yml file, this is not required
framework:
test: ~
session:
storage_id: session.storage.filesystem
chill_custom_fields:
customizables_entities:
- { class: TEST, name: test }

View File

@ -1,8 +0,0 @@
# config/config_test.yml
imports:
- { resource: config.yml } #here we import a config.yml file, this is not required
framework:
test: ~
session:
storage_id: session.storage.filesystem

View File

@ -1,9 +0,0 @@
#required by ConfigCustomizablesEntitiesTest::testNotEmptyConfig
imports:
- { resource: config_test.yml }
chill_custom_fields:
customizables_entities:
- { class: Test\With\A\Dummy\Entity, name: test }

View File

@ -1,7 +0,0 @@
parameters:
database_host: chill__database
database_port: 5432
database_name: postgres
database_user: postgres
database_password: postgres
locale: fr

View File

@ -1,7 +0,0 @@
parameters:
database_host: 127.0.0.1
database_port: 5434
database_name: symfony
database_user: symfony
database_password: symfony
locale: fr

View File

@ -1,10 +0,0 @@
cl_custom_fields:
resource: .
type: chill_routes
chill_main:
resource: "@ChillMainBundle/Resources/config/routing.yml"
test_custom_field_form_render:
path: /customfieldsgroup/test/render/{id}
defaults: { _controller: ChillCustomFieldsBundle:CustomFieldsGroup:renderForm }

View File

@ -1,27 +0,0 @@
#!/usr/bin/env php
<?php
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);
set_time_limit(0);
require __DIR__.'/autoload.php';
$input = new ArgvInput();
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
if ($debug) {
Debug::enable();
}
$kernel = new AppKernel($env, $debug);
$application = new Application($kernel);
$application->run($input);

View File

@ -1,41 +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);
use Symfony\Component\Debug\Debug;
use Symfony\Component\HttpFoundation\Request;
// If you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
//umask(0000);
// This check prevents access to debug front controllers that are deployed by accident to production servers.
// Feel free to remove this, extend it, or make something more sophisticated.
if (
isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|| !(in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1'], true) || \PHP_SAPI === 'cli-server')
) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.');
}
$loader = require_once __DIR__ . '/../app/bootstrap.php.cache';
Debug::enable();
require_once __DIR__ . '/../app/AppKernel.php';
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

View File

@ -1,16 +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);
if (!is_file($autoloadFile = __DIR__ . '/../vendor/autoload.php')) {
throw new \LogicException('Could not find autoload.php in vendor/. Did you run "composer install --dev"?');
}
require $autoloadFile;

View File

@ -14,7 +14,7 @@ namespace Chill\DocGeneratorBundle\Context;
use Chill\DocGeneratorBundle\Context\Exception\ContextNotFoundException; use Chill\DocGeneratorBundle\Context\Exception\ContextNotFoundException;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
class ContextManager final class ContextManager implements ContextManagerInterface
{ {
/** /**
* @var DocGeneratorContextInterface[]|iterable * @var DocGeneratorContextInterface[]|iterable
@ -26,9 +26,6 @@ class ContextManager
$this->contexts = $contexts; $this->contexts = $contexts;
} }
/**
* @throw ContextNotFoundException when the context is not found
*/
public function getContextByDocGeneratorTemplate(DocGeneratorTemplate $docGeneratorTemplate): DocGeneratorContextInterface public function getContextByDocGeneratorTemplate(DocGeneratorTemplate $docGeneratorTemplate): DocGeneratorContextInterface
{ {
foreach ($this->contexts as $key => $context) { foreach ($this->contexts as $key => $context) {

View File

@ -0,0 +1,30 @@
<?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\DocGeneratorBundle\Context;
use Chill\DocGeneratorBundle\Context\Exception\ContextNotFoundException;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
interface ContextManagerInterface
{
/**
* @throws ContextNotFoundException When the context is not found.
*/
public function getContextByDocGeneratorTemplate(DocGeneratorTemplate $docGeneratorTemplate): DocGeneratorContextInterface;
/**
* @throws ContextNotFoundException When the context is not found.
*/
public function getContextByKey(string $searchedKey): DocGeneratorContextInterface;
public function getContexts(): array;
}

View File

@ -11,8 +11,6 @@ declare(strict_types=1);
namespace Chill\DocGeneratorBundle\Controller; namespace Chill\DocGeneratorBundle\Controller;
use Base64Url\Base64Url;
use ChampsLibres\AsyncUploaderBundle\TempUrl\TempUrlGeneratorInterface;
use Chill\DocGeneratorBundle\Context\ContextManager; use Chill\DocGeneratorBundle\Context\ContextManager;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface; use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface;
use Chill\DocGeneratorBundle\Context\Exception\ContextNotFoundException; use Chill\DocGeneratorBundle\Context\Exception\ContextNotFoundException;
@ -21,11 +19,11 @@ use Chill\DocGeneratorBundle\GeneratorDriver\DriverInterface;
use Chill\DocGeneratorBundle\GeneratorDriver\Exception\TemplateException; use Chill\DocGeneratorBundle\GeneratorDriver\Exception\TemplateException;
use Chill\DocGeneratorBundle\Repository\DocGeneratorTemplateRepository; use Chill\DocGeneratorBundle\Repository\DocGeneratorTemplateRepository;
use Chill\DocStoreBundle\Entity\StoredObject; use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\DocStoreBundle\Service\StoredObjectManagerInterface;
use Chill\MainBundle\Pagination\PaginatorFactory; use Chill\MainBundle\Pagination\PaginatorFactory;
use Chill\MainBundle\Serializer\Model\Collection; use Chill\MainBundle\Serializer\Model\Collection;
use Doctrine\ORM\EntityManagerInterface;
use Exception; use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\TransferException;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
@ -35,14 +33,14 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
// TODO à mettre dans services // TODO à mettre dans services
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\HttpClientInterface;
use Throwable;
use function strlen;
final class DocGeneratorTemplateController extends AbstractController final class DocGeneratorTemplateController extends AbstractController
{ {
@ -54,13 +52,13 @@ final class DocGeneratorTemplateController extends AbstractController
private DriverInterface $driver; private DriverInterface $driver;
private KernelInterface $kernel; private EntityManagerInterface $entityManager;
private LoggerInterface $logger; private LoggerInterface $logger;
private PaginatorFactory $paginatorFactory; private PaginatorFactory $paginatorFactory;
private TempUrlGeneratorInterface $tempUrlGenerator; private StoredObjectManagerInterface $storedObjectManager;
public function __construct( public function __construct(
ContextManager $contextManager, ContextManager $contextManager,
@ -68,18 +66,18 @@ final class DocGeneratorTemplateController extends AbstractController
DriverInterface $driver, DriverInterface $driver,
LoggerInterface $logger, LoggerInterface $logger,
PaginatorFactory $paginatorFactory, PaginatorFactory $paginatorFactory,
TempUrlGeneratorInterface $tempUrlGenerator, HttpClientInterface $client,
KernelInterface $kernel, StoredObjectManagerInterface $storedObjectManager,
HttpClientInterface $client EntityManagerInterface $entityManager
) { ) {
$this->contextManager = $contextManager; $this->contextManager = $contextManager;
$this->docGeneratorTemplateRepository = $docGeneratorTemplateRepository; $this->docGeneratorTemplateRepository = $docGeneratorTemplateRepository;
$this->driver = $driver; $this->driver = $driver;
$this->logger = $logger; $this->logger = $logger;
$this->paginatorFactory = $paginatorFactory; $this->paginatorFactory = $paginatorFactory;
$this->tempUrlGenerator = $tempUrlGenerator;
$this->kernel = $kernel;
$this->client = $client; $this->client = $client;
$this->storedObjectManager = $storedObjectManager;
$this->entityManager = $entityManager;
} }
/** /**
@ -178,8 +176,10 @@ final class DocGeneratorTemplateController extends AbstractController
return $this->redirectToRoute( return $this->redirectToRoute(
'chill_docgenerator_test_generate_from_template', 'chill_docgenerator_test_generate_from_template',
['template' => $template, 'entityClassName' => $entityClassName, 'entityId' => $entityId, [
'returnPath' => $request->query->get('returnPath', '/'), ] 'template' => $template, 'entityClassName' => $entityClassName, 'entityId' => $entityId,
'returnPath' => $request->query->get('returnPath', '/'),
]
); );
} }
@ -193,16 +193,26 @@ final class DocGeneratorTemplateController extends AbstractController
try { try {
$context = $this->contextManager->getContextByDocGeneratorTemplate($template); $context = $this->contextManager->getContextByDocGeneratorTemplate($template);
} catch (ContextNotFoundException $e) { } catch (ContextNotFoundException $e) {
throw new NotFoundHttpException($e->getMessage(), $e); throw new NotFoundHttpException(
'Context not found.',
$e
);
} }
$entity = $this->getDoctrine()->getRepository($context->getEntityClass())->find($entityId); $entity = $this
->entityManager
->getRepository($context->getEntityClass())
->find($entityId);
if (null === $entity) { if (null === $entity) {
throw new NotFoundHttpException("Entity with classname {$entityClassName} and id {$entityId} is not found"); throw new NotFoundHttpException(
sprintf('Entity with classname %s and id %s is not found', $entityClassName, $entityId)
);
} }
$contextGenerationData = []; $contextGenerationData = [
'test_file' => null,
];
if ( if (
$context instanceof DocGeneratorContextWithPublicFormInterface $context instanceof DocGeneratorContextWithPublicFormInterface
@ -240,128 +250,114 @@ final class DocGeneratorTemplateController extends AbstractController
$contextGenerationData = $form->getData(); $contextGenerationData = $form->getData();
} elseif (!$form->isSubmitted() || ($form->isSubmitted() && !$form->isValid())) { } elseif (!$form->isSubmitted() || ($form->isSubmitted() && !$form->isValid())) {
$templatePath = '@ChillDocGenerator/Generator/basic_form.html.twig'; $templatePath = '@ChillDocGenerator/Generator/basic_form.html.twig';
$templateOptions = ['entity' => $entity, 'form' => $form->createView(), $templateOptions = [
'template' => $template, 'context' => $context, ]; 'entity' => $entity, 'form' => $form->createView(),
'template' => $template, 'context' => $context,
];
return $this->render($templatePath, $templateOptions); return $this->render($templatePath, $templateOptions);
} }
} }
if ($isTest && null !== $contextGenerationData['test_file']) { $document = $template->getFile();
/** @var File $file */
$file = $contextGenerationData['test_file']; if ($isTest && ($contextGenerationData['test_file'] instanceof File)) {
$templateResource = fopen($file->getPathname(), 'rb'); $dataDecrypted = file_get_contents($contextGenerationData['test_file']->getPathname());
} else { } else {
$getUrlGen = $this->tempUrlGenerator->generate( try {
'GET', $dataDecrypted = $this->storedObjectManager->read($document);
$template->getFile()->getFilename() } catch (Throwable $exception) {
); throw $exception;
$data = $this->client->request('GET', $getUrlGen->url);
$iv = $template->getFile()->getIv(); // iv as an Array
$ivGoodFormat = pack('C*', ...$iv); // iv as a String (ok for openssl_decrypt)
$method = 'AES-256-CBC';
$key = $template->getFile()->getKeyInfos()['k'];
$keyGoodFormat = Base64Url::decode($key);
$dataDecrypted = openssl_decrypt($data->getContent(), $method, $keyGoodFormat, 1, $ivGoodFormat);
if (false === $dataDecrypted) {
throw new Exception('Error during Decrypt ', 1);
} }
if (false === $templateResource = fopen('php://memory', 'r+b')) {
$this->logger->error('Could not write data to memory');
throw new HttpException(500);
}
fwrite($templateResource, $dataDecrypted);
rewind($templateResource);
} }
$datas = $context->getData($template, $entity, $contextGenerationData);
if ($isTest && isset($form) && $form['show_data']->getData()) { if ($isTest && isset($form) && $form['show_data']->getData()) {
// very ugly hack... // very ugly hack...
dd($datas); dd($context->getData($template, $entity, $contextGenerationData));
} }
try { try {
$generatedResource = $this->driver->generateFromResource($templateResource, $template->getFile()->getType(), $datas, $template->getFile()->getFilename()); $generatedResource = $this
->driver
->generateFromString(
$dataDecrypted,
$template->getFile()->getType(),
$context->getData($template, $entity, $contextGenerationData),
$template->getFile()->getFilename()
);
} catch (TemplateException $e) { } catch (TemplateException $e) {
$msg = implode("\n", $e->getErrors()); return new Response(
implode("\n", $e->getErrors()),
return new Response($msg, 400, [ 400,
'Content-Type' => 'text/plain', [
]); 'Content-Type' => 'text/plain',
]
);
} }
fclose($templateResource);
if ($isTest) { if ($isTest) {
return new StreamedResponse( return new Response(
static function () use ($generatedResource) { $generatedResource,
fpassthru($generatedResource);
fclose($generatedResource);
},
Response::HTTP_OK, Response::HTTP_OK,
[ [
'Content-Transfer-Encoding', 'binary', 'Content-Transfer-Encoding', 'binary',
'Content-Type' => 'application/vnd.oasis.opendocument.text', 'Content-Type' => 'application/vnd.oasis.opendocument.text',
'Content-Disposition' => sprintf('attachment; filename="%s.odt"', 'generated'), 'Content-Disposition' => 'attachment; filename="generated.odt"',
'Content-Length' => fstat($generatedResource)['size'], 'Content-Length' => strlen($generatedResource),
], ],
); );
} }
$genDocName = 'doc_' . sprintf('%010d', mt_rand()) . 'odt'; /** @var StoredObject $storedObject */
$storedObject = (new ObjectNormalizer())
$getUrlGen = $this->tempUrlGenerator->generate( ->denormalize(
'PUT', [
$genDocName 'type' => $template->getFile()->getType(),
); 'filename' => sprintf('%s_odt', uniqid('doc_', true)),
],
$client = new Client(); StoredObject::class
);
try { try {
$putResponse = $client->request('PUT', $getUrlGen->url, [ $this->storedObjectManager->write($storedObject, $generatedResource);
'body' => $generatedResource, } catch (Throwable $exception) {
]); throw $exception;
}
if ($putResponse->getStatusCode() === 201) { $this->entityManager->persist($storedObject);
$em = $this->getDoctrine()->getManager();
$storedObject = new StoredObject();
$storedObject
->setType($template->getFile()->getType())
->setFilename($genDocName);
$em->persist($storedObject); try {
$context
try { ->storeGenerated(
$context->storeGenerated($template, $storedObject, $entity, $contextGenerationData); $template,
} catch (Exception $e) { $storedObject,
$this->logger->error('Could not store the associated document to entity', [ $entity,
$contextGenerationData
);
} catch (Exception $e) {
$this
->logger
->error(
'Unable to store the associated document to entity',
[
'entityClassName' => $entityClassName, 'entityClassName' => $entityClassName,
'entityId' => $entityId, 'entityId' => $entityId,
'contextKey' => $context->getName(), 'contextKey' => $context->getName(),
]); ]
);
throw $e;
}
$em->flush();
return $this->redirectToRoute('chill_wopi_file_edit', [
'fileId' => $storedObject->getUuid(),
'returnPath' => $request->query->get('returnPath', '/'),
]);
}
} catch (TransferException $e) {
throw $e; throw $e;
} }
throw new Exception('Unable to generate document.'); $this->entityManager->flush();
return $this
->redirectToRoute(
'chill_wopi_file_edit',
[
'fileId' => $storedObject->getUuid(),
'returnPath' => $request->query->get('returnPath', '/'),
]
);
} }
} }

View File

@ -13,10 +13,5 @@ namespace Chill\DocGeneratorBundle\GeneratorDriver;
interface DriverInterface interface DriverInterface
{ {
/** public function generateFromString(string $template, string $resourceType, array $data, ?string $templateName = null): string;
* @param resource $template
*
* @return resource
*/
public function generateFromResource($template, string $resourceType, array $data, ?string $templateName = null);
} }

View File

@ -16,45 +16,47 @@ use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Mime\Part\DataPart; use Symfony\Component\Mime\Part\DataPart;
use Symfony\Component\Mime\Part\Multipart\FormDataPart; use Symfony\Component\Mime\Part\Multipart\FormDataPart;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\HttpClientInterface;
use Throwable;
class RelatorioDriver implements DriverInterface final class RelatorioDriver implements DriverInterface
{ {
private LoggerInterface $logger; private HttpClientInterface $client;
private HttpClientInterface $relatorioClient; private LoggerInterface $logger;
private string $url; private string $url;
public function __construct( public function __construct(
HttpClientInterface $relatorioClient, HttpClientInterface $client,
ParameterBagInterface $parameterBag, ParameterBagInterface $parameterBag,
LoggerInterface $logger LoggerInterface $logger
) { ) {
$this->relatorioClient = $relatorioClient; $this->client = $client;
$this->logger = $logger; $this->logger = $logger;
$this->url = $parameterBag->get('chill_doc_generator')['driver']['relatorio']['url']; $this->url = $parameterBag->get('chill_doc_generator')['driver']['relatorio']['url'];
} }
public function generateFromResource($template, string $resourceType, array $data, ?string $templateName = null) public function generateFromString(string $template, string $resourceType, array $data, ?string $templateName = null): string
{ {
$formFields = [ $form = new FormDataPart(
'variables' => json_encode($data), [
'template' => new DataPart($template, $templateName ?? uniqid('template_'), $resourceType), 'variables' => json_encode($data),
]; 'template' => new DataPart($template, $templateName ?? uniqid('template_'), $resourceType),
$form = new FormDataPart($formFields); ]
);
try { try {
$response = $this->relatorioClient->request('POST', $this->url, [ $response = $this->client->request('POST', $this->url, [
'headers' => $form->getPreparedHeaders()->toArray(), 'headers' => $form->getPreparedHeaders()->toArray(),
'body' => $form->bodyToIterable(), 'body' => $form->bodyToIterable(),
]); ]);
return $response->toStream(); return $response->getContent();
} catch (HttpExceptionInterface $e) { } catch (ClientExceptionInterface $e) {
$content = $e->getResponse()->getContent(false); $content = $e->getResponse()->getContent(false);
if (400 === $e->getResponse()->getStatusCode()) { if (400 === $e->getResponse()->getStatusCode()) {
@ -87,6 +89,18 @@ class RelatorioDriver implements DriverInterface
]); ]);
throw $e; throw $e;
} catch (Throwable $exception) {
$this
->logger
->error(
'relatorio: Unable to get content from response.',
[
'msg' => $exception->getMessage(),
'e' => $exception->getTraceAsString(),
]
);
throw $exception;
} }
} }
} }

View File

@ -18,6 +18,7 @@
} }
], ],
"require": { "require": {
"spomky-labs/base64url": "^2"
}, },
"require-dev": { "require-dev": {
}, },

View File

@ -155,7 +155,7 @@ class DocumentAccompanyingCourseController extends AbstractController
$documents = $this->courseRepository $documents = $this->courseRepository
->findBy( ->findBy(
['course' => $course], ['course' => $course],
['date' => 'DESC'], ['date' => 'DESC', 'id' => 'DESC'],
$pagination->getItemsPerPage(), $pagination->getItemsPerPage(),
$pagination->getCurrentPageFirstItemNumber() $pagination->getCurrentPageFirstItemNumber()
); );

View File

@ -35,7 +35,7 @@ class DocumentCategoryController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$documentCategory = $em $documentCategory = $em
->getRepository('ChillDocStoreBundle:DocumentCategory') ->getRepository(\Chill\DocStoreBundle\Entity\DocumentCategory::class)
->findOneBy( ->findOneBy(
['bundleId' => $bundleId, 'idInsideBundle' => $idInsideBundle] ['bundleId' => $bundleId, 'idInsideBundle' => $idInsideBundle]
); );
@ -58,7 +58,7 @@ class DocumentCategoryController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$documentCategory = $em $documentCategory = $em
->getRepository('ChillDocStoreBundle:DocumentCategory') ->getRepository(\Chill\DocStoreBundle\Entity\DocumentCategory::class)
->findOneBy( ->findOneBy(
['bundleId' => $bundleId, 'idInsideBundle' => $idInsideBundle] ['bundleId' => $bundleId, 'idInsideBundle' => $idInsideBundle]
); );
@ -138,7 +138,7 @@ class DocumentCategoryController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$documentCategory = $em $documentCategory = $em
->getRepository('ChillDocStoreBundle:DocumentCategory') ->getRepository(\Chill\DocStoreBundle\Entity\DocumentCategory::class)
->findOneBy( ->findOneBy(
['bundleId' => $bundleId, 'idInsideBundle' => $idInsideBundle] ['bundleId' => $bundleId, 'idInsideBundle' => $idInsideBundle]
); );

View File

@ -178,7 +178,7 @@ class DocumentPersonController extends AbstractController
$documents = $this->personDocumentACLAwareRepository->findByPerson( $documents = $this->personDocumentACLAwareRepository->findByPerson(
$person, $person,
[], ['date' => 'DESC', 'id' => 'DESC'],
$pagination->getItemsPerPage(), $pagination->getItemsPerPage(),
$pagination->getCurrentPageFirstItemNumber() $pagination->getCurrentPageFirstItemNumber()
); );

View File

@ -109,12 +109,12 @@ class StoredObject implements AsyncFileInterface, Document
return $this->id; return $this->id;
} }
public function getIv() public function getIv(): array
{ {
return $this->iv; return $this->iv;
} }
public function getKeyInfos() public function getKeyInfos(): array
{ {
return $this->keyInfos; return $this->keyInfos;
} }
@ -149,37 +149,37 @@ class StoredObject implements AsyncFileInterface, Document
return $this; return $this;
} }
public function setDatas(array $datas) public function setDatas(?array $datas)
{ {
$this->datas = $datas; $this->datas = (array) $datas;
return $this; return $this;
} }
public function setFilename($filename) public function setFilename(?string $filename)
{ {
$this->filename = $filename; $this->filename = (string) $filename;
return $this; return $this;
} }
public function setIv($iv) public function setIv(?array $iv)
{ {
$this->iv = $iv; $this->iv = (array) $iv;
return $this; return $this;
} }
public function setKeyInfos($keyInfos) public function setKeyInfos(?array $keyInfos)
{ {
$this->keyInfos = $keyInfos; $this->keyInfos = (array) $keyInfos;
return $this; return $this;
} }
public function setType($type) public function setType(?string $type)
{ {
$this->type = $type; $this->type = (string) $type;
return $this; return $this;
} }

View File

@ -0,0 +1,40 @@
<?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\DocStoreBundle\Exception;
use Exception;
use Throwable;
final class StoredObjectManagerException extends Exception
{
public static function errorDuringHttpRequest(Throwable $exception): self
{
return new self('Error during HTTP request.', 500, $exception);
}
public static function invalidStatusCode(int $code): self
{
return new self(
sprintf('Invalid status code received (%s).', $code)
);
}
public static function unableToDecrypt(string $message): self
{
return new self(sprintf('Unable to decrypt content (reason: %s).', $message));
}
public static function unableToGetResponseContent(Throwable $exception): self
{
return new self('Unable to get content from response.', 500, $exception);
}
}

View File

@ -64,7 +64,7 @@ class PersonDocumentACLAwareRepository implements PersonDocumentACLAwareReposito
$this->addACL($qb, $person); $this->addACL($qb, $person);
foreach ($orderBy as [$field, $order]) { foreach ($orderBy as $field => $order) {
$qb->addOrderBy($field, $order); $qb->addOrderBy($field, $order);
} }

View File

@ -23,14 +23,14 @@
{{ form_row(form.description) }} {{ form_row(form.description) }}
{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }} {{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }}
<ul class="record_actions"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path('accompanying_course_document_index', {'course': accompanyingCourse.id}) }}" class="btn btn-cancel"> <a href="{{ path('accompanying_course_document_index', {'course': accompanyingCourse.id}) }}" class="btn btn-cancel">
{{ 'Back to the list' | trans }} {{ 'Back to the list' | trans }}
</a> </a>
</li> </li>
<li class="create"> <li class="create">
<button class="btn btn-create">{{ 'Create'|trans }}</button> <button class="btn btn-save">{{ 'Save'|trans }}</button>
</li> </li>
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@ -1,7 +1,3 @@
{# Twig way
TODO: une route, un template avec un header CHILL et un iframe
#}
<a href="{{ chill_path_add_return_path('chill_wopi_file_edit', {'fileId': document.uuid}) }}" <a href="{{ chill_path_add_return_path('chill_wopi_file_edit', {'fileId': document.uuid}) }}"
class="btn btn-wopilink"> class="btn btn-wopilink">
{{ 'online_edit_document'|trans }} {{ 'online_edit_document'|trans }}

View File

@ -53,6 +53,11 @@
<li> <li>
<a href="{{ path('accompanying_course_document_edit', {'course': accompanyingCourse.id, 'id': document.id }) }}" class="btn btn-update"></a> <a href="{{ path('accompanying_course_document_edit', {'course': accompanyingCourse.id, 'id': document.id }) }}" class="btn btn-update"></a>
</li> </li>
{% if chill_document_is_editable(document.object) %}
<li>
{{ document.object|chill_document_edit_button }}
</li>
{% endif %}
{% endif %} {% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %} {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
<li> <li>
@ -75,6 +80,11 @@
<li> <li>
<a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="btn btn-update"></a> <a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="btn btn-update"></a>
</li> </li>
{% if chill_document_is_editable(document.object) %}
<li>
{{ document.object|chill_document_edit_button }}
</li>
{% endif %}
{% endif %} {% endif %}
{% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %} {% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
<li> <li>

View File

@ -47,7 +47,7 @@
</a> </a>
</li> </li>
<li class="create"> <li class="create">
<button class="btn btn-create">{{ 'Create'|trans }}</button> <button class="btn btn-save">{{ 'Save'|trans }}</button>
</li> </li>
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@ -0,0 +1,133 @@
<?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\DocStoreBundle\Service;
use Base64Url\Base64Url;
use ChampsLibres\AsyncUploaderBundle\TempUrl\TempUrlGeneratorInterface;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\DocStoreBundle\Exception\StoredObjectManagerException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Throwable;
use const OPENSSL_RAW_DATA;
final class StoredObjectManager implements StoredObjectManagerInterface
{
private const ALGORITHM = 'AES-256-CBC';
private HttpClientInterface $client;
private TempUrlGeneratorInterface $tempUrlGenerator;
public function __construct(
HttpClientInterface $client,
TempUrlGeneratorInterface $tempUrlGenerator
) {
$this->client = $client;
$this->tempUrlGenerator = $tempUrlGenerator;
}
public function read(StoredObject $document): string
{
try {
$response = $this
->client
->request(
Request::METHOD_GET,
$this
->tempUrlGenerator
->generate(
Request::METHOD_GET,
$document->getFilename()
)
->url
);
} catch (Throwable $e) {
throw StoredObjectManagerException::errorDuringHttpRequest($e);
}
if ($response->getStatusCode() !== Response::HTTP_OK) {
throw StoredObjectManagerException::invalidStatusCode($response->getStatusCode());
}
try {
$data = $response->getContent();
} catch (Throwable $e) {
throw StoredObjectManagerException::unableToGetResponseContent($e);
}
if (false === $this->hasKeysAndIv($document)) {
return $data;
}
$clearData = openssl_decrypt(
$data,
self::ALGORITHM,
// TODO: Why using this library and not use base64_decode() ?
Base64Url::decode($document->getKeyInfos()['k']),
OPENSSL_RAW_DATA,
pack('C*', ...$document->getIv())
);
if (false === $clearData) {
throw StoredObjectManagerException::unableToDecrypt(openssl_error_string());
}
return $clearData;
}
public function write(StoredObject $document, string $clearContent): void
{
$encryptedContent = $this->hasKeysAndIv($document)
? openssl_encrypt(
$clearContent,
self::ALGORITHM,
// TODO: Why using this library and not use base64_decode() ?
Base64Url::decode($document->getKeyInfos()['k']),
OPENSSL_RAW_DATA,
pack('C*', ...$document->getIv())
)
: $clearContent;
try {
$response = $this
->client
->request(
Request::METHOD_PUT,
$this
->tempUrlGenerator
->generate(
Request::METHOD_PUT,
$document->getFilename()
)
->url,
[
'body' => $encryptedContent,
]
);
} catch (TransportExceptionInterface $exception) {
throw StoredObjectManagerException::errorDuringHttpRequest($exception);
}
if ($response->getStatusCode() !== Response::HTTP_CREATED) {
throw StoredObjectManagerException::invalidStatusCode($response->getStatusCode());
}
}
private function hasKeysAndIv(StoredObject $storedObject): bool
{
return ([] !== $storedObject->getKeyInfos()) && ([] !== $storedObject->getIv());
}
}

View File

@ -0,0 +1,34 @@
<?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\DocStoreBundle\Service;
use Chill\DocStoreBundle\Entity\StoredObject;
interface StoredObjectManagerInterface
{
/**
* Get the content of a StoredObject.
*
* @param StoredObject $document The document.
*
* @return string The retrieved content in clear.
*/
public function read(StoredObject $document): string;
/**
* Set the content of a StoredObject.
*
* @param StoredObject $document The document.
* @param $clearContent The content to store in clear.
*/
public function write(StoredObject $document, string $clearContent): void;
}

View File

@ -16,10 +16,102 @@ use Chill\DocStoreBundle\Entity\StoredObject;
use Twig\Environment; use Twig\Environment;
use Twig\Extension\RuntimeExtensionInterface; use Twig\Extension\RuntimeExtensionInterface;
use function array_key_exists; use function in_array;
final class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface final class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
{ {
public const SUPPORTED_MIMES = [
'image/svg+xml',
'application/vnd.ms-powerpoint',
'application/vnd.ms-excel',
'application/vnd.sun.xml.writer',
'application/vnd.oasis.opendocument.text',
'application/vnd.oasis.opendocument.text-flat-xml',
'application/vnd.sun.xml.calc',
'application/vnd.oasis.opendocument.spreadsheet',
'application/vnd.oasis.opendocument.spreadsheet-flat-xml',
'application/vnd.sun.xml.impress',
'application/vnd.oasis.opendocument.presentation',
'application/vnd.oasis.opendocument.presentation-flat-xml',
'application/vnd.sun.xml.draw',
'application/vnd.oasis.opendocument.graphics',
'application/vnd.oasis.opendocument.graphics-flat-xml',
'application/vnd.oasis.opendocument.chart',
'application/vnd.sun.xml.writer.global',
'application/vnd.oasis.opendocument.text-master',
'application/vnd.sun.xml.writer.template',
'application/vnd.oasis.opendocument.text-template',
'application/vnd.oasis.opendocument.text-master-template',
'application/vnd.sun.xml.calc.template',
'application/vnd.oasis.opendocument.spreadsheet-template',
'application/vnd.sun.xml.impress.template',
'application/vnd.oasis.opendocument.presentation-template',
'application/vnd.sun.xml.draw.template',
'application/vnd.oasis.opendocument.graphics-template',
'application/msword',
'application/msword',
'application/vnd.ms-excel',
'application/vnd.ms-powerpoint',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.ms-word.document.macroEnabled.12',
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
'application/vnd.ms-word.template.macroEnabled.12',
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
'application/vnd.ms-excel.template.macroEnabled.12',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
'application/vnd.ms-excel.sheet.macroEnabled.12',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
'application/vnd.openxmlformats-officedocument.presentationml.template',
'application/vnd.ms-powerpoint.template.macroEnabled.12',
'application/vnd.wordperfect',
'application/x-aportisdoc',
'application/x-hwp',
'application/vnd.ms-works',
'application/x-mswrite',
'application/x-dif-document',
'text/spreadsheet',
'text/csv',
'application/x-dbase',
'application/vnd.lotus-1-2-3',
'image/cgm',
'image/vnd.dxf',
'image/x-emf',
'image/x-wmf',
'application/coreldraw',
'application/vnd.visio2013',
'application/vnd.visio',
'application/vnd.ms-visio.drawing',
'application/x-mspublisher',
'application/x-sony-bbeb',
'application/x-gnumeric',
'application/macwriteii',
'application/x-iwork-numbers-sffnumbers',
'application/vnd.oasis.opendocument.text-web',
'application/x-pagemaker',
'text/rtf',
'text/plain',
'application/x-fictionbook+xml',
'application/clarisworks',
'image/x-wpg',
'application/x-iwork-pages-sffpages',
'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
'application/x-iwork-keynote-sffkey',
'application/x-abiword',
'image/x-freehand',
'application/vnd.sun.xml.chart',
'application/x-t602',
'image/bmp',
'image/png',
'image/gif',
'image/tiff',
'image/jpg',
'image/jpeg',
'application/pdf',
];
private const TEMPLATE = '@ChillDocStore/Button/wopi_edit_document.html.twig'; private const TEMPLATE = '@ChillDocStore/Button/wopi_edit_document.html.twig';
private DiscoveryInterface $discovery; private DiscoveryInterface $discovery;
@ -31,15 +123,7 @@ final class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
public function isEditable(StoredObject $document): bool public function isEditable(StoredObject $document): bool
{ {
$mime_type = $this->discovery->discoverMimeType($document->getType()); return in_array($document->getType(), self::SUPPORTED_MIMES, true);
foreach ($mime_type as $item) {
if (array_key_exists('default', $item) && 'true' === $item['default']) {
return true;
}
}
return false;
} }
public function renderEditButton(Environment $environment, StoredObject $document, ?array $options = null): string public function renderEditButton(Environment $environment, StoredObject $document, ?array $options = null): string

View File

@ -0,0 +1,183 @@
<?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\DocStoreBundle\Tests;
use ChampsLibres\AsyncUploaderBundle\TempUrl\TempUrlGeneratorInterface;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\DocStoreBundle\Exception\StoredObjectManagerException;
use Chill\DocStoreBundle\Service\StoredObjectManager;
use Chill\DocStoreBundle\Service\StoredObjectManagerInterface;
use Generator;
use PHPUnit\Framework\TestCase;
use stdClass;
use Symfony\Component\HttpClient\Exception\TransportException;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Contracts\HttpClient\HttpClientInterface;
/**
* @internal
*
* @covers \Chill\DocStoreBundle\Service\StoredObjectManager
*/
final class StoredObjectManagerTest extends TestCase
{
public function getDataProvider(): Generator
{
/* HAPPY SCENARIO */
// Encrypted object
yield [
(new StoredObject())
->setFilename('encrypted.txt')
->setKeyInfos(['k' => base64_encode('S9NIHMaFHOWzLPez3jZOIHBaNfBrMQUR5zvqBz6kme8')])
->setIv(unpack('C*', 'abcdefghijklmnop')),
hex2bin('741237d255fd4f7eddaaa9058912a84caae28a41b10b34d4e3e3abe41d3b9b47cb0dd8f22c3c883d4f0e9defa75ff662'), // Binary encoded string
'The quick brown fox jumps over the lazy dog', // clear
];
// Non-encrypted object
yield [
(new StoredObject())->setFilename('non-encrypted.txt'), // The StoredObject
'The quick brown fox jumps over the lazy dog', // Encrypted
'The quick brown fox jumps over the lazy dog', // Clear
];
/* UNHAPPY SCENARIO */
// Encrypted object with issue during HTTP communication
yield [
(new StoredObject())
->setFilename('error_during_http_request.txt')
->setKeyInfos(['k' => base64_encode('S9NIHMaFHOWzLPez3jZOIHBaNfBrMQUR5zvqBz6kme8')])
->setIv(unpack('C*', 'abcdefghijklmnop')),
hex2bin('741237d255fd4f7eddaaa9058912a84caae28a41b10b34d4e3e3abe41d3b9b47cb0dd8f22c3c883d4f0e9defa75ff662'), // Binary encoded string
'The quick brown fox jumps over the lazy dog', // clear
StoredObjectManagerException::class,
];
// Encrypted object with issue during HTTP communication: Invalid status code
yield [
(new StoredObject())
->setFilename('invalid_statuscode.txt')
->setKeyInfos(['k' => base64_encode('S9NIHMaFHOWzLPez3jZOIHBaNfBrMQUR5zvqBz6kme8')])
->setIv(unpack('C*', 'abcdefghijklmnop')),
hex2bin('741237d255fd4f7eddaaa9058912a84caae28a41b10b34d4e3e3abe41d3b9b47cb0dd8f22c3c883d4f0e9defa75ff662'), // Binary encoded string
'The quick brown fox jumps over the lazy dog', // clear
StoredObjectManagerException::class,
];
// Erroneous encrypted: Unable to decrypt exception.
yield [
(new StoredObject())
->setFilename('unable_to_decrypt.txt')
->setKeyInfos(['k' => base64_encode('WRONG_PASS_PHRASE')])
->setIv(unpack('C*', 'abcdefghijklmnop')),
'WRONG_ENCODED_VALUE', // Binary encoded string
'The quick brown fox jumps over the lazy dog', // clear
StoredObjectManagerException::class,
];
}
/**
* @dataProvider getDataProvider
*/
public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null)
{
if (null !== $exceptionClass) {
$this->expectException($exceptionClass);
}
$storedObjectManager = $this->getSubject($storedObject, $encodedContent);
self::assertEquals($clearContent, $storedObjectManager->read($storedObject));
}
/**
* @dataProvider getDataProvider
*/
public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null)
{
if (null !== $exceptionClass) {
$this->expectException($exceptionClass);
}
$storedObjectManager = $this->getSubject($storedObject, $encodedContent);
$storedObjectManager->write($storedObject, $clearContent);
self::assertEquals($clearContent, $storedObjectManager->read($storedObject));
}
private function getHttpClient(string $encodedContent): HttpClientInterface
{
$callback = static function ($method, $url, $options) use ($encodedContent) {
if (Request::METHOD_GET === $method) {
switch ($url) {
case 'https://example.com/non-encrypted.txt':
case 'https://example.com/encrypted.txt':
return new MockResponse($encodedContent, ['http_code' => 200]);
case 'https://example.com/error_during_http_request.txt':
return new TransportException('error_during_http_request.txt');
case 'https://example.com/invalid_statuscode.txt':
return new MockResponse($encodedContent, ['http_code' => 404]);
}
}
if (Request::METHOD_PUT === $method) {
switch ($url) {
case 'https://example.com/non-encrypted.txt':
case 'https://example.com/encrypted.txt':
return new MockResponse($encodedContent, ['http_code' => 201]);
case 'https://example.com/error_during_http_request.txt':
throw new TransportException('error_during_http_request.txt');
case 'https://example.com/invalid_statuscode.txt':
return new MockResponse($encodedContent, ['http_code' => 404]);
}
}
return new MockResponse('Not found');
};
return new MockHttpClient($callback);
}
private function getSubject(StoredObject $storedObject, string $encodedContent): StoredObjectManagerInterface
{
return new StoredObjectManager(
$this->getHttpClient($encodedContent),
$this->getTempUrlGenerator($storedObject)
);
}
private function getTempUrlGenerator(StoredObject $storedObject): TempUrlGeneratorInterface
{
$response = new stdClass();
$response->url = $storedObject->getFilename();
$tempUrlGenerator = $this
->getMockBuilder(TempUrlGeneratorInterface::class)
->getMock();
$tempUrlGenerator
->method('generate')
->withAnyParameters()
->willReturn($response);
return $tempUrlGenerator;
}
}

View File

@ -116,6 +116,6 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler
public function supportsFreeze(EntityWorkflow $entityWorkflow, array $options = []): bool public function supportsFreeze(EntityWorkflow $entityWorkflow, array $options = []): bool
{ {
return true; return false;
} }
} }

View File

@ -8,7 +8,8 @@
} }
}, },
"require": { "require": {
"symfony/mime": "^4 || ^5" "symfony/mime": "^4 || ^5",
"symfony/http-foundation": "^4"
}, },
"license": "AGPL-3.0" "license": "AGPL-3.0"
} }

View File

@ -40,3 +40,8 @@ services:
tags: tags:
- { name: 'serializer.normalizer', priority: 16 } - { name: 'serializer.normalizer', priority: 16 }
Chill\DocStoreBundle\Service\:
autowire: true
autoconfigure: true
resource: '../Service/'

View File

@ -97,7 +97,7 @@ class EventController extends AbstractController
public function deleteAction($event_id, Request $request) public function deleteAction($event_id, Request $request)
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$event = $em->getRepository('ChillEventBundle:Event')->findOneBy([ $event = $em->getRepository(\Chill\EventBundle\Entity\Event::class)->findOneBy([
'id' => $event_id, 'id' => $event_id,
]); ]);
@ -151,7 +151,7 @@ class EventController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Event')->find($event_id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Event::class)->find($event_id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Event entity.'); throw $this->createNotFoundException('Unable to find Event entity.');
@ -178,7 +178,7 @@ class EventController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id); $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id);
if (null === $person) { if (null === $person) {
throw $this->createNotFoundException('Person not found'); throw $this->createNotFoundException('Person not found');
@ -192,11 +192,11 @@ class EventController extends AbstractController
$person->getCenter() $person->getCenter()
); );
$total = $em->getRepository('ChillEventBundle:Participation')->countByPerson($person_id); $total = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->countByPerson($person_id);
$paginator = $this->paginator->create($total); $paginator = $this->paginator->create($total);
$participations = $em->getRepository('ChillEventBundle:Participation')->findByPersonInCircle( $participations = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->findByPersonInCircle(
$person_id, $person_id,
$reachablesCircles, $reachablesCircles,
$paginator->getCurrentPage()->getFirstItemNumber(), $paginator->getCurrentPage()->getFirstItemNumber(),
@ -352,7 +352,7 @@ class EventController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Event')->find($event_id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Event::class)->find($event_id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Event entity.'); throw $this->createNotFoundException('Unable to find Event entity.');

View File

@ -60,7 +60,7 @@ class EventTypeController extends AbstractController
if ($form->isValid()) { if ($form->isValid()) {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:EventType')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find EventType entity.'); throw $this->createNotFoundException('Unable to find EventType entity.');
@ -82,7 +82,7 @@ class EventTypeController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:EventType')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find EventType entity.'); throw $this->createNotFoundException('Unable to find EventType entity.');
@ -105,7 +105,7 @@ class EventTypeController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('ChillEventBundle:EventType')->findAll(); $entities = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->findAll();
return $this->render('ChillEventBundle:EventType:index.html.twig', [ return $this->render('ChillEventBundle:EventType:index.html.twig', [
'entities' => $entities, 'entities' => $entities,
@ -135,7 +135,7 @@ class EventTypeController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:EventType')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find EventType entity.'); throw $this->createNotFoundException('Unable to find EventType entity.');
@ -158,7 +158,7 @@ class EventTypeController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:EventType')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find EventType entity.'); throw $this->createNotFoundException('Unable to find EventType entity.');

View File

@ -235,7 +235,7 @@ class ParticipationController extends AbstractController
'The participation was created' 'The participation was created'
)); ));
if ($request->query->get('return_path')) { if ($request->query->has('return_path')) {
return $this->redirect($request->query->get('return_path')); return $this->redirect($request->query->get('return_path'));
} }
@ -258,7 +258,7 @@ class ParticipationController extends AbstractController
public function deleteAction($participation_id, Request $request) public function deleteAction($participation_id, Request $request)
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$participation = $em->getRepository('ChillEventBundle:Participation')->findOneBy([ $participation = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->findOneBy([
'id' => $participation_id, 'id' => $participation_id,
]); ]);
@ -336,7 +336,7 @@ class ParticipationController extends AbstractController
*/ */
public function editMultipleAction($event_id) public function editMultipleAction($event_id)
{ {
$event = $this->getDoctrine()->getRepository('ChillEventBundle:Event') $event = $this->getDoctrine()->getRepository(\Chill\EventBundle\Entity\Event::class)
->find($event_id); ->find($event_id);
if (null === $event) { if (null === $event) {
@ -467,7 +467,7 @@ class ParticipationController extends AbstractController
public function updateMultipleAction($event_id, Request $request) public function updateMultipleAction($event_id, Request $request)
{ {
/** @var \Chill\EventBundle\Entity\Event $event */ /** @var \Chill\EventBundle\Entity\Event $event */
$event = $this->getDoctrine()->getRepository('ChillEventBundle:Event') $event = $this->getDoctrine()->getRepository(\Chill\EventBundle\Entity\Event::class)
->find($event_id); ->find($event_id);
if (null === $event) { if (null === $event) {
@ -569,7 +569,7 @@ class ParticipationController extends AbstractController
// prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given` // prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given`
if (null !== $event_id) { if (null !== $event_id) {
$event = $em->getRepository('ChillEventBundle:Event') $event = $em->getRepository(\Chill\EventBundle\Entity\Event::class)
->find($event_id); ->find($event_id);
if (null === $event) { if (null === $event) {
@ -598,7 +598,7 @@ class ParticipationController extends AbstractController
$participation = count($persons_ids) > 1 ? clone $participation : $participation; $participation = count($persons_ids) > 1 ? clone $participation : $participation;
if (null !== $person_id) { if (null !== $person_id) {
$person = $em->getRepository('ChillPersonBundle:Person') $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)
->find($person_id); ->find($person_id);
if (null === $person) { if (null === $person) {
@ -716,7 +716,7 @@ class ParticipationController extends AbstractController
*/ */
protected function newSingle(Request $request) protected function newSingle(Request $request)
{ {
$returnPath = $request->query->get('return_path') ? $returnPath = $request->query->has('return_path') ?
$request->query->get('return_path') : null; $request->query->get('return_path') : null;
$participation = $this->handleRequest($request, new Participation(), false); $participation = $this->handleRequest($request, new Participation(), false);

View File

@ -60,7 +60,7 @@ class RoleController extends AbstractController
if ($form->isValid()) { if ($form->isValid()) {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Role')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Role entity.'); throw $this->createNotFoundException('Unable to find Role entity.');
@ -82,7 +82,7 @@ class RoleController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Role')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Role entity.'); throw $this->createNotFoundException('Unable to find Role entity.');
@ -105,7 +105,7 @@ class RoleController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('ChillEventBundle:Role')->findAll(); $entities = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->findAll();
return $this->render('ChillEventBundle:Role:index.html.twig', [ return $this->render('ChillEventBundle:Role:index.html.twig', [
'entities' => $entities, 'entities' => $entities,
@ -135,7 +135,7 @@ class RoleController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Role')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Role entity.'); throw $this->createNotFoundException('Unable to find Role entity.');
@ -158,7 +158,7 @@ class RoleController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Role')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Role entity.'); throw $this->createNotFoundException('Unable to find Role entity.');

View File

@ -57,7 +57,7 @@ class StatusController extends AbstractController
if ($form->isValid()) { if ($form->isValid()) {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Status')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Status entity.'); throw $this->createNotFoundException('Unable to find Status entity.');
@ -79,7 +79,7 @@ class StatusController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Status')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Status entity.'); throw $this->createNotFoundException('Unable to find Status entity.');
@ -102,7 +102,7 @@ class StatusController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('ChillEventBundle:Status')->findAll(); $entities = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->findAll();
return $this->render('ChillEventBundle:Status:index.html.twig', [ return $this->render('ChillEventBundle:Status:index.html.twig', [
'entities' => $entities, 'entities' => $entities,
@ -132,7 +132,7 @@ class StatusController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Status')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Status entity.'); throw $this->createNotFoundException('Unable to find Status entity.');
@ -155,7 +155,7 @@ class StatusController extends AbstractController
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Status')->find($id); $entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id);
if (!$entity) { if (!$entity) {
throw $this->createNotFoundException('Unable to find Status entity.'); throw $this->createNotFoundException('Unable to find Status entity.');

View File

@ -15,6 +15,7 @@ use Chill\EventBundle\Entity\Event;
use Chill\EventBundle\Entity\Participation; use Chill\EventBundle\Entity\Participation;
use Chill\MainBundle\DataFixtures\ORM\LoadScopes; use Chill\MainBundle\DataFixtures\ORM\LoadScopes;
use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Entity\Center;
use Chill\PersonBundle\Entity\Person;
use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Persistence\ObjectManager; use Doctrine\Persistence\ObjectManager;
@ -64,11 +65,11 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa
public function load(ObjectManager $manager) public function load(ObjectManager $manager)
{ {
$centers = $manager->getRepository('ChillMainBundle:Center') $centers = $manager->getRepository(Center::class)
->findAll(); ->findAll();
foreach ($centers as $center) { foreach ($centers as $center) {
$people = $manager->getRepository('ChillPersonBundle:Person') $people = $manager->getRepository(Person::class)
->findBy(['center' => $center]); ->findBy(['center' => $center]);
$events = $this->createEvents($center, $manager); $events = $this->createEvents($center, $manager);

View File

@ -1,55 +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);
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
/**
* @return string
*/
public function getCacheDir()
{
return sys_get_temp_dir() . '/ChillEventBundle/cache';
}
/**
* @return string
*/
public function getLogDir()
{
return sys_get_temp_dir() . '/ChillEventBundle/logs';
}
public function registerBundles()
{
return [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Chill\MainBundle\ChillMainBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new \Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Chill\PersonBundle\ChillPersonBundle(),
new Chill\CustomFieldsBundle\ChillCustomFieldsBundle(),
new \Chill\EventBundle\ChillEventBundle(),
];
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
}
}

View File

@ -1,43 +0,0 @@
imports:
- { resource: parameters.yml }
framework:
secret: Not very secret
router: { resource: "%kernel.root_dir%/config/routing.yml" }
form: true
csrf_protection: true
session: ~
default_locale: fr
translator: { fallback: fr }
profiler: { only_exceptions: false }
templating:
engines: ['twig']
# Doctrine Configuration
doctrine:
dbal:
driver: pdo_pgsql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
mapping_types:
jsonb: json_array
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ ]
#java: /usr/bin/java
filters:
cssrewrite: ~
chill_main:
available_languages: [fr, en]

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