Merge branch 'master' into 616_rapid-action

This commit is contained in:
Mathieu Jaumotte 2023-05-24 11:21:34 +02:00
commit 9324c33caf
2652 changed files with 82793 additions and 26335 deletions

View File

@ -18,10 +18,8 @@ max_line_length = 80
[COMMIT_EDITMSG]
max_line_length = 0
<<<<<<< Updated upstream
=======
[*.{js, vue, ts}]
indent_size = 2
indent_style = space
>>>>>>> Stashed changes

5
.gitignore vendored
View File

@ -1,8 +1,11 @@
.composer/*
composer
composer.phar
composer.lock
docs/build/
node_modules/*
.php_cs.cache
.cache/*
###> symfony/framework-bundle ###
/.env.local
@ -23,3 +26,5 @@ docs/build/
/.php-cs-fixer.cache
/.idea/
/.psalm/
node_modules/*

View File

@ -9,7 +9,7 @@ cache:
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
# See http://docs.gitlab.com/ee/ci/services/README.html for examples.
services:
- name: postgis/postgis:12-3.1-alpine
- name: postgis/postgis:14-3.3-alpine
alias: db
- name: redis
alias: redis
@ -21,7 +21,7 @@ variables:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# configure database access
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres?serverVersion=12&charset=utf8
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres?serverVersion=14&charset=utf8
# fetch the chill-app using git submodules
GIT_SUBMODULE_STRATEGY: recursive
REDIS_HOST: redis
@ -37,12 +37,11 @@ stages:
build:
stage: Composer install
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
before_script:
- curl -sS https://getcomposer.org/installer | php
- php -d memory_limit=2G composer.phar config -g cache-dir "$(pwd)/.cache"
- composer config -g cache-dir "$(pwd)/.cache"
script:
- php -d memory_limit=2G composer.phar install --optimize-autoloader --no-ansi --no-interaction --no-progress
- composer install --optimize-autoloader --no-ansi --no-interaction --no-progress
cache:
paths:
- .cache/
@ -54,9 +53,12 @@ build:
code_style:
stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
script:
- bin/grumphp run --tasks=phpcsfixer
- php-cs-fixer fix --dry-run -v --show-progress=none
cache:
paths:
- .cache/
artifacts:
expire_in: 30 min
paths:
@ -65,30 +67,49 @@ code_style:
phpstan_tests:
stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
script:
- bin/grumphp run --tasks=phpstan
- bin/phpstan analyze --memory-limit=2G
cache:
paths:
- .cache/
artifacts:
expire_in: 30 min
paths:
- bin
- tests/app/vendor/
psalm_tests:
rector_tests:
stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
script:
- bin/grumphp run --tasks=psalm
allow_failure: true
- bin/rector --dry-run
cache:
paths:
- .cache/
artifacts:
expire_in: 30 min
paths:
- bin
- tests/app/vendor/
# psalm_tests:
# stage: Tests
# image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
# script:
# - bin/psalm
# allow_failure: true
# artifacts:
# expire_in: 30 min
# paths:
# - bin
# - tests/app/vendor/
unit_tests:
stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
# until we fix testes
allow_failure: true
script:
- php tests/app/bin/console doctrine:migrations:migrate -n
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev

View File

@ -1,22 +1,32 @@
<?php
/**
declare(strict_types=1);
/*
* 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);
$finder = PhpCsFixer\Finder::create();
/** @var \drupol\PhpCsFixerConfigsPhp\Config\Php73 $config */
$config = require __DIR__ . '/tests/app/vendor/drupol/php-conventions/config/php73/php_cs_fixer.config.php';
$config
->getFinder()
->ignoreDotFiles(false)
$finder
->in(__DIR__.'/src')
->append([__FILE__])
->exclude(['docs/', 'tests/app'])
->notPath('tests/app')
->name(['.php_cs.dist.php']);
->ignoreDotFiles(true)
->name('**.php')
;
$config = new PhpCsFixer\Config();
$config
->setFinder($finder)
->setRiskyAllowed(true)
->setCacheFile('.cache/php-cs-fixer.cache')
->setUsingCache(true)
;
$rules = $config->getRules();
@ -69,9 +79,42 @@ $riskyRules = [
// 'psr_autoloading' => false,
];
$untilFullSwitchToPhp8 = [
'blank_line_between_import_groups' => false,
'declare_strict_types' => true,
'multiline_whitespace_before_semicolons' => false,
'phpdoc_no_empty_return' => false,
];
$rules = array_merge(
[
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => false,
'@Symfony' => false,
'@Symfony:risky' => false,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private',
],
'sort_algorithm' => 'alpha',
]
],
$rules,
$riskyRules
$riskyRules,
$untilFullSwitchToPhp8,
);
$rules['header_comment']['header'] = trim(file_get_contents(__DIR__ . '/resource/header.txt'));

View File

@ -11,11 +11,33 @@ and this project adheres to
## Unreleased
<!-- write down unreleased development here -->
* [person][export] Fixed: rename the alias for `accompanying_period` to `acp` in filter associated with person
* [activity][export] Feature: improve label for aliases in "Filter by activity type"
* [activity][export] DX/Feature: use of an `ActivityTypeRepositoryInterface` instead of the old-style EntityRepository
* [person][export] Fixed: some inconsistency with date filter on accompanying courses
* [person][export] Fixed: use left join for related entities in accompanying course aggregators
* [workflow] Feature: allow user to copy and send manually the access link for the workflow
* [workflow] Feature: show the email addresses that received an access link for the workflow
## Test releases
### 2.0.0-beta2
* [workflow]: Fixed: the notification is sent when the user is added to the first step.
* [budget] Feature: allow to desactivate some charges and resources, adding an `active` key in the configuration
* [person] Feature: on Evaluation, allow to configure an URL from the admin
### 2022-06
* [workflow]: added pagination to workflow list page
* [homepage_widget]: null error on tasks widget fixed
* [person-thirdparty]: fix quick-add of names that consist of multiple parts (eg. De Vlieger) within onthefly modal person/thirdparty
* [search]: Order of birthdate fields changed in advanced search to avoid confusion.
* [workflow]: Constraint added to workflow (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/675)
* [social_action]: only show active objectives (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/625)
* [household]: Reposition and cut button for enfant hors menage have been deleted (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/620)
* [admin]: Add crud for composition type in admin (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/611)
* [social_action]: only show active objectives (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/625)
## Test releases

BIN
composer

Binary file not shown.

View File

@ -8,47 +8,54 @@
"social worker"
],
"require": {
"php": "^7.4",
"php": "^7.4|^8.2",
"ext-json": "*",
"ext-openssl": "*",
"ext-redis": "*",
"champs-libres/async-uploader-bundle": "dev-sf4#d57134aee8e504a83c902ff0cf9f8d36ac418290",
"champs-libres/wopi-bundle": "dev-master#6dd8e0a14e00131eb4b889ecc30270ee4a0e5224",
"champs-libres/wopi-lib": "dev-master#8615f4a45a39fc2b6a98765ea835fcfd39618787",
"champs-libres/wopi-bundle": "dev-master@dev",
"champs-libres/wopi-lib": "dev-master@dev",
"doctrine/doctrine-bundle": "^2.1",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.7",
"doctrine/orm": "^2.13.0",
"erusev/parsedown": "^1.7",
"graylog2/gelf-php": "^1.5",
"knplabs/knp-menu-bundle": "^3.0",
"knplabs/knp-time-bundle": "^1.12",
"knpuniversity/oauth2-client-bundle": "^2.10",
"league/csv": "^9.7.1",
"lexik/jwt-authentication-bundle": "^2.16",
"nyholm/psr7": "^1.4",
"ocramius/package-versions": "^1.10 || ^2",
"odolbeau/phone-number-bundle": "^3.6",
"ovh/ovh": "^3.0",
"phpoffice/phpspreadsheet": "^1.16",
"ramsey/uuid-doctrine": "^1.7",
"sensio/framework-extra-bundle": "^5.5",
"spomky-labs/base64url": "^2.0",
"symfony/asset": "^4.4",
"symfony/browser-kit": "^4.4",
"symfony/clock": "^6.2",
"symfony/css-selector": "^4.4",
"symfony/expression-language": "^4.4",
"symfony/form": "^4.4",
"symfony/framework-bundle": "^4.4",
"symfony/http-client": "^4.4 || ^5",
"symfony/http-foundation": "^4.4",
"symfony/intl": "^4.4",
"symfony/mailer": "^5.4",
"symfony/messenger": "^5.4",
"symfony/mime": "^5.4",
"symfony/monolog-bundle": "^3.5",
"symfony/security-bundle": "^4.4",
"symfony/serializer": "^5.3",
"symfony/swiftmailer-bundle": "^3.5",
"symfony/templating": "^4.4",
"symfony/translation": "^4.4",
"symfony/twig-bundle": "^4.4",
"symfony/validator": "^4.4",
"symfony/web-link": "*",
"symfony/webpack-encore-bundle": "^1.11",
"symfony/workflow": "^4.4",
"symfony/yaml": "^4.4",
"thenetworg/oauth2-azure": "^2.0",
"twig/extra-bundle": "^3.0",
"twig/intl-extra": "^3.0",
"twig/markdown-extra": "^3.3",
@ -57,19 +64,25 @@
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
"drupol/php-conventions": "^5",
"fakerphp/faker": "^1.13",
"jangregor/phpstan-prophecy": "^1.0",
"nelmio/alice": "^3.8",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": ">= 7.5",
"psalm/plugin-phpunit": "^0.18.4",
"psalm/plugin-symfony": "^4.0.2",
"rector/rector": "^0.15.23",
"symfony/debug-bundle": "^5.1",
"symfony/dotenv": "^4.4",
"symfony/maker-bundle": "^1.20",
"symfony/phpunit-bridge": "^4.4",
"symfony/stopwatch": "^4.4",
"symfony/var-dumper": "^4.4",
"symfony/web-profiler-bundle": "^4.4"
"vimeo/psalm": "^4.30.0"
},
"conflict": {
"symfony/symfony": "*"

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Export\Filter;
use Chill\MainBundle\Export\ExportElementValidatedInterface;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Export\Export;
use Chill\MainBundle\Export\ExportInterface;
@ -18,7 +18,6 @@ use Chill\PersonBundle\Security\Authorization\PersonVoter;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
class CountPerson implements ExportInterface
{
@ -73,9 +72,9 @@ class CountPerson implements ExportInterface
return ['export_result'];
}
public function getResult($qb, $data)
public function getResult($query, $data)
{
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
}
public function getTitle()
@ -91,9 +90,7 @@ class CountPerson implements ExportInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
// we gather all center the user choose.
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn($el) => $el['center'], $acl);
$qb = $this->entityManager->createQueryBuilder();
@ -106,9 +103,9 @@ class CountPerson implements ExportInterface
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
return new Role(PersonVoter::STATS);
return PersonVoter::STATS;
}
public function supportsModifiers()

View File

@ -0,0 +1,93 @@
.. Copyright (C) 2014-2023 Champs Libres Cooperative SCRLFS
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
.. _cronjob:
Cron jobs
*********
Some tasks must be executed regularly: refresh some materialized views, remove old data, ...
For this purpose, one can programmatically implements a "cron job", which will be scheduled by a specific command.
The command :code:`chill:cron-job:execute`
==========================================
The command :code:`chill:cron-job:execute` will schedule a task, one by one. In a classical implementation, it should
be executed every 15 minutes (more or less), to ensure that every task can be executed.
.. warning::
This command should not be executed in parallel. The installer should ensure that two job are executed concurrently.
How to implements a cron job ?
==============================
Implements a :code:`Chill\MainBundle\Cron\CronJobInterface`. Here is an example:
.. code-block:: php
namespace Chill\MainBundle\Service\Something;
use Chill\MainBundle\Cron\CronJobInterface;
use Chill\MainBundle\Entity\CronJobExecution;
use DateInterval;
use DateTimeImmutable;
class MyCronJob implements CronJobInterface
{
public function canRun(?CronJobExecution $cronJobExecution): bool
{
// the parameter $cronJobExecution contains data about the last execution of the cronjob
// if it is null, it should be executed immediatly
if (null === $cronJobExecution) {
return true;
}
if ($cronJobExecution->getKey() !== $this->getKey()) {
throw new UnexpectedValueException();
}
// this cron job should be executed if the last execution is greater than one day, but only during the night
$now = new DateTimeImmutable('now');
return $cronJobExecution->getLastStart() < $now->sub(new DateInterval('P1D'))
&& in_array($now->format('H'), self::ACCEPTED_HOURS, true)
// introduce a random component to ensure a roll of task execution when multiple instances are hosted on same machines
&& mt_rand(0, 5) === 0;
}
public function getKey(): string
{
return 'arbitrary-and-unique-key';
}
public function run(): void
{
// here, we execute the command
}
}
How are cron job scheduled ?
============================
If the command :code:`chill:cron-job:execute` is run with one or more :code:`job` argument, those jobs are run, **without checking that the job can run** (the method :code:`canRun` is not executed).
If any :code:`job` argument is given, the :code:`CronManager` schedule job with those steps:
* the tasks are ordered, with:
* a priority is given for tasks that weren't never executed;
* then, the tasks are ordered, the last executed are the first in the list
* then, for each tasks, and in the given order, the first task where :code:`canRun` return :code:`TRUE` will be executed.
The command :code:`chill:cron-job:execute` execute **only one** task.

View File

@ -0,0 +1,203 @@
.. Copyright (C) 2014 Champs Libres Cooperative SCRLFS
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
.. _entity-info:
Stats about event on entity in php world
########################################
It is necessary to be able to gather information about events for some entities:
- when the event has been done;
- who did it;
- ...
Those "infos" are not linked with right management, like describe in :ref:`timelines`.
“infos” for some stats and info about an entity
-----------------------------------------------
Building an info means:
- create an Entity, and map this entity to a SQL view (not a regular table);
- use the framework to build this entity dynamically.
A framework api is built to be able to build multiple “infos” entities
through “union” views:
- use a command ``bin/console chill:db:sync-views`` to synchronize view (create view if it does not exists, or update
views when new SQL parts are added in the UNION query. Internally, this command call a new ``ViewEntityInfoManager``,
which iterate over available views to build the SQL;
- one can create a new “view entity info” by implementing a
``ViewEntityInfoProviderInterface``
- this implementation of the interface is free to create another
interface for building each part of the UNION query. This interface
is created for AccompanyingPeriodInfo:
``Chill\PersonBundle\Service\EntityInfo\AccompanyingPeriodInfoUnionQueryPartInterface``
So, converting new “events” into rows for ``AccompanyingPeriodInfo`` is
just implementing this interface!
Implementation for AccompanyingPeriod (``AccompanyingPeriod/AccompanyingPeriodInfo``)
-------------------------------------------------------------------------------------
A class is created for computing some statistical info for an
AccompanyingPeriod: ``AccompanyingPeriod/AccompanyingPeriodInfo``. This
contains information about “something happens”, who did it and when.
Having those info in table answer some questions like:
- when is the last and the first action (AccompanyingPeriodWork,
Activity, AccompanyingPeriodWorkEvaluation, …) on the period;
- who is “acting” on the period, and when is the last “action” for each
user.
The AccompanyingPeriod info is mapped to a SQL view, not a table. The
sql view is built dynamically (see below), and gather infos from
ActivityBundle, PersonBundle, CalendarBundle, … It is possible to create
custom bundle and add info on this view.
.. code:: php
/**
*
* @ORM\Entity()
* @ORM\Table(name="view_chill_person_accompanying_period_info") <==== THIS IS A VIEW, NOT A TABLE
*/
class AccompanyingPeriodInfo
{
// ...
}
Why do we need this ?
~~~~~~~~~~~~~~~~~~~~~
For multiple jobs in PHP world:
- moving the accompanying period to another steps when inactive,
automatically;
- listing all the users which are intervening on the action on a new
“Liste des intervenants” page;
- filtering on exports
Later, we will launch automatic anonymise for accompanying period and
all related entities through this information.
How is built the SQL views which is mapped to “info” entities ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The AccompanyingPeriodInfo entity is mapped by a SQL view (not a regular
table).
The sql view is built dynamically, it is a SQL view like this, for now (April 2023):
.. code:: sql
create view view_chill_person_accompanying_period_info
(accompanyingperiod_id, relatedentity, relatedentityid, user_id, infodate, discriminator, metadata) as
SELECT w.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork'::text AS relatedentity,
w.id AS relatedentityid,
cpapwr.user_id,
w.enddate AS infodate,
'accompanying_period_work_end'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work w
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON w.id = cpapwr.accompanyingperiodwork_id
WHERE w.enddate IS NOT NULL
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation'::text AS relatedentity,
e.id AS relatedentityid,
e.updatedby_id AS user_id,
e.updatedat AS infodate,
'accompanying_period_work_evaluation_updated_at'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation e
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
WHERE e.updatedat IS NOT NULL
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation'::text AS relatedentity,
e.id AS relatedentityid,
cpapwr.user_id,
e.maxdate AS infodate,
'accompanying_period_work_evaluation_start'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation e
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON cpapw.id = cpapwr.accompanyingperiodwork_id
WHERE e.maxdate IS NOT NULL
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation'::text AS relatedentity,
e.id AS relatedentityid,
cpapwr.user_id,
e.startdate AS infodate,
'accompanying_period_work_evaluation_start'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation e
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON cpapw.id = cpapwr.accompanyingperiodwork_id
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument'::text AS relatedentity,
doc.id AS relatedentityid,
doc.updatedby_id AS user_id,
doc.updatedat AS infodate,
'accompanying_period_work_evaluation_document_updated_at'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation_document doc
JOIN chill_person_accompanying_period_work_evaluation e ON doc.accompanyingperiodworkevaluation_id = e.id
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
WHERE doc.updatedat IS NOT NULL
UNION
SELECT cpapw.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation'::text AS relatedentity,
e.id AS relatedentityid,
cpapwr.user_id,
e.maxdate AS infodate,
'accompanying_period_work_evaluation_max'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work_evaluation e
JOIN chill_person_accompanying_period_work cpapw ON cpapw.id = e.accompanyingperiodwork_id
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON cpapw.id = cpapwr.accompanyingperiodwork_id
WHERE e.maxdate IS NOT NULL
UNION
SELECT w.accompanyingperiod_id,
'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork'::text AS relatedentity,
w.id AS relatedentityid,
cpapwr.user_id,
w.startdate AS infodate,
'accompanying_period_work_start'::text AS discriminator,
'{}'::jsonb AS metadata
FROM chill_person_accompanying_period_work w
LEFT JOIN chill_person_accompanying_period_work_referrer cpapwr ON w.id = cpapwr.accompanyingperiodwork_id
UNION
SELECT activity.accompanyingperiod_id,
'Chill\ActivityBundle\Entity\Activity'::text AS relatedentity,
activity.id AS relatedentityid,
au.user_id,
activity.date AS infodate,
'activity_date'::text AS discriminator,
'{}'::jsonb AS metadata
FROM activity
LEFT JOIN activity_user au ON activity.id = au.activity_id
WHERE activity.accompanyingperiod_id IS NOT NULL;
As you can see, the view gather multiple SELECT queries and bind them
with UNION.
Each SELECT query is built dynamically, through a class implementing an
interface: ``Chill\PersonBundle\Service\EntityInfo\AccompanyingPeriodInfoUnionQueryPartInterface``, `like
here <https://gitlab.com/Chill-Projet/chill-bundles/-/blob/master/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodInfoQueryPart/AccompanyingPeriodWorkEndQueryPartForAccompanyingPeriodInfo.php>`__
To add new `SELECT` query in different `UNION` parts in the sql view, create a
service and implements this interface: ``Chill\PersonBundle\Service\EntityInfo\AccompanyingPeriodInfoUnionQueryPartInterface``.

View File

@ -10,17 +10,17 @@
Exports
*******
Export is an important issue for the Chill software : users should be able to :
Export is an important issue within the Chill software : users should be able to :
- compute statistics about their activity ;
- list "things" which make part of their activities.
- list "things" which are a part of their activities.
The `main bundle`_ provides a powerful framework to build custom queries with re-usable parts across differents bundles.
.. contents:: Table of content
:local:
.. seealso::
.. seealso::
`The issue where this framework was discussed <https://git.framasoft.org/Chill-project/Chill-Main/issues/9>`_
Provides some information about the pursued features and architecture.
@ -32,37 +32,37 @@ Concepts
Some vocabulary: 3 "Export elements"
------------------------------------
Four terms are used for this framework :
Four terms are used for this framework :
exports
provides some basic operation on the date. Two kind of exports are available :
Exports
provide some basic operation on the data. Two kinds of exports are available :
- computed data : it may be "the number of people", "the number of activities", "the duration of activities", ...
- list data : it may be "the list of people", "the list of activity", ...
- list data : it may be "the list of people", "the list of activities", ...
filters
The filters make a filter on the date: it removes some information the user doesn't want to introduce in the computation done by export. In other word, filters make a filter...
Filters
The filters create a filter on the data: it removes some information the user doesn't want to introduce in the computation done by the export.
Example of filter: "people under 18 years olds", "activities between the 1st of June and the 31st December", ...
Example of a filter: "people under 18 years olds", "activities between the 1st of June and the 31st December", ...
aggregators
The aggregator aggregates the data into some group (some software use the term 'bucket').
Aggregators
The aggregator aggregates the data into some group (some software use the term 'bucket').
Example of aggregator : "group people by gender", "group people by nationality", "group activity by type", ...
Example of an aggregator : "group people by gender", "group people by nationality", "group activity by type", ...
formatters
The formatters format the data into a :class:`Symfony\Component\HttpFoundation\Response`, which will be returned "as is" by the controller to the web client.
Formatters
The formatters format the data into a :class:`Symfony\Component\HttpFoundation\Response`, which will be returned "as is" by the controller to the web client.
Example of formatter: "format data as CSV", "format data as ods spreadsheet", ...
Example of a formatter: "format data as CSV", "format data as an ods spreadsheet", ...
Anatomy of an export
---------------------
An export may be explained as a sentence, where each part of this sentence refers to one or multiple exports element. Examples :
An export can be thought of as a sentence where each part of this sentence refers to one or multiple export elements. Examples :
**Example 1**: Count the number of people having at least one activity in the last 12 month, and group them by nationality and gender, and format them in a CSV spreadsheet.
Here :
Here :
- *count the number of people* is the export part
- *having at least one activity* is the filter part
@ -72,10 +72,10 @@ Here :
Note that :
- aggregators, filters, exports and aggregators are cross-bundle. Here the bundle *activity* provides a filter which apply on an export provided by the person bundle ;
- there may exists multiple aggregator or filter for one export. Currently, only one export is allowed.
- Aggregators, filters, exports and formatters are cross-bundle. Here the bundle *activity* provides a filter which is applied on an export provided by the person bundle ;
- Multiple aggregator or filter for one export may exist. Currently, only one export is allowed.
The result might be :
The result might be :
+-----------------------+----------------+---------------------------+
| Nationality | Gender | Number of people |
@ -89,9 +89,9 @@ The result might be :
| France | Female | 150 |
+-----------------------+----------------+---------------------------+
**Example 2**: Count the average duration of an activity with type "meeting", which occurs between the 1st of June and the 31st of December, group them by week, and format the data in a OpenDocument spreadsheet.
**Example 2**: Count the average duration of an activity with type "meeting", which occurs between the 1st of June and the 31st of December, group them by week, and format the data in an OpenDocument spreadsheet.
Here :
Here :
- *count the average duration of an activity* is the export part
- *activity with type meeting* is a filter part
@ -102,7 +102,7 @@ Here :
The result might be :
+-----------------------+----------------------+
| Week | Number of activities |
| Week | Number of activities |
+=======================+======================+
| 2015-10 | 10 |
+-----------------------+----------------------+
@ -116,77 +116,77 @@ The result might be :
Authorization and exports
-------------------------
Exports, filters and aggregators should not make see data the user is not allowed to see.
Exports, filters and aggregators should not show data the user is not allowed to see within the application.
In other words, developers are required to take care of user authorization for each export.
It should exists a special role that should be granted to users which are allowed to build exports. For more simplicity, this role should apply on center, and should not requires special circles.
There should be a specific role that grants permission to users who are allowed to build exports. For more simplicity, this role should apply on a center, and should not require special circles.
How does the magic works ?
How does the magic work ?
===========================
To build an export, we rely on the capacity of the database to execute queries with aggregate (i.e. GROUP BY) and filter (i.e. WHERE) instructions.
An export is an SQL query which is initiated by an export, and modified by aggregators and filters.
.. note::
.. note::
**Example**: Count the number of people having at least one activity in the last 12 month, and group them by nationality and gender
1. The report initiate the query
1. The report initiates the query
.. code-block:: SQL
SELECT count(people.*) FROM people
2. The filter add a where and join clause :
2. The filter adds a where and join clause :
.. code-block:: SQL
SELECT count(people.*) FROM people
RIGHT JOIN activity
SELECT count(people.*) FROM people
RIGHT JOIN activity
WHERE activity.date IS BETWEEN now AND 6 month ago
3. The aggregator "nationality" add a GROUP BY clause and a column in the SELECT statement:
3. The aggregator "nationality" adds a GROUP BY clause and a column in the SELECT statement:
.. code-block:: sql
SELECT people.nationality, count(people.*) FROM people
RIGHT JOIN activity
WHERE activity.date IS BETWEEN now AND 6 month ago
SELECT people.nationality, count(people.*) FROM people
RIGHT JOIN activity
WHERE activity.date IS BETWEEN now AND 6 month ago
GROUP BY nationality
4. The aggregator "gender" do the same job as the nationality aggregator : it adds a GROUP BY clause and a column in the SELECT statement :
4. The aggregator "gender" does the same job as the nationality aggregator : it adds a GROUP BY clause and a column in the SELECT statement :
.. code-block:: sql
SELECT people.nationality, people.gender, count(people.*)
FROM people RIGHT JOIN activity
WHERE activity.date IS BETWEEN now AND 6 month ago
SELECT people.nationality, people.gender, count(people.*)
FROM people RIGHT JOIN activity
WHERE activity.date IS BETWEEN now AND 6 month ago
GROUP BY nationality, gender
Each filter, aggregator and filter may collect parameters from the user by providing a form. This form is appended to the export form. Here is an example.
Each filter, aggregator and filter may collect parameters from the user through a form. This form is appended to the export form. Here is an example.
.. figure:: /_static/screenshots/development/export_form-fullpage.png
The screenshot show the export form for ``CountPeople`` (Nombre de personnes). The filter by date of birth is checked (*Filtrer par date de naissance de la personne*), which allow to show a subform, which is provided by the :class:`Chill\PersonBundle\Export\Filter\BirthdateFilter`. The other filter, which are unchecked, does not show the subform.
The screenshot shows the export form for ``CountPeople`` (Nombre de personnes). The filter by date of birth is checked (*Filtrer par date de naissance de la personne*), which triggers a subform, which is provided by the :class:`Chill\PersonBundle\Export\Filter\BirthdateFilter`. The other unchecked filter does not show the subform.
Two aggregators are also checked : by Country of birth (*Aggréger les personnes par pays de naissance*, corresponding class is :class:`Chill\PersonBundle\Export\Aggregator\CountryOfBirthAggregator`, which also open a subform. The aggregator by gender (*Aggréger les personnes par genre*) is also checked, but there is no corresponding subform.
Two aggregators are also checked : by Country of birth (*Aggréger les personnes par pays de naissance*, the corresponding class is :class:`Chill\PersonBundle\Export\Aggregator\CountryOfBirthAggregator`, which also triggers a subform. The aggregator by gender (*Aggréger les personnes par genre*) is also checked, but there is no corresponding subform.
The Export Manager
------------------
The Export manager (:class:`Chill\MainBundle\Export\ExportManager` is the central class which register all exports, aggregators, filters and formatters.
The Export manager (:class:`Chill\MainBundle\Export\ExportManager` is the central class which registers all exports, aggregators, filters and formatters.
The export manager is also responsible for orchestrating the whole export process, producing a :class:`Symfony\FrameworkBundle\HttpFoundation\Request` to each export request.
The export manager is also responsible for orchestrating the whole export process, producing a :class:`Symfony\FrameworkBundle\HttpFoundation\Request` for each export request.
The export form step
--------------------
The form step allow to build a form, aggregating different parts of the module.
The form step allows you to build a form, combining different parts of the module.
The building of forms is separated between different subform, which are responsible for rendering their part of the form (aggregators, filters, and export).
The building of forms is split into different subforms, where each one is responsible for rendering their part of the form (aggregators, filters, and export).
.. figure:: /_static/puml/exports/form_steps.png
:scale: 40%
@ -194,12 +194,12 @@ The building of forms is separated between different subform, which are responsi
The formatter form step
-----------------------
The formatter form is processed *after* the user filled the export form. It is built the same way, but receive in parameters the data entered by the user on the previous step (i.e. export form). It may then adapt it accordingly (example: show a list of columns selected in aggregators).
The formatter form is processed *after* the user filled the export form. It is built the same way, but receives the data entered by the user on the previous step as parameters (i.e. export form). It may then adapt it accordingly (example: show a list of columns selected in aggregators).
Processing the export
---------------------
The export process may be explained by this schema :
The export process can be explained by this schema :
.. figure:: /_static/puml/exports/processing_export.png
:scale: 40%
@ -219,20 +219,20 @@ This is an example of the ``CountPerson`` export :
:language: php
:linenos:
* **Line 36**: the ``getType`` function return a string. This string will be used to find the aggregtors and filters which will apply to this export.
* **Line 41**: a simple description to help user to understand what your export does.
* **Line 36**: the ``getType`` function returns a string. This string will be used to find the aggregtors and filters which will apply to this export.
* **Line 41**: a simple description to help users understand what your export does.
* **Line 46**: The title of the export. A summary of what your export does.
* **Line 51**: The list of roles requires to execute this export.
* **Line 51**: The list of roles required to execute this export.
* **Line 56**: We initiate the query here...
* **Line 59**: We have to filter the query with centers the users checked in the form. We process the $acl variable to get all ``Center`` object in one array
* **Line 63**: We create the query, with a query builder.
* **Line 74**: We simply returns the result, but take care of hydrating the results as an array.
* **Line 103**: return the list of formatters types which are allowed to apply on this filter
* **Line 59**: We have to filter the query with centers the users checked in the form. We process the $acl variable to get all ``Center`` objects in one array
* **Line 63**: We create the query with a query builder.
* **Line 74**: We return the result, but make sure to hydrate the results as an array.
* **Line 103**: return the list of formatter types which are allowed to be applied on this filter
Filters
-------
This is an example of the *filter by birthdate*. This filter ask some information in a form (`buildForm` is not empty), and this form must be validated. To performs this validations, we implement a new Interface: :class:`Chill\MainBundle\Export\ExportElementValidatedInterface`:
This is an example of the *filter by birthdate*. This filter asks some information through a form (`buildForm` is not empty), and this form must be validated. To perform this validation, we implement a new Interface: :class:`Chill\MainBundle\Export\ExportElementValidatedInterface`:
.. literalinclude:: /_static/code/exports/BirthdateFilter.php
:language: php

View File

@ -34,6 +34,8 @@ As Chill rely on the `symfony <http://symfony.com>`_ framework, reading the fram
Useful snippets <useful-snippets.rst>
manual/index.rst
Assets <assets.rst>
Cron Jobs <cronjob.rst>
Info about entities <entity-info.rst>
Layout and UI
**************

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\MyBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

View File

@ -6,6 +6,8 @@
A copy of the license is included in the section entitled "GNU
Free Documentation License".
.. _timelines:
Timelines
*********
@ -18,24 +20,24 @@ Concept
From an user point of view
--------------------------
Chill has two objectives :
Chill has two objectives :
* make the administrative tasks more lightweight ;
* help social workers to have all information they need to work
To reach this second objective, Chill provides a special view: **timeline**. On a timeline view, information is gathered and shown on a single page, from the most recent event to the oldest one.
The information gathered is linked to a *context*. This *context* may be, for instance :
The information gathered is linked to a *context*. This *context* may be, for instance :
* a person : events linked to this person are shown on the page ;
* a center: events linked to a center are shown. They may concern different peoples ;
* ...
* ...
In other word, the *context* is the kind of argument that will be used in the event's query.
Let us recall that only the data the user has allowed to see should be shown.
.. seealso::
.. seealso::
`The issue where the subject was first discussed <https://redmine.champs-libres.coop/issues/224>`_
@ -43,30 +45,30 @@ Let us recall that only the data the user has allowed to see should be shown.
For developers
--------------
The `Main` bundle provides interfaces and services to help to build timelines.
The `Main` bundle provides interfaces and services to help to build timelines.
If a bundle wants to *push* information in a timeline, it should be create a service which implements `Chill\MainBundle\Timeline\TimelineProviderInterface`, and tag is with `chill.timeline` and arguments defining the supported context (you may use multiple `chill.timeline` tags in order to support multiple context with a single service/class).
If a bundle wants to provide a new context for a timeline, the service `chill.main.timeline_builder` will helps to gather timeline's services supporting the defined context, and run queries across the models.
If a bundle wants to provide a new context for a timeline, the service `chill.main.timeline_builder` will helps to gather timeline's services supporting the defined context, and run queries across the models.
.. _understanding-queries :
Understanding queries
^^^^^^^^^^^^^^^^^^^^^
Due to the fact that timelines should show only the X last events from Y differents tables, queries for a timeline may consume a lot of resources: at first on the database, and then on the ORM part, which will have to deserialize DB data to PHP classes, which may not be used if they are not part of the "last X events".
Due to the fact that timelines should show only the X last events from Y differents tables, queries for a timeline may consume a lot of resources: at first on the database, and then on the ORM part, which will have to deserialize DB data to PHP classes, which may not be used if they are not part of the "last X events".
To avoid such load on database, the objects are queried in two steps :
To avoid such load on database, the objects are queried in two steps :
1. An UNION request which gather the last X events, ordered by date. The data retrieved are the ID, the date, and a string key: a type. This type discriminates the data type.
2. The PHP objects are queried by ID, the type helps the program to link id with the kind of objects.
2. The PHP objects are queried by ID, the type helps the program to link id with the kind of objects.
Those methods should ensure that only X PHP objects will be gathered and build by the ORM.
What does the master timeline builder service ?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When the service `chill.main.timeline_builder` is instanciated, the service is informed of each service taggued with `chill.timeline` tags. Then,
When the service `chill.main.timeline_builder` is instanciated, the service is informed of each service taggued with `chill.timeline` tags. Then,
1. The service build an UNION query by assembling column and tables names provided by the `fetchQuery` result ;
2. The UNION query is run, the result contains an id and a type for each row (see :ref:`above <understanding-queries>`)
@ -84,7 +86,7 @@ To push events on a timeline :
Implementing the TimelineProviderInterface
------------------------------------------
The has the following signature :
The has the following signature :
.. code-block:: php
@ -92,19 +94,19 @@ The has the following signature :
interface TimelineProviderInterface
{
/**
*
/**
*
* @param string $context
* @param mixed[] $args the argument to the context.
* @return TimelineSingleQuery
* @throw \LogicException if the context is not supported
*/
public function fetchQuery($context, array $args);
/**
* Indicate if the result type may be handled by the service
*
*
* @param string $type the key present in the SELECT query
* @return boolean
*/
@ -113,42 +115,42 @@ The has the following signature :
/**
* fetch entities from db into an associative array. The keys **MUST BE**
* the id
*
* All ids returned by all SELECT queries
*
* All ids returned by all SELECT queries
* (@see TimeLineProviderInterface::fetchQuery) and with the type
* supported by the provider (@see TimelineProviderInterface::supportsType)
* will be passed as argument.
*
*
* @param array $ids an array of id
* @return mixed[] an associative array of entities, with id as key
*/
public function getEntities(array $ids);
/**
* return an associative array with argument to render the entity
* in an html template, which will be included in the timeline page
*
*
* The result must have the following key :
*
*
* - `template` : the template FQDN
* - `template_data`: the data required by the template
*
*
*
*
* Example:
*
*
* ```
* array(
* array(
* 'template' => 'ChillMyBundle:timeline:template.html.twig',
* 'template_data' => array(
* 'accompanyingPeriod' => $entity,
* 'person' => $args['person']
* 'accompanyingPeriod' => $entity,
* 'person' => $args['person']
* )
* );
* ```
*
*
* `$context` and `$args` are defined by the bundle which will call the timeline
* rendering.
*
* rendering.
*
* @param type $entity
* @param type $context
* @param array $args
@ -156,7 +158,7 @@ The has the following signature :
* @throws \LogicException if the context is not supported
*/
public function getEntityTemplate($entity, $context, array $args);
}
@ -176,7 +178,7 @@ The parameters should be replaced into the query by :code:`?`. They will be repl
`$context` and `$args` are defined by the bundle which will call the timeline rendering. You may use them to build a different query depending on this context.
For instance, if the context is `'person'`, the args will be this array :
For instance, if the context is `'person'`, the args will be this array :
.. code-block:: php
@ -197,7 +199,7 @@ You should find in the bundle documentation which contexts are arguments the bun
.. note::
We encourage to use `ClassMetaData` to define column names arguments. If you change your column names, changes will be reflected automatically during the execution of your code.
We encourage to use `ClassMetaData` to define column names arguments. If you change your column names, changes will be reflected automatically during the execution of your code.
Example of an implementation :
@ -215,13 +217,13 @@ Example of an implementation :
*/
class TimelineReportProvider implements TimelineProviderInterface
{
/**
*
* @var EntityManager
*/
protected $em;
public function __construct(EntityManager $em)
{
$this->em = $em;
@ -230,9 +232,9 @@ Example of an implementation :
public function fetchQuery($context, array $args)
{
$this->checkContext($context);
$metadata = $this->em->getClassMetadata('ChillReportBundle:Report');
return TimelineSingleQuery::fromArray([
'id' => $metadata->getColumnName('id'),
'type' => 'report',
@ -254,11 +256,11 @@ Example of an implementation :
The `supportsType` function
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This function indicate to the master `chill.main.timeline_builder` service (which orchestrate the build of UNION queries) that the service supports the type indicated in the result's array of the `fetchQuery` function.
This function indicate to the master `chill.main.timeline_builder` service (which orchestrate the build of UNION queries) that the service supports the type indicated in the result's array of the `fetchQuery` function.
The implementation of our previous example will be :
The implementation of our previous example will be :
.. code-block:: php
.. code-block:: php
namespace Chill\ReportBundle\Timeline;
@ -272,7 +274,7 @@ The implementation of our previous example will be :
//...
/**
*
*
* {@inheritDoc}
*/
public function supportsType($type)
@ -304,12 +306,12 @@ The results **must be** an array where the id given by the UNION query (remember
{
$reports = $this->em->getRepository('ChillReportBundle:Report')
->findBy(array('id' => $ids));
$result = array();
foreach($reports as $report) {
$result[$report->getId()] = $report;
}
return $result;
}
@ -318,9 +320,9 @@ The results **must be** an array where the id given by the UNION query (remember
The `getEntityTemplate` function
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is where the master service will collect information to render the entity.
This is where the master service will collect information to render the entity.
The result must be an associative array with :
The result must be an associative array with :
- **template** is the FQDN of the template ;
- **template_data** is an associative array where keys are the variables'names for this template, and values are the values.
@ -332,8 +334,8 @@ Example :
array(
'template' => 'ChillMyBundle:timeline:template.html.twig',
'template_data' => array(
'period' => $entity,
'person' => $args['person']
'period' => $entity,
'person' => $args['person']
)
);
@ -349,7 +351,7 @@ Create a timeline with his own context
You have to create a Controller which will execute the service `chill.main.timeline_builder`. Using the `Chill\MainBundle\Timeline\TimelineBuilder::getTimelineHTML` function, you will get an HTML representation of the timeline, which you may include with twig `raw` filter.
Example :
Example :
.. code-block:: php

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\HealthBundle\Controller;
use Chill\HealthBundle\Security\Authorization\ConsultationVoter;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\DependencyInjection;
use Chill\MainBundle\DependencyInjection\Widget\AddWidgetConfigurationTrait;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\DependencyInjection;
use Chill\MainBundle\DependencyInjection\Widget\Factory\WidgetFactoryInterface;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Widget;
use Chill\MainBundle\DependencyInjection\Widget\Factory\AbstractWidgetFactory;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Widget;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View File

@ -14,6 +14,14 @@
Installation & Usage
####################
.. toctree::
:maxdepth: 2
prod.rst
load-addresses.rst
prod-calendar-sms-sending.rst
msgraph-configure.rst
Requirements
************
@ -21,31 +29,74 @@ Requirements
- This project use `docker <https://docker.com>`_ to be run. As a developer, use `docker-compose <https://docs.docker.com/compose/overview/>`_ to bootstrap a dev environment in a glance. You do not need any other dependencies ;
- Make is used to automate scripts.
Installation in development mode
********************************
Installation
************
If you plan to run chill in production:
1. install it locally first, and check if everything is ok on your local machine;
2. once ready, build the image from your local machine, and deploy them.
If you want to develop some bundles, the first step is sufficient (until you deploy on production).
1. Get the code
===============
Clone or download the chill-app project and `cd` into the main directory.
Clone or download the chill-skeleton project and `cd` into the main directory.
.. code-block:: bash
git clone https://gitlab.com/Chill-Projet/chill-app.git
git clone https://gitlab.com/Chill-Projet/chill-skeleton-basic.git
cd chill-app
As a developer, the code will stay on your computer and will be executed in docker container. To avoid permission problem, the code should be run with the same uid/gid from your current user. This is why we get your current user id with the command ``id -u`` in each following scripts.
2. Prepare your variables
=========================
2. Prepare composer to download the sources
===========================================
Have a look at the variable in ``.env.dist`` and in ``app/config/parameters.yml.dist`` and check if you need to adapt them. If they do not adapt with your need, or if some are missing:
As you are running in dev, you must configure an auth token for getting the source code.
1. copy the file as ``.env``: ``cp .env.dist .env``
.. warning
If you skip this part, the code will be downloaded from dist instead of source (with git repository). You will probably replace the source manually, but the next time you will run ```composer update```, your repository will be replaced and you might loose something.
1. Create a personal access token from https://gitlab.com/-/profile/personal_access_tokens, with the `read_api` scope.
2. add a file called ```.composer/auth.json``` with this content:
.. code-block:: json
{
"gitlab-token": {
"gitlab.com": "glXXX-XXXXXXXXXXXXXXXXXXXX"
}
}
2. Prepare your variables and environment
=========================================
Copy ```docker-compose.override.dev.yml``` into ```docker-compose.override.yml```
.. code-block:: bash
cp docker-compose.override.dev.template.yml docker-compose.override.yml
2. Prepare your variables and docker-compose
============================================
Have a look at the variable in ``.env`` and check if you need to adapt them. If they do not adapt with your need, or if some are missing:
1. copy the file as ``.env.local``: ``cp .env .env.local``
2. you may replace some variables inside ``.env``
Prepare also you docker-compose installation, and adapt it to your needs:
1. If you plan to deploy on dev, copy the file ``docker-compose.override.dev.template.yml`` to ``docker-compose.override.yml``.
2. adapt to your needs.
**Note**: If you intend to use the bundle ``Chill-Doc-Store``, you will need to configure and install an openstack object storage container with temporary url middleware. You will have to configure `secret keys <https://docs.openstack.org/swift/latest/api/temporary_url_middleware.html#secret-keys>`_.
3. Run the bootstrap script
@ -60,19 +111,30 @@ This script can be run using `make`
This script will :
1. force docker-compose to, eventually, pull the base images and build the image used by this project ;
2. run an install script to download `composer <https://getcomposer.org>`_ ;
2. run an install script to download `composer <https://getcomposer.org>`_ ;
3. install the php dependencies
4. build assets
.. warning::
The script will work only if the binary ``docker-compose`` is located into your ``PATH``. If you use ``compose`` as a docker plugin,
you can simulate this binary by creating this file at (for instance), ``/usr/local/bin/docker-compose`` (and run ``chmod +x /usr/local/bin/docker-compose``):
.. code-block:: bash
#!/bin/bash
/usr/bin/docker compose "$@"
.. note::
In some cases it can happen that an old image (chill_base_php or chill_php) stored in the docker cache will make the script fail. To solve this problem you have to delete the image and the container, before the make init :
In some cases it can happen that an old image (chill_base_php82 or chill_php82) stored in the docker cache will make the script fail. To solve this problem you have to delete the image and the container, before the make init :
.. code-block:: bash
docker-compose images php
docker rmi -f chill_php:prod
docker rmi -f chill_php82:prod
docker-compose rm php
@ -87,13 +149,21 @@ This script will :
.. code-block:: bash
make migrate
# mount into to container
./docker-php.sh
bin/console chill:db:sync-views
# and load fixtures
bin/console doctrine:migrations:migrate
Chill will be available at ``http://localhost:8001.`` Currently, there isn't any user or data. To add fixtures, run
.. code-block:: bash
docker-compose exec --user $(id -u) php bin/console doctrine:fixtures:load --purge-with-truncate
# mount into to container
./docker-php.sh
# and load fixtures (do not this for production)
bin/console doctrine:fixtures:load --purge-with-truncate
There are several users available:
@ -102,7 +172,8 @@ There are several users available:
The password is always ``password``.
Now, read `Operations` below.
Now, read `Operations` below. For running in production, read `prod_`.
Operations
**********
@ -110,7 +181,7 @@ Operations
Build assets
============
run those commands:
run those commands:
.. code-block:: bash
@ -122,8 +193,8 @@ How to execute the console ?
.. code-block:: bash
# if a container is running
docker-compose exec --user $(id -u) php bin/console
# if not
./docker-php.sh
# if not
docker-compose run --user $(id -u) php bin/console
How to create the database schema (= run migrations) ?
@ -132,9 +203,12 @@ How to create the database schema (= run migrations) ?
.. code-block:: bash
# if a container is running
docker-compose exec --user $(id -u) php bin/console doctrine:migrations:migrate
# if not
./docker-php.sh
bin/console doctrine:migrations:migrate
bin/console chill:db:sync-views
# if not
docker-compose run --user $(id -u) php bin/console doctrine:migrations:migrate
docker-compose run --user $(id -u) php bin/console chill:db:sync-views
How to read the email sent by the program ?
@ -150,8 +224,9 @@ How to load fixtures ? (development mode only)
.. code-block:: bash
# if a container is running
docker-compose exec --user $(id -u) php bin/console doctrine:fixtures:load
# if not
./docker-php.sh
bin/console doctrine:fixtures:load
# if not
docker-compose run --user $(id -u) php bin/console doctrine:fixtures:load
How to open a terminal in the project
@ -160,31 +235,49 @@ How to open a terminal in the project
.. code-block:: bash
# if a container is running
docker-compose exec --user $(id -u) php /bin/bash
# if not
./docker-php.sh
# if not
docker-compose run --user $(id -u) php /bin/bash
How to run cron-jobs ?
======================
Some command must be executed in :ref:`cron jobs <cronjob>`. To execute them:
.. code-block:: bash
# if a container is running
./docker-php.sh
bin/console chill:cron-job:execute
# some of them are executed only during the night. So, we have to force the execution during the day:
bin/console chill:cron-job:execute 'name-of-the-cron'
# if not
docker-compose run --user $(id -u) php bin/console chill:cron-job:execute
# some of them are executed only during the night. So, we have to force the execution during the day:
docker-compose run --user $(id -u) php bin/console chill:cron-job:execute 'name-of-the-cron'
How to run composer ?
=====================
.. code-block:: bash
# if a container is running
docker-compose exec --user $(id -u) php ./composer.phar
# if not
docker-compose run --user $(id -u) php ./composer.phar
./docker-php.sh
composer
# if not
docker-compose run --user $(id -u) php composer
How to access to PGADMIN ?
==========================
Pgadmin is installed with docker-compose.
Pgadmin is installed with docker-compose, and is available **only if you uncomment the appropriate lines into ``docker-compose.override.yml``.
You can access it at ``http://localhost:8002``.
Credentials:
- login: admin@chill.social
- password: password
- login: from the variable you set into ``docker-composer.override.yml``
- password: same :-)
How to run tests ?
==================
@ -193,30 +286,72 @@ Tests reside inside the installed bundles. You must `cd` into that directory, do
**Note**: some bundle require the fixture to be executed. See the dedicated _how-tos_.
Exemple, for running test inside `main` bundle:
Exemple, for running unit test inside `main` bundle:
.. code-block:: bash
# mount into the php image
docker-compose run --user $(id -u) php /bin/bash
./docker-php.sh
# cd into main directory
cd vendor/chill-project/main
cd vendor/chill-project/chill-bundles
# download deps
php ../../../composer.phar install
git submodule init
git submodule update
composer install
# run tests
/vendor/bin/phpunit
bin/phpunit src/Bundle/path/to/your/test
Or for running tests to check code style and php conventions with csfixer and phpstan:
.. code-block:: bash
# run code style fixer
bin/grumphp run --tasks=phpcsfixer
# run phpstan
bin/grumphp run --tasks=phpstan
.. note::
To avoid phpstan block your commits:
.. code-block:: bash
git commit -n ...
To avoid phpstan block your commits permanently:
.. code-block:: bash
./bin/grumphp git:deinit
How to run webpack interactively
================================
Executing :code:`bash docker-node.sh` will open a terminal in a node container, with volumes mounted.
Build the documentation API
===========================
How to switch the branch for chill-bundles, and get new dependencies
====================================================================
A basic configuration of `sami <https://github.com/FriendsOfPhp/Sami>`_ is embedded within the project.
During development, you will switch to new branches for chill-bundles. As long as the dependencies are equals, this does not cause any problem. But sometimes, a new branch introduces a new dependency, and you must download it.
A configuration file for `phpDocumentor <https://www.phpdoc.org>`_ is present.
.. warning::
Ensure that you have gitlab-token ready before updating your branches. See above.
In order to do that without pain, use those steps:
0. Ensuire you have a token, set
1. at the app's root, update the ``composer.json`` to your current branch:
.. code-block:: json
{
"require": {
"chill-bundles": "dev-<my-branch>@dev"
}
2. mount into the php container (``./docker-php.sh``), and run ``composer update``
Error `An exception has been thrown during the rendering of a template ("Asset manifest file "/var/www/app/web/build/manifest.json" does not exist.").` on first run
====================================================================================================================================================================
@ -230,8 +365,9 @@ Currently, to run this software in production, the *state of the art* is the fol
1. Run the software locally and tweak the configuration to your needs ;
2. Build the image and store them into a private container registry. This can be done using :code:`make build-and-push-image`.
To be sure to target the correct container registry, you have to adapt the values ``IMAGE_NGINX`` and ``IMAGE_PHP`` date in the ``.env`` file.
To be sure to target the correct container registry, you have to adapt the image names into your ``docker-compose.override.yml`` file.
3. Push the image on your registry, or upload them to the destination machine using ``docker image save`` and ``docker image load``.
3. Run the image on your production server, using docker-compose or eventually docker stack. You have to customize the variable set in docker-compose.
See also the :ref:`running-production-tips-and-tricks` below.
@ -263,7 +399,7 @@ It is worth having an eye on the configuration of logstash container.
Design principles
*****************
Why the DB URL is set in environment, and not in parameters.yml ?
Why the DB URL is also set in environment, and not in .env file ?
=================================================================
Because, at startup, a script does check the db is up and, if not, wait for a couple of seconds before running ``entrypoint.sh``. For avoiding double configuration, the configuration of the PHP app takes his configuration from environment also (and it will be standard in future releases, with symfony 4.0).

View File

@ -0,0 +1,50 @@
.. _addresses:
Addresses
*********
Chill can store a list of geolocated address references, which are used to suggest address and ensure that the data is correctly stored.
Those addresses may be load from a dedicated source.
In France
=========
The address are loaded from the `BANO <https://bano.openstreetmap.fr/>`_. The postal codes are loaded from `the official list of
postal codes <https://datanova.laposte.fr/explore/dataset/laposte_hexasmal/information/>`_
.. code-block:: bash
# first, load postal codes
bin/console chill:main:postal-code:load:FR
# then, load all addresses, by departement (multiple departement can be loaded by repeating the departement code
bin/console chill:main:address-ref-from-bano 57 54 51
In Belgium
==========
Addresses are prepared from the `BeST Address data <https://www.geo.be/catalog/details/ca0fd5c0-8146-11e9-9012-482ae30f98d9>`_.
Postal code are loaded from this database. There is no need to load postal codes from another source (actually, this is strongly discouraged).
The data are prepared for Chill (`See this repository <https://gitea.champs-libres.be/Chill-project/belgian-bestaddresses-transform/releases>`_).
One can select postal code by his first number (:code:`1xxx` for postal codes from 1000 to 1999), or a limited list for development purpose.
.. code-block:: bash
# load postal code from 1000 to 3999:
bin/console chill:main:address-ref-from-best-addresse 1xxx 2xxx 3xxx
# load only an extract (for dev purposes)
bin/console chill:main:address-ref-from-best-addresse extract
# load full addresses (discouraged)
bin/console chill:main:address-ref-from-best-addresse full
.. note::
There is a possibility to load the full list of addresses is discouraged: the loading is optimized with smaller extracts.
Once you load the full list, it is not possible to load smaller extract: each extract loaded **after** will not
delete the addresses loaded with the full extract (and some addresses will be present twice).

View File

@ -0,0 +1,320 @@
Configure Chill for calendar sync and SSO with Microsoft Graph (Outlook)
========================================================================
Chill offers the possibility to:
* authenticate users using Microsoft Graph, with relatively small adaptations;
* synchronize calendar in both ways (`see the user manual for a large description of the feature <https://gitea.champs-libres.be/Chill-project/manuals>`_).
Both can be configured separately (synchronising calendars without SSO, or SSO without calendar). When calendar sync is configured without SSL, the user's email address is the key to associate Chill's users with Microsoft's ones.
Configure SSO
-------------
On Azure side
*************
Configure an app with the Azure interface, and give it the name of your choice.
Grab the tenant's ID for your app, which is visible on the main tab "Vue d'ensemble":
.. figure:: ./saml_login_id_general.png
This the variable which will be named :code:`SAML_IDP_APP_UUID`.
Go to the "Single sign-on" ("Authentication unique") section. Choose "SAML" as protocol, and fill those values:
.. figure:: ./saml_login_1.png
1. The :code:`entityId` seems to be arbitrary. This will be your variable :code:`SAML_ENTITY_ID`;
2. The url response must be your Chill's URL appended by :code:`/saml/acs`
3. The only used attributes is :code:`emailaddress`, which must match the user's email one.
.. figure:: ./saml_login_2.png
You must download the certificate, as base64. The format for the download is :code:`cer`: you will remove the first and last line (the ones with :code:`-----BEGIN CERTIFICATE-----` and :code:`-----END CERTIFICATE-----`), and remove all the return line. The final result should be something as :code:`MIIAbcdef...XyZA=`.
This certificat will be your :code:`SAML_IDP_X509_CERT` variable.
The url login will be filled automatically with your tenant id.
Do not forget to provider user's accesses to your app, using the "Utilisateurs et groupes" tab:
.. figure:: ./saml_login_appro.png
You must know have gathered all the required variables for SSO:
.. code-block::
SAML_BASE_URL=https://test.chill.be # must be
SAML_ENTITY_ID=https://test.chill.be # must match the one entered
SAML_IDP_APP_UUID=42XXXXXX-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SAML_IDP_X509_CERT: MIIC...E8u3bk # truncated
Configure chill app
*******************
* add the bundle :code:`hslavich/oneloginsaml-bundle`
* add the configuration file (see example above)
* configure the security part (see example above)
* add a user SAML factory into your src, and register it
.. code-block:: yaml
# config/packages/hslavich_onelogin.yaml
parameters:
saml_base_url: '%env(resolve:SAML_BASE_URL)%'
saml_entity_id: '%env(resolve:SAML_ENTITY_ID)%'
saml_idp_x509cert: '%env(resolve:SAML_IDP_X509_CERT)%'
saml_idp_app_uuid: '%env(resolve:SAML_IDP_APP_UUID)%'
hslavich_onelogin_saml:
# Basic settings
idp:
entityId: 'https://sts.windows.net/%saml_idp_app_uuid%/'
singleSignOnService:
url: 'https://login.microsoftonline.com/%saml_idp_app_uuid%/saml2'
binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'
singleLogoutService:
url: 'https://login.microsoftonline.com/%saml_idp_app_uuid%/saml2'
binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'
x509cert: '%saml_idp_x509cert%'
sp:
entityId: '%saml_entity_id%'
assertionConsumerService:
url: '%saml_base_url%/saml/acs'
binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'
singleLogoutService:
url: '%saml_base_url%/saml/'
binding: 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'
privateKey: ''
# Optional settings.
baseurl: '%saml_base_url%/saml'
strict: true
debug: true
security:
nameIdEncrypted: false
authnRequestsSigned: false
logoutRequestSigned: false
logoutResponseSigned: false
wantMessagesSigned: false
wantAssertionsSigned: false
wantNameIdEncrypted: false
requestedAuthnContext: true
signMetadata: false
wantXMLValidation: true
signatureAlgorithm: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256'
digestAlgorithm: 'http://www.w3.org/2001/04/xmlenc#sha256'
contactPerson:
technical:
givenName: 'Tech User'
emailAddress: 'techuser@example.com'
support:
givenName: 'Support User'
emailAddress: 'supportuser@example.com'
organization:
en:
name: 'Example'
displayname: 'Example'
url: 'http://example.com'
.. code-block:: yaml
# config/security.yaml
# merge this with other existing configurations
security:
providers:
saml_provider:
# Loads user from user repository
entity:
class: Chill\MainBundle\Entity\User
property: username
firewalls:
default:
# saml part:
saml:
username_attribute: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
# weird behaviour in dev environment... configuration seems different
# username_attribute: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name
# Use the attribute's friendlyName instead of the name
use_attribute_friendly_name: false
user_factory: user_from_saml_factory
persist_user: true
check_path: saml_acs
login_path: saml_login
logout:
path: /saml/logout
.. code-block:: php
// src/Security/SamlFactory.php
namespace App\Security;
use Chill\MainBundle\Entity\User;
use Hslavich\OneloginSamlBundle\Security\Authentication\Token\SamlTokenInterface;
use Hslavich\OneloginSamlBundle\Security\User\SamlUserFactoryInterface;
class UserSamlFactory implements SamlUserFactoryInterface
{
public function createUser(SamlTokenInterface $token)
{
$attributes = $token->getAttributes();
$user = new User();
$user->setUsername($attributes['http://schemas.microsoft.com/identity/claims/displayname'][0]);
$user->setLabel($attributes['http://schemas.microsoft.com/identity/claims/displayname'][0]);
$user->setPassword('');
$user->setEmail($attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'][0]);
$user->setAttributes($attributes);
return $user;
}
}
Configure sync
--------------
The sync processe might be configured in the same app, or into a different app.
The synchronization processes use Oauth2.0 for authentication and authorization.
.. note::
Two flows are in use:
* we authenticate "on behalf of a user", to allow users to see their own calendar or other user's calendar into the web interface.
Typically, when the page is loaded, Chill first check that an authorization token exists. If not, the user is redirected to Microsoft Azure for authentification and a new token is grabbed (most of the times, this is transparent for users).
* Chill also acts "as a machine", to synchronize calendars with a daemon background.
One can access the configuration using this screen (it is quite well hidden into the multiple of tabs):
.. figure:: ./oauth_app_registration.png
You can find the oauth configuration on the "Securité > Autorisations" tab, and click on "application registration" (not translated).
Add a redirection URI for you authentification:
.. figure:: ./oauth_api_authentification.png
The URI must be "your chill public url" with :code:`/connect/azure/check` at the end.
Allow some authorizations for your app:
.. figure:: ./oauth_api_autorisees.png
Take care of the separation between autorization "on behalf of a user" (déléguée), or "for a machine" (application).
Some explanation:
* Users must be allowed to read their user profile (:code:`User.Read`), and the profile of other users (:code:`User.ReadBasicAll`);
* They must be allowed to read their calendar (:code:`Calendars.Read`), and the calendars shared with them (:code:`Calendars.Read.Shared`);
The sync daemon must have write access:
* the daemon must be allowed to read all users and their profile, to establish a link between them and the Chill's users: (:code:`Users.Read.All`);
* it must also be allowed to read and write into the calendars (:code:`Calendars.ReadWrite.All`)
* for sending invitation to other users, the permission (:code:`Mail.Send`) must be granted.
At this step, you might choose to accept those permissions for all users, or let them do it by yourself.
Grab your client id:
.. figure:: ./oauth_api_client_id.png
This will be your :code:`OAUTH_AZURE_CLIENT_ID` variable.
Generate a secret:
.. figure:: ./oauth_api_secret.png
This will be your :code:`OAUTH_AZURE_CLIENT_SECRET` variable.
And get you azure's tenant id, which is the same as the :code:`SAML_IDP_APP_UUID` (see above).
Your variables will be:
.. code-block::
OAUTH_AZURE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
OAUTH_AZURE_CLIENT_TENANT=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
OAUTH_AZURE_CLIENT_SECRET: 3-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Then, configure chill:
Enable the calendar sync with microsoft azure:
.. code-block:: yaml
# config/packages/chill_calendar.yaml
chill_calendar:
remote_calendars_sync:
microsoft_graph:
enabled: true
and configure the oauth client:
.. code-block:: yaml
# config/packages/knp_oauth2_client.yaml
knpu_oauth2_client:
clients:
azure:
type: azure
client_id: '%env(OAUTH_AZURE_CLIENT_ID)%'
client_secret: '%env(OAUTH_AZURE_CLIENT_SECRET)%'
redirect_route: chill_calendar_remote_connect_azure_check
redirect_params: { }
tenant: '%env(OAUTH_AZURE_CLIENT_TENANT)%'
url_api: 'https://graph.microsoft.com/'
default_end_point_version: '2.0'
You can now process for the first api authorization on the application side, (unless you did it in the Azure interface), and get a first token, by using :
:code:`bin/console chill:calendar:msgraph-grant-admin-consent`
This will generate a url that you can use to grant your app for your tenant. The redirection may fails in the browser, but this is not relevant: if you get an authorization token in the CLI, the authentication works.
Run the processes to synchronize
--------------------------------
The calendar synchronization is processed using symfony messenger. It seems to be intersting to configure a queue (in the postgresql database it is the most simple way), and to run a worker for synchronization, at least in production.
The association between chill's users and Microsoft's users is done by this cli command:
.. code-block::
bin/console chill:calendar:msgraph-user-map-subscribe
This command:
* will associate the Microsoft's user metadata in our database;
* and, most important, create a subscription to get notification when the user alter his calendar, to sync chill's event and ranges in sync.
The subscription least at most 3 days. This command should be runned:
* at least each time a user is added;
* and, at least, every three days.
In production, we advise to run it at least every day to get the sync working.

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -0,0 +1,27 @@
Send short messages (SMS) with calendar bundle
==============================================
To activate the sending of messages, you should run this command on a regularly basis (using, for instance, a cronjob):
.. code-block:: bash
bin/console chill:calendar:send-short-messages
A transporter must be configured for the message to be effectively sent.
Configure OVH Transporter
-------------------------
Currently, this is the only one transporter available.
For configuring this, simply add this config variable in your environment:
```env
SHORT_MESSAGE_DSN=ovh://applicationKey:applicationSecret@endpoint?consumerKey=xxxx&sender=yyyy&service_name=zzzz
```
In order to generate the application key, secret, and consumerKey, refers to their `documentation <https://docs.ovh.com/gb/en/api/first-steps-with-ovh-api/>`_.
Before to be able to send your first sms, you must enable your account, grab some credits, and configure a sender. The service_name is an internal configuration generated by OVH.

View File

@ -0,0 +1,71 @@
.. Copyright (C) 2014-2019 Champs Libres Cooperative SCRLFS
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
.. _prod:
Installation for production
###########################
An installation use these services, which are deployed using docker containers:
* a php-fpm image, which run the Php and Symfony code for Chill;
* a nginx image, which serves the assets, and usually proxy the php requests to the fpm image;
* a redis server, which stores the cache, sessions (this is currently hardcoded in the php image), and some useful keys (like wopi locks);
* a postgresql database. The use of postgresql is mandatory;
* a relatorio service, which transform odt templates to full documents (replacing the placeholders);
Some external services:
* (required) an openstack object store, configured with `temporary url <https://docs.openstack.org/swift/latest/api/temporary_url_middleware.html>` configured (no openstack users is required). This is currently the only way to store documents from chill;
* a mailer service (SMTP)
* (optional) a service for verifying phone number. Currently, only Twilio is possible;
* (optional) a service for sending Short Messages (SMS). Currently, only Ovh is possible;
The `docker-compose.yaml` file of chill app is a basis for a production install. The environment variable in the ```.env``` and ```.env.prod``` should be overriden by environment variables, or ```.env.local``` files.
This should be adapted to your needs:
* The image for php and nginx apps are pre-compiled images, with the default configuration and bundle. If they do not fullfill your needs, you should compile your own images.
.. TODO:
As the time of writing (2022-07-03) those images are not published yet.
* Think about how you will backup your database. Some adminsys find easier to store database outside of docker, which might be easier to administrate or replicate.
Run migrations on each update
=============================
Every time you start a new version, you should apply update the sql schema:
- running ``bin/console doctrine:migration:migrate`` to run sql migration;
- synchonizing sql views to the last state: ``bin/console chill:db:sync-views``
Cron jobs
=========
The command :code:`chill:cron-job:execute` should be executed every 15 minutes (more or less).
This command should never be executed concurrently. It should be not have more than one process for a single instance.
Post-install tasks
==================
- import addresses. See :ref:`addresses`.
Tweak symfony messenger
=======================
Calendar sync is processed using symfony messenger.
You can tweak the configuration
Going further:
* Configure the saml login and synchronisation with Outlook api

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

View File

@ -0,0 +1,63 @@
Entity,Join,Attribute,Alias
AccompanyingPeriod::class,,,acp
,AccompanyingPeriodWork::class,acp.works,acpw
,AccompanyingPeriodParticipation::class,acp.participations,acppart
,Location::class,acp.administrativeLocation,acploc
,ClosingMotive::class,acp.closingMotive,acpmotive
,UserJob::class,acp.job,acpjob
,Origin::class,acp.origin,acporigin
,Scope::class,acp.scopes,acpscope
,SocialIssue::class,acp.socialIssues,acpsocialissue
,User::class,acp.user,acpuser
AccompanyingPeriodWork::class,,,acpw
,AccompanyingPeriodWorkEvaluation::class,acpw.accompanyingPeriodWorkEvaluations,workeval
,User::class,acpw.referrers,acpwuser
,SocialAction::class,acpw.socialAction,acpwsocialaction
,Goal::class,acpw.goals,goal
,Result::class,acpw.results,result
AccompanyingPeriodParticipation::class,,,acppart
,Person::class,acppart.person,partperson
AccompanyingPeriodWorkEvaluation::class,,,workeval
,Evaluation::class,workeval.evaluation,eval
Goal::class,,,goal
,Result::class,goal.results,goalresult
Person::class,,,person
,Center::class,person.center,center
,HouseholdMember::class,partperson.householdParticipations,householdmember
,MaritalStatus::class,person.maritalStatus,personmarital
,VendeePerson::class,,vp
,VendeePersonMineur::class,,vpm
ResidentialAddress::class,,,resaddr
,ThirdParty::class,resaddr.hostThirdParty,tparty
ThirdParty::class,,,tparty
,ThirdPartyCategory::class,tparty.categories,tpartycat
HouseholdMember::class,,,householdmember
,Household::class,householdmember.household,household
,Person::class,householdmember.person,memberperson
,,memberperson.center,membercenter
Household::class,,,household
,HouseholdComposition::class,household.compositions,composition
Activity::class,,,activity
,Person::class,activity.person,actperson
,AccompanyingPeriod::class,activity.accompanyingPeriod,acp
,Person::class,activity_person_having_activity.person,person_person_having_activity
,ActivityReason::class,activity_person_having_activity.reasons,reasons_person_having_activity
,ActivityType::class,activity.activityType,acttype
,Location::class,activity.location,actloc
,SocialAction::class,activity.socialActions,actsocialaction
,SocialIssue::class,activity.socialIssues,actsocialssue
,ThirdParty::class,activity.thirdParties,acttparty
,User::class,activity.user,actuser
,User::class,activity.users,actusers
,ActivityReason::class,activity.reasons,actreasons
,Center::class,actperson.center,actcenter
ActivityReason::class,,,actreasons
,ActivityReasonCategory::class,actreason.category,actreasoncat
Calendar::class,,,cal
,CancelReason::class,cal.cancelReason,calcancel
,Location::class,cal.location,calloc
,User::class,cal.user,caluser
VendeePerson::class,,,vp
,SituationProfessionelle::class,vp.situationProfessionelle,vpprof
,StatutLogement::class,vp.statutLogement,vplog
,TempsDeTravail::class,vp.tempsDeTravail,vptt
1 Entity Join Attribute Alias
2 AccompanyingPeriod::class acp
3 AccompanyingPeriodWork::class acp.works acpw
4 AccompanyingPeriodParticipation::class acp.participations acppart
5 Location::class acp.administrativeLocation acploc
6 ClosingMotive::class acp.closingMotive acpmotive
7 UserJob::class acp.job acpjob
8 Origin::class acp.origin acporigin
9 Scope::class acp.scopes acpscope
10 SocialIssue::class acp.socialIssues acpsocialissue
11 User::class acp.user acpuser
12 AccompanyingPeriodWork::class acpw
13 AccompanyingPeriodWorkEvaluation::class acpw.accompanyingPeriodWorkEvaluations workeval
14 User::class acpw.referrers acpwuser
15 SocialAction::class acpw.socialAction acpwsocialaction
16 Goal::class acpw.goals goal
17 Result::class acpw.results result
18 AccompanyingPeriodParticipation::class acppart
19 Person::class acppart.person partperson
20 AccompanyingPeriodWorkEvaluation::class workeval
21 Evaluation::class workeval.evaluation eval
22 Goal::class goal
23 Result::class goal.results goalresult
24 Person::class person
25 Center::class person.center center
26 HouseholdMember::class partperson.householdParticipations householdmember
27 MaritalStatus::class person.maritalStatus personmarital
28 VendeePerson::class vp
29 VendeePersonMineur::class vpm
30 ResidentialAddress::class resaddr
31 ThirdParty::class resaddr.hostThirdParty tparty
32 ThirdParty::class tparty
33 ThirdPartyCategory::class tparty.categories tpartycat
34 HouseholdMember::class householdmember
35 Household::class householdmember.household household
36 Person::class householdmember.person memberperson
37 memberperson.center membercenter
38 Household::class household
39 HouseholdComposition::class household.compositions composition
40 Activity::class activity
41 Person::class activity.person actperson
42 AccompanyingPeriod::class activity.accompanyingPeriod acp
43 Person::class activity_person_having_activity.person person_person_having_activity
44 ActivityReason::class activity_person_having_activity.reasons reasons_person_having_activity
45 ActivityType::class activity.activityType acttype
46 Location::class activity.location actloc
47 SocialAction::class activity.socialActions actsocialaction
48 SocialIssue::class activity.socialIssues actsocialssue
49 ThirdParty::class activity.thirdParties acttparty
50 User::class activity.user actuser
51 User::class activity.users actusers
52 ActivityReason::class activity.reasons actreasons
53 Center::class actperson.center actcenter
54 ActivityReason::class actreasons
55 ActivityReasonCategory::class actreason.category actreasoncat
56 Calendar::class cal
57 CancelReason::class cal.cancelReason calcancel
58 Location::class cal.location calloc
59 User::class cal.user caluser
60 VendeePerson::class vp
61 SituationProfessionelle::class vp.situationProfessionelle vpprof
62 StatutLogement::class vp.statutLogement vplog
63 TempsDeTravail::class vp.tempsDeTravail vptt

View File

@ -0,0 +1,74 @@
# Export conventions
Add condition with distinct alias on each export join clauses (Indicators + Filters + Aggregators)
These are alias conventions :
| Entity | Join | Attribute | Alias |
|:----------------------------------------|:----------------------------------------|:-------------------------------------------|:---------------------------------------|
| AccompanyingPeriod::class | | | acp |
| | AccompanyingPeriodWork::class | acp.works | acpw |
| | AccompanyingPeriodParticipation::class | acp.participations | acppart |
| | Location::class | acp.administrativeLocation | acploc |
| | ClosingMotive::class | acp.closingMotive | acpmotive |
| | UserJob::class | acp.job | acpjob |
| | Origin::class | acp.origin | acporigin |
| | Scope::class | acp.scopes | acpscope |
| | SocialIssue::class | acp.socialIssues | acpsocialissue |
| | User::class | acp.user | acpuser |
| | AccompanyingPeriopStepHistory::class | acp.stepHistories | acpstephistories |
| AccompanyingPeriodWork::class | | | acpw |
| | AccompanyingPeriodWorkEvaluation::class | acpw.accompanyingPeriodWorkEvaluations | workeval |
| | User::class | acpw.referrers | acpwuser |
| | SocialAction::class | acpw.socialAction | acpwsocialaction |
| | Goal::class | acpw.goals | goal |
| | Result::class | acpw.results | result |
| AccompanyingPeriodParticipation::class | | | acppart |
| | Person::class | acppart.person | partperson |
| AccompanyingPeriodWorkEvaluation::class | | | workeval |
| | Evaluation::class | workeval.evaluation | eval |
| Goal::class | | | goal |
| | Result::class | goal.results | goalresult |
| Person::class | | | person |
| | Center::class | person.center | center |
| | HouseholdMember::class | partperson.householdParticipations | householdmember |
| | MaritalStatus::class | person.maritalStatus | personmarital |
| | VendeePerson::class | | vp |
| | VendeePersonMineur::class | | vpm |
| | CurrentPersonAddress::class | person.currentPersonAddress | currentPersonAddress (on a given date) |
| ResidentialAddress::class | | | resaddr |
| | ThirdParty::class | resaddr.hostThirdParty | tparty |
| ThirdParty::class | | | tparty |
| | ThirdPartyCategory::class | tparty.categories | tpartycat |
| HouseholdMember::class | | | householdmember |
| | Household::class | householdmember.household | household |
| | Person::class | householdmember.person | memberperson |
| | | memberperson.center | membercenter |
| Household::class | | | household |
| | HouseholdComposition::class | household.compositions | composition |
| Activity::class | | | activity |
| | Person::class | activity.person | actperson |
| | AccompanyingPeriod::class | activity.accompanyingPeriod | acp |
| | Person::class | activity\_person\_having\_activity.person | person\_person\_having\_activity |
| | ActivityReason::class | activity\_person\_having\_activity.reasons | reasons\_person\_having\_activity |
| | ActivityType::class | activity.activityType | acttype |
| | Location::class | activity.location | actloc |
| | SocialAction::class | activity.socialActions | actsocialaction |
| | SocialIssue::class | activity.socialIssues | actsocialssue |
| | ThirdParty::class | activity.thirdParties | acttparty |
| | User::class | activity.user | actuser |
| | User::class | activity.users | actusers |
| | ActivityReason::class | activity.reasons | actreasons |
| | Center::class | actperson.center | actcenter |
| | Person::class | activity.createdBy | actcreator |
| ActivityReason::class | | | actreasons |
| | ActivityReasonCategory::class | actreason.category | actreasoncat |
| Calendar::class | | | cal |
| | CancelReason::class | cal.cancelReason | calcancel |
| | Location::class | cal.location | calloc |
| | User::class | cal.user | caluser |
| VendeePerson::class | | | vp |
| | SituationProfessionelle::class | vp.situationProfessionelle | vpprof |
| | StatutLogement::class | vp.statutLogement | vplog |
| | TempsDeTravail::class | vp.tempsDeTravail | vptt |

View File

@ -1,39 +0,0 @@
imports:
- {
resource: tests/app/vendor/drupol/php-conventions/config/php73/grumphp.yml,
}
parameters:
tasks.phpcsfixer.config: .php_cs.dist.php
tasks.license.name: AGPL-3.0
tasks.license.holder: Champs-Libres
tasks.license.date_from: 2001
tasks.phpcsfixer.allow_risky: true
tasks.phpcsfixer.diff: true
tasks.phpstan.level: 1
tasks.phpstan.blocking: true
tasks.phpstan.ignore_patterns:
- "/.github/"
- "/.idea/"
- "/build/"
- "/benchmarks/"
- "/docs/"
- "/node_modules/"
- "/resource/"
- "/spec/"
- "/var/"
- "/vendor/"
# Psalm
tasks.psalm.blocking: true
tasks.psalm.ignore_patterns:
- "/.github/"
- "/.idea/"
- "/build/"
- "/benchmarks/"
- "/node_modules/"
- "/resource/"
- "/spec/"
- "/var/"
- "/vendor/"

68
package.json Normal file
View File

@ -0,0 +1,68 @@
{
"name": "chill",
"version": "2.0.0",
"devDependencies": {
"@alexlafroscia/yaml-merge": "^4.0.0",
"@apidevtools/swagger-cli": "^4.0.4",
"@babel/core": "^7.20.5",
"@babel/preset-env": "^7.20.2",
"@ckeditor/ckeditor5-build-classic": "^35.3.2",
"@ckeditor/ckeditor5-dev-utils": "^31.1.13",
"@ckeditor/ckeditor5-dev-webpack-plugin": "^31.1.13",
"@ckeditor/ckeditor5-markdown-gfm": "^35.3.2",
"@ckeditor/ckeditor5-theme-lark": "^35.3.2",
"@ckeditor/ckeditor5-vue": "^4.0.1",
"@symfony/webpack-encore": "^4.1.0",
"@tsconfig/node14": "^1.0.1",
"bindings": "^1.5.0",
"bootstrap": "^5.0.1",
"chokidar": "^3.5.1",
"fork-awesome": "^1.1.7",
"jquery": "^3.6.0",
"node-sass": "^8.0.0",
"popper.js": "^1.16.1",
"postcss-loader": "^7.0.2",
"raw-loader": "^4.0.2",
"sass-loader": "^13.0.0",
"select2": "^4.0.13",
"select2-bootstrap-theme": "0.1.0-beta.10",
"style-loader": "^3.3.1",
"ts-loader": "^9.3.1",
"typescript": "^4.7.2",
"vue-loader": "^17.0.0",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
},
"dependencies": {
"@fullcalendar/core": "^6.1.4",
"@fullcalendar/daygrid": "^6.1.4",
"@fullcalendar/interaction": "^6.1.4",
"@fullcalendar/list": "^6.1.4",
"@fullcalendar/timegrid": "^6.1.4",
"@fullcalendar/vue3": "^6.1.4",
"@popperjs/core": "^2.9.2",
"@types/leaflet": "^1.9.3",
"dropzone": "^5.7.6",
"es6-promise": "^4.2.8",
"leaflet": "^1.7.1",
"masonry-layout": "^4.2.2",
"mime": "^3.0.0",
"swagger-ui": "^4.15.5",
"vis-network": "^9.1.0",
"vue": "^3.2.37",
"vue-i18n": "^9.1.6",
"vue-multiselect": "3.0.0-alpha.2",
"vue-toast-notification": "^2.0",
"vuex": "^4.0.0"
},
"browserslist": [
"Firefox ESR"
],
"scripts": {
"dev-server": "encore dev-server",
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production --progress"
},
"private": true
}

View File

@ -0,0 +1,301 @@
parameters:
ignoreErrors:
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\ActivityBundle\\\\Entity\\\\Activity\\|null given\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
-
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\MainBundle\\\\Entity\\\\Scope\\|null given\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
-
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\PersonBundle\\\\Entity\\\\Person\\|null given\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
-
message: "#^Only booleans are allowed in a ternary operator condition, DateTime\\|null given\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\ActivityBundle\\\\Entity\\\\ActivityReasonCategory\\|null given\\.$#"
count: 3
path: src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\ActivityBundle\\\\Entity\\\\ActivityReason\\|null given\\.$#"
count: 2
path: src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php
-
message: "#^Call to method DateTime\\:\\:setTimezone\\(\\) with incorrect case\\: setTimeZone$#"
count: 1
path: src/Bundle/ChillActivityBundle/Form/ActivityType.php
-
message: "#^Only booleans are allowed in &&, Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\|null given on the right side\\.$#"
count: 2
path: src/Bundle/ChillActivityBundle/Form/ActivityType.php
-
message: "#^Only booleans are allowed in an if condition, Chill\\\\AsideActivityBundle\\\\Entity\\\\AsideActivityCategory\\|null given\\.$#"
count: 1
path: src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php
-
message: "#^Call to method DateTimeImmutable\\:\\:setTimezone\\(\\) with incorrect case\\: setTimeZone$#"
count: 1
path: src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php
-
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\MainBundle\\\\Entity\\\\Location\\|null given\\.$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Controller/CalendarController.php
-
message: "#^Only booleans are allowed in an if condition, Symfony\\\\Component\\\\Validator\\\\ConstraintViolationListInterface given\\.$#"
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomFieldsGroup\\|null given\\.$#"
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomField\\|null given\\.$#"
count: 3
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php
-
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomFieldsGroup given\\.$#"
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomFieldsGroup\\|null given\\.$#"
count: 4
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
-
message: "#^Only booleans are allowed in a ternary operator condition, string given\\.$#"
count: 1
path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php
-
message: "#^Only booleans are allowed in a negated boolean, string given\\.$#"
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php
-
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getFirstName\\(\\) with incorrect case\\: getFirstname$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getLastName\\(\\) with incorrect case\\: getLastname$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getMobilenumber\\(\\) with incorrect case\\: getMobileNumber$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getPhonenumber\\(\\) with incorrect case\\: getPhoneNumber$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Event given\\.$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Event\\|null given\\.$#"
count: 3
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Only booleans are allowed in a ternary operator condition, int given\\.$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Only numeric types are allowed in pre\\-increment, string given\\.$#"
count: 2
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\EventType\\|null given\\.$#"
count: 4
path: src/Bundle/ChillEventBundle/Controller/EventTypeController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Participation\\|null given\\.$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/ParticipationController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Role\\|null given\\.$#"
count: 4
path: src/Bundle/ChillEventBundle/Controller/RoleController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\EventBundle\\\\Entity\\\\Status\\|null given\\.$#"
count: 4
path: src/Bundle/ChillEventBundle/Controller/StatusController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\Language\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php
-
message: "#^Only booleans are allowed in an if condition, Chill\\\\MainBundle\\\\Entity\\\\Language\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php
-
message: "#^Only booleans are allowed in an if condition, int given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\Center\\|null given\\.$#"
count: 3
path: src/Bundle/ChillMainBundle/Controller/CenterController.php
-
message: "#^Call to method Redis\\:\\:setex\\(\\) with incorrect case\\: setEx$#"
count: 2
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\PermissionsGroup\\|null given\\.$#"
count: 5
path: src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\RoleScope\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\Scope\\|null given\\.$#"
count: 3
path: src/Bundle/ChillMainBundle/Controller/ScopeController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\GroupCenter\\|null given\\.$#"
count: 2
path: src/Bundle/ChillMainBundle/Controller/UserController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\MainBundle\\\\Entity\\\\User\\|null given\\.$#"
count: 2
path: src/Bundle/ChillMainBundle/Controller/UserController.php
-
message: "#^Only booleans are allowed in an if condition, int given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php
-
message: "#^Only numeric types are allowed in pre\\-increment, string given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php
-
message: "#^Only booleans are allowed in an if condition, int given\\.$#"
count: 2
path: src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php
-
message: "#^Only booleans are allowed in a ternary operator condition, string\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php
-
message: "#^Only booleans are allowed in a ternary operator condition, int\\<0, max\\> given\\.$#"
count: 4
path: src/Bundle/ChillMainBundle/Search/SearchApiQuery.php
-
message: "#^Call to method Chill\\\\MainBundle\\\\Entity\\\\Address\\:\\:getPostcode\\(\\) with incorrect case\\: getPostCode$#"
count: 6
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php
-
message: "#^Only booleans are allowed in an if condition, Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassDiscriminatorMapping\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php
-
message: "#^Only booleans are allowed in a negated boolean, null given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Entity/Person.php
-
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriodParticipation\\|null given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Entity/Person.php
-
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getFirstName\\(\\) with incorrect case\\: getFirstname$#"
count: 1
path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
-
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getLastName\\(\\) with incorrect case\\: getLastname$#"
count: 1
path: src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
-
message: "#^Only booleans are allowed in an if condition, int\\<0, max\\> given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Search/SimilarPersonMatcher.php
-
message: "#^Only booleans are allowed in &&, null given on the left side\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php
-
message: "#^Only booleans are allowed in a ternary operator condition, Chill\\\\PersonBundle\\\\Entity\\\\Household\\\\Household\\|null given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
-
message: "#^Only booleans are allowed in a ternary operator condition, array\\<Chill\\\\PersonBundle\\\\Entity\\\\Person\\\\ResidentialAddress\\> given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
-
message: "#^Call to method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getDeathdate\\(\\) with incorrect case\\: getDeathDate$#"
count: 2
path: src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\PersonBundle\\\\Entity\\\\Person\\|null given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
-
message: "#^Only booleans are allowed in a negated boolean, Chill\\\\ReportBundle\\\\Entity\\\\Report given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
-
message: "#^Call to method Chill\\\\ThirdPartyBundle\\\\Entity\\\\ThirdParty\\:\\:setFirstname\\(\\) with incorrect case\\: setFirstName$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/EventListener/ThirdPartyEventListener.php
-
message: "#^Dynamic call to static method Chill\\\\ThirdPartyBundle\\\\ThirdPartyType\\\\ThirdPartyTypeProviderInterface\\:\\:getKey\\(\\)\\.$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/ThirdPartyType/ThirdPartyTypeManager.php

View File

@ -0,0 +1,804 @@
parameters:
ignoreErrors:
-
message: "#^Return type \\(array\\<Chill\\\\ActivityBundle\\\\Entity\\\\Activity\\>\\) of method Chill\\\\ActivityBundle\\\\Repository\\\\ActivityACLAwareRepository\\:\\:findByPerson\\(\\) should be covariant with return type \\(array\\<Chill\\\\ActivityBundle\\\\Repository\\\\Activity\\>\\) of method Chill\\\\ActivityBundle\\\\Repository\\\\ActivityACLAwareRepositoryInterface\\:\\:findByPerson\\(\\)$#"
count: 1
path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php
-
message: "#^Return type \\(array\\<Chill\\\\ActivityBundle\\\\Entity\\\\ActivityReason\\>\\) of method Chill\\\\ActivityBundle\\\\Repository\\\\ActivityReasonRepository\\:\\:findAll\\(\\) should be covariant with return type \\(array\\<int, object\\>\\) of method Doctrine\\\\ORM\\\\EntityRepository\\<object\\>\\:\\:findAll\\(\\)$#"
count: 1
path: src/Bundle/ChillActivityBundle/Repository/ActivityReasonRepository.php
-
message: "#^Return type \\(array\\<array\\<string\\>\\>\\) of method Chill\\\\AsideActivityBundle\\\\Security\\\\AsideActivityVoter\\:\\:getRolesWithHierarchy\\(\\) should be covariant with return type \\(array\\<string, array\\<int, string\\>\\>\\) of method Chill\\\\MainBundle\\\\Security\\\\ProvideRoleHierarchyInterface\\:\\:getRolesWithHierarchy\\(\\)$#"
count: 1
path: src/Bundle/ChillAsideActivityBundle/src/Security/AsideActivityVoter.php
-
message: "#^Parameter \\#1 \\$criteria \\(array\\<string, mixed\\>\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepository\\:\\:findBy\\(\\) should be contravariant with parameter \\$criteria \\(array\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepositoryInterface\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepository.php
-
message: "#^Parameter \\#1 \\$criteria \\(array\\<string, mixed\\>\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepository\\:\\:findOneBy\\(\\) should be contravariant with parameter \\$criteria \\(array\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepositoryInterface\\:\\:findOneBy\\(\\)$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepository.php
-
message: "#^Parameter \\#2 \\$orderBy \\(array\\<string, 'ASC'\\|'asc'\\|'DESC'\\|'desc'\\>\\|null\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepository\\:\\:findBy\\(\\) should be contravariant with parameter \\$orderBy \\(array\\|null\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepositoryInterface\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepository.php
-
message: "#^Return type \\(array\\<object\\>\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepository\\:\\:findAll\\(\\) should be covariant with return type \\(array\\<Chill\\\\CalendarBundle\\\\Entity\\\\CalendarDoc\\>\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepositoryInterface\\:\\:findAll\\(\\)$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepository.php
-
message: "#^Return type \\(array\\<object\\>\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepository\\:\\:findBy\\(\\) should be covariant with return type \\(array\\<Chill\\\\CalendarBundle\\\\Entity\\\\CalendarDoc\\>\\) of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarDocRepositoryInterface\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepository.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\CalendarBundle\\\\Entity\\\\CalendarDoc\\) of method Chill\\\\CalendarBundle\\\\Security\\\\Voter\\\\CalendarDocVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Security/Voter/CalendarDocVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\CalendarBundle\\\\Entity\\\\Invite\\) of method Chill\\\\CalendarBundle\\\\Security\\\\Voter\\\\InviteVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Security/Voter/InviteVoter.php
-
message: "#^Return type \\(int\\|void\\|null\\) of method Chill\\\\CustomFieldsBundle\\\\Command\\\\CreateFieldsOnGroupCommand\\:\\:execute\\(\\) should be covariant with return type \\(int\\) of method Symfony\\\\Component\\\\Console\\\\Command\\\\Command\\:\\:execute\\(\\)$#"
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php
-
message: "#^Parameter \\#1 \\$customFieldsGroup \\(Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomFieldsGroup\\|null\\) of method Chill\\\\CustomFieldsBundle\\\\Form\\\\DataTransformer\\\\CustomFieldsGroupToIdTransformer\\:\\:transform\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Form\\\\DataTransformerInterface\\:\\:transform\\(\\)$#"
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php
-
message: "#^Parameter \\#1 \\$id \\(string\\) of method Chill\\\\CustomFieldsBundle\\\\Form\\\\DataTransformer\\\\CustomFieldsGroupToIdTransformer\\:\\:reverseTransform\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Form\\\\DataTransformerInterface\\:\\:reverseTransform\\(\\)$#"
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php
-
message: "#^Parameter \\#2 \\$query \\(Doctrine\\\\ORM\\\\QueryBuilder\\) of method Chill\\\\DocGeneratorBundle\\\\Controller\\\\AdminDocGeneratorTemplateController\\:\\:orderQuery\\(\\) should be contravariant with parameter \\$query \\(mixed\\) of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:orderQuery\\(\\)$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php
-
message: "#^Parameter \\#1 \\$object \\(Doctrine\\\\Common\\\\Collections\\\\Collection\\) of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\CollectionDocGenNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/CollectionDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\CollectionDocGenNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareNormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/CollectionDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\CollectionDocGenNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/CollectionDocGenNormalizer.php
-
message: "#^Return type \\(array\\|ArrayObject\\|bool\\|float\\|int\\|string\\|void\\|null\\) of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\CollectionDocGenNormalizer\\:\\:normalize\\(\\) should be covariant with return type \\(array\\|ArrayObject\\|bool\\|float\\|int\\|string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/CollectionDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
-
message: "#^Return type \\(Chill\\\\MainBundle\\\\Entity\\\\Scope\\|null\\) of method Chill\\\\DocStoreBundle\\\\Entity\\\\PersonDocument\\:\\:getScope\\(\\) should be covariant with return type \\(Chill\\\\MainBundle\\\\Entity\\\\Scope\\) of method Chill\\\\MainBundle\\\\Entity\\\\HasScopeInterface\\:\\:getScope\\(\\)$#"
count: 1
path: src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\DocStoreBundle\\\\Entity\\\\PersonDocument\\) of method Chill\\\\DocStoreBundle\\\\Security\\\\Authorization\\\\PersonDocumentVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillDocStoreBundle/Security/Authorization/PersonDocumentVoter.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\DocStoreBundle\\\\Serializer\\\\Normalizer\\\\StoredObjectDenormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 1
path: src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\DocStoreBundle\\\\Serializer\\\\Normalizer\\\\StoredObjectDenormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\DocStoreBundle\\\\Entity\\\\AccompanyingCourseDocument\\) of method Chill\\\\DocStoreBundle\\\\Workflow\\\\AccompanyingCourseDocumentWorkflowHandler\\:\\:getRelatedObjects\\(\\) should be contravariant with parameter \\$object \\(object\\) of method Chill\\\\MainBundle\\\\Workflow\\\\EntityWorkflowHandlerInterface\\:\\:getRelatedObjects\\(\\)$#"
count: 1
path: src/Bundle/ChillDocStoreBundle/Workflow/AccompanyingCourseDocumentWorkflowHandler.php
-
message: "#^Parameter \\#1 \\$value \\(null\\) of method Chill\\\\EventBundle\\\\Form\\\\ChoiceLoader\\\\EventChoiceLoader\\:\\:loadChoiceList\\(\\) should be contravariant with parameter \\$value \\(\\(callable\\(\\)\\: mixed\\)\\|null\\) of method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Loader\\\\ChoiceLoaderInterface\\:\\:loadChoiceList\\(\\)$#"
count: 1
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
-
message: "#^Parameter \\#2 \\$value \\(null\\) of method Chill\\\\EventBundle\\\\Form\\\\ChoiceLoader\\\\EventChoiceLoader\\:\\:loadChoicesForValues\\(\\) should be contravariant with parameter \\$value \\(\\(callable\\(\\)\\: mixed\\)\\|null\\) of method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Loader\\\\ChoiceLoaderInterface\\:\\:loadChoicesForValues\\(\\)$#"
count: 1
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
-
message: "#^Parameter \\#2 \\$value \\(null\\) of method Chill\\\\EventBundle\\\\Form\\\\ChoiceLoader\\\\EventChoiceLoader\\:\\:loadValuesForChoices\\(\\) should be contravariant with parameter \\$value \\(\\(callable\\(\\)\\: mixed\\)\\|null\\) of method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Loader\\\\ChoiceLoaderInterface\\:\\:loadValuesForChoices\\(\\)$#"
count: 1
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\EventBundle\\\\Entity\\\\Event\\) of method Chill\\\\EventBundle\\\\Security\\\\Authorization\\\\EventVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillEventBundle/Security/Authorization/EventVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\EventBundle\\\\Entity\\\\Participation\\) of method Chill\\\\EventBundle\\\\Security\\\\Authorization\\\\ParticipationVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillEventBundle/Security/Authorization/ParticipationVoter.php
-
message: "#^Parameter \\#1 \\$entity \\(Chill\\\\EventBundle\\\\Entity\\\\Event\\) of method Chill\\\\EventBundle\\\\Timeline\\\\TimelineEventProvider\\:\\:getEntityTemplate\\(\\) should be contravariant with parameter \\$entity \\(Chill\\\\MainBundle\\\\Timeline\\\\type\\) of method Chill\\\\MainBundle\\\\Timeline\\\\TimelineProviderInterface\\:\\:getEntityTemplate\\(\\)$#"
count: 1
path: src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php
-
message: "#^Parameter \\#2 \\$type \\(null\\) of method Chill\\\\MainBundle\\\\CRUD\\\\Routing\\\\CRUDRoutesLoader\\:\\:supports\\(\\) should be contravariant with parameter \\$type \\(string\\|null\\) of method Symfony\\\\Component\\\\Config\\\\Loader\\\\LoaderInterface\\:\\:supports\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php
-
message: "#^Parameter \\#2 \\$query \\(Doctrine\\\\ORM\\\\QueryBuilder\\) of method Chill\\\\MainBundle\\\\Controller\\\\LocationApiController\\:\\:orderQuery\\(\\) should be contravariant with parameter \\$query \\(mixed\\) of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\AbstractCRUDController\\:\\:orderQuery\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/LocationApiController.php
-
message: "#^Parameter \\#3 \\$query \\(Doctrine\\\\ORM\\\\QueryBuilder\\) of method Chill\\\\MainBundle\\\\Controller\\\\UserApiController\\:\\:customizeQuery\\(\\) should be contravariant with parameter \\$query \\(mixed\\) of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\AbstractCRUDController\\:\\:customizeQuery\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/UserApiController.php
-
message: "#^Return type \\(object\\|null\\) of method Chill\\\\MainBundle\\\\DependencyInjection\\\\ChillMainExtension\\:\\:getConfiguration\\(\\) should be covariant with return type \\(Symfony\\\\Component\\\\Config\\\\Definition\\\\ConfigurationInterface\\|null\\) of method Symfony\\\\Component\\\\DependencyInjection\\\\Extension\\\\ConfigurationExtensionInterface\\:\\:getConfiguration\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
-
message: "#^Return type \\(object\\|null\\) of method Chill\\\\MainBundle\\\\DependencyInjection\\\\ChillMainExtension\\:\\:getConfiguration\\(\\) should be covariant with return type \\(Symfony\\\\Component\\\\Config\\\\Definition\\\\ConfigurationInterface\\|null\\) of method Symfony\\\\Component\\\\DependencyInjection\\\\Extension\\\\Extension\\:\\:getConfiguration\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
-
message: "#^Parameter \\#1 \\$value \\(null\\) of method Chill\\\\MainBundle\\\\Form\\\\ChoiceLoader\\\\PostalCodeChoiceLoader\\:\\:loadChoiceList\\(\\) should be contravariant with parameter \\$value \\(\\(callable\\(\\)\\: mixed\\)\\|null\\) of method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Loader\\\\ChoiceLoaderInterface\\:\\:loadChoiceList\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
-
message: "#^Parameter \\#2 \\$value \\(null\\) of method Chill\\\\MainBundle\\\\Form\\\\ChoiceLoader\\\\PostalCodeChoiceLoader\\:\\:loadChoicesForValues\\(\\) should be contravariant with parameter \\$value \\(\\(callable\\(\\)\\: mixed\\)\\|null\\) of method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Loader\\\\ChoiceLoaderInterface\\:\\:loadChoicesForValues\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
-
message: "#^Parameter \\#2 \\$value \\(null\\) of method Chill\\\\MainBundle\\\\Form\\\\ChoiceLoader\\\\PostalCodeChoiceLoader\\:\\:loadValuesForChoices\\(\\) should be contravariant with parameter \\$value \\(\\(callable\\(\\)\\: mixed\\)\\|null\\) of method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Loader\\\\ChoiceLoaderInterface\\:\\:loadValuesForChoices\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
-
message: "#^Parameter \\#1 \\$address \\(Chill\\\\MainBundle\\\\Entity\\\\Address\\) of method Chill\\\\MainBundle\\\\Form\\\\DataMapper\\\\AddressDataMapper\\:\\:mapDataToForms\\(\\) should be contravariant with parameter \\$viewData \\(mixed\\) of method Symfony\\\\Component\\\\Form\\\\DataMapperInterface\\:\\:mapDataToForms\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php
-
message: "#^Parameter \\#1 \\$forms \\(Iterator\\) of method Chill\\\\MainBundle\\\\Form\\\\DataMapper\\\\AddressDataMapper\\:\\:mapFormsToData\\(\\) should be contravariant with parameter \\$forms \\(iterable\\<Symfony\\\\Component\\\\Form\\\\FormInterface\\>&Traversable\\) of method Symfony\\\\Component\\\\Form\\\\DataMapperInterface\\:\\:mapFormsToData\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php
-
message: "#^Parameter \\#2 \\$address \\(Chill\\\\MainBundle\\\\Entity\\\\Address\\) of method Chill\\\\MainBundle\\\\Form\\\\DataMapper\\\\AddressDataMapper\\:\\:mapFormsToData\\(\\) should be contravariant with parameter \\$viewData \\(mixed\\) of method Symfony\\\\Component\\\\Form\\\\DataMapperInterface\\:\\:mapFormsToData\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php
-
message: "#^Parameter \\#2 \\$forms \\(Iterator\\) of method Chill\\\\MainBundle\\\\Form\\\\DataMapper\\\\AddressDataMapper\\:\\:mapDataToForms\\(\\) should be contravariant with parameter \\$forms \\(iterable\\<Symfony\\\\Component\\\\Form\\\\FormInterface\\>&Traversable\\) of method Symfony\\\\Component\\\\Form\\\\DataMapperInterface\\:\\:mapDataToForms\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php
-
message: "#^Parameter \\#1 \\$value \\(string\\) of method Chill\\\\MainBundle\\\\Form\\\\DataTransformer\\\\IdToEntityDataTransformer\\:\\:reverseTransform\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Form\\\\DataTransformerInterface\\:\\:reverseTransform\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php
-
message: "#^Parameter \\#1 \\$value \\(array\\<Chill\\\\MainBundle\\\\Entity\\\\User\\>\\|Chill\\\\MainBundle\\\\Entity\\\\User\\) of method Chill\\\\MainBundle\\\\Form\\\\Type\\\\DataTransformer\\\\EntityToJsonTransformer\\:\\:transform\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Form\\\\DataTransformerInterface\\:\\:transform\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/Type/DataTransformer/EntityToJsonTransformer.php
-
message: "#^Parameter \\#1 \\$array \\(array\\) of method Chill\\\\MainBundle\\\\Form\\\\Type\\\\DataTransformer\\\\MultipleObjectsToIdTransformer\\:\\:transform\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Form\\\\DataTransformerInterface\\:\\:transform\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php
-
message: "#^Parameter \\#1 \\$id \\(string\\) of method Chill\\\\MainBundle\\\\Form\\\\Type\\\\DataTransformer\\\\ObjectToIdTransformer\\:\\:reverseTransform\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Form\\\\DataTransformerInterface\\:\\:reverseTransform\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\) of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\EntityWorkflowVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php
-
message: "#^Parameter \\#1 \\$entity \\(Chill\\\\MainBundle\\\\Entity\\\\HasCenterInterface\\) of method Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\DefaultCenterResolver\\:\\:resolveCenter\\(\\) should be contravariant with parameter \\$entity \\(object\\) of method Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverInterface\\:\\:resolveCenter\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Security/Resolver/DefaultCenterResolver.php
-
message: "#^Parameter \\#1 \\$entity \\(Chill\\\\MainBundle\\\\Entity\\\\HasScopeInterface\\|Chill\\\\MainBundle\\\\Entity\\\\HasScopesInterface\\) of method Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\DefaultScopeResolver\\:\\:resolveScope\\(\\) should be contravariant with parameter \\$entity \\(mixed\\) of method Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\ScopeResolverInterface\\:\\:resolveScope\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Security/Resolver/DefaultScopeResolver.php
-
message: "#^Parameter \\#1 \\$address \\(Chill\\\\MainBundle\\\\Entity\\\\Address\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\AddressNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\AddressNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareNormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\AddressNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\CenterNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\CenterNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\CenterNormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\CenterNormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php
-
message: "#^Parameter \\#1 \\$collection \\(Chill\\\\MainBundle\\\\Serializer\\\\Model\\\\Collection\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\CollectionNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\CollectionNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\MainBundle\\\\Entity\\\\Embeddable\\\\CommentEmbeddable\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\CommentEmbeddableDocGenNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DateNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DateNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareNormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DateNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DateNormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DateNormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DiscriminatedObjectDenormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DiscriminatedObjectDenormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareDenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DiscriminatedObjectDenormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DoctrineExistingEntityNormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\DoctrineExistingEntityNormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\EntityWorkflowNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflowStep\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\EntityWorkflowStepNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\MainBundle\\\\Entity\\\\Notification\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\NotificationNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php
-
message: "#^Return type \\(array\\|ArrayObject\\|bool\\|float\\|int\\|string\\|void\\|null\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\NotificationNormalizer\\:\\:normalize\\(\\) should be covariant with return type \\(array\\|ArrayObject\\|bool\\|float\\|int\\|string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php
-
message: "#^Parameter \\#1 \\$data \\(string\\|null\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\PhonenumberNormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$data \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\PhonenumberNormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\PointNormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\PointNormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\PrivateCommentEmbeddableNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\UserNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\UserNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareNormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\MainBundle\\\\Serializer\\\\Normalizer\\\\UserNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php
-
message: "#^Parameter \\#1 \\$value \\(string\\) of method Chill\\\\MainBundle\\\\Validation\\\\Validator\\\\ValidPhonenumber\\:\\:validate\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Validator\\\\ConstraintValidatorInterface\\:\\:validate\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php
-
message: "#^Parameter \\#2 \\$constraint \\(Chill\\\\MainBundle\\\\Validation\\\\Constraint\\\\PhonenumberConstraint\\) of method Chill\\\\MainBundle\\\\Validation\\\\Validator\\\\ValidPhonenumber\\:\\:validate\\(\\) should be contravariant with parameter \\$constraint \\(Symfony\\\\Component\\\\Validator\\\\Constraint\\) of method Symfony\\\\Component\\\\Validator\\\\ConstraintValidatorInterface\\:\\:validate\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php
-
message: "#^Parameter \\#1 \\$value \\(object\\) of method Chill\\\\MainBundle\\\\Validator\\\\Constraints\\\\Entity\\\\UserCircleConsistencyValidator\\:\\:validate\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Validator\\\\ConstraintValidatorInterface\\:\\:validate\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php
-
message: "#^Parameter \\#2 \\$constraint \\(Chill\\\\MainBundle\\\\Validator\\\\Constraints\\\\Entity\\\\UserCircleConsistency\\) of method Chill\\\\MainBundle\\\\Validator\\\\Constraints\\\\Entity\\\\UserCircleConsistencyValidator\\:\\:validate\\(\\) should be contravariant with parameter \\$constraint \\(Symfony\\\\Component\\\\Validator\\\\Constraint\\) of method Symfony\\\\Component\\\\Validator\\\\ConstraintValidatorInterface\\:\\:validate\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php
-
message: "#^Parameter \\#1 \\$value \\(Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\) of method Chill\\\\MainBundle\\\\Workflow\\\\Validator\\\\EntityWorkflowCreationValidator\\:\\:validate\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Validator\\\\ConstraintValidatorInterface\\:\\:validate\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Workflow/Validator/EntityWorkflowCreationValidator.php
-
message: "#^Parameter \\#1 \\$value \\(Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflowStep\\) of method Chill\\\\MainBundle\\\\Workflow\\\\Validator\\\\StepDestValidValidator\\:\\:validate\\(\\) should be contravariant with parameter \\$value \\(mixed\\) of method Symfony\\\\Component\\\\Validator\\\\ConstraintValidatorInterface\\:\\:validate\\(\\)$#"
count: 2
path: src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValidValidator.php
-
message: "#^Parameter \\#3 \\$query \\(Doctrine\\\\ORM\\\\QueryBuilder\\) of method Chill\\\\PersonBundle\\\\Controller\\\\HouseholdCompositionTypeApiController\\:\\:customizeQuery\\(\\) should be contravariant with parameter \\$query \\(mixed\\) of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\AbstractCRUDController\\:\\:customizeQuery\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/HouseholdCompositionTypeApiController.php
-
message: "#^Return type \\(Doctrine\\\\Common\\\\Collections\\\\Collection\\) of method Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\:\\:getScopes\\(\\) should be covariant with return type \\(iterable\\<Chill\\\\MainBundle\\\\Entity\\\\Scope\\>\\) of method Chill\\\\MainBundle\\\\Entity\\\\HasScopesInterface\\:\\:getScopes\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
-
message: "#^Return type \\(Chill\\\\MainBundle\\\\Entity\\\\Center\\|null\\) of method Chill\\\\PersonBundle\\\\Entity\\\\Person\\:\\:getCenter\\(\\) should be covariant with return type \\(Chill\\\\MainBundle\\\\Entity\\\\Center\\) of method Chill\\\\MainBundle\\\\Entity\\\\HasCenterInterface\\:\\:getCenter\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Entity/Person.php
-
message: "#^Parameter \\#1 \\$value \\(null\\) of method Chill\\\\PersonBundle\\\\Form\\\\ChoiceLoader\\\\PersonChoiceLoader\\:\\:loadChoiceList\\(\\) should be contravariant with parameter \\$value \\(\\(callable\\(\\)\\: mixed\\)\\|null\\) of method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Loader\\\\ChoiceLoaderInterface\\:\\:loadChoiceList\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
-
message: "#^Parameter \\#2 \\$value \\(null\\) of method Chill\\\\PersonBundle\\\\Form\\\\ChoiceLoader\\\\PersonChoiceLoader\\:\\:loadChoicesForValues\\(\\) should be contravariant with parameter \\$value \\(\\(callable\\(\\)\\: mixed\\)\\|null\\) of method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Loader\\\\ChoiceLoaderInterface\\:\\:loadChoicesForValues\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
-
message: "#^Parameter \\#2 \\$value \\(null\\) of method Chill\\\\PersonBundle\\\\Form\\\\ChoiceLoader\\\\PersonChoiceLoader\\:\\:loadValuesForChoices\\(\\) should be contravariant with parameter \\$value \\(\\(callable\\(\\)\\: mixed\\)\\|null\\) of method Symfony\\\\Component\\\\Form\\\\ChoiceList\\\\Loader\\\\ChoiceLoaderInterface\\:\\:loadValuesForChoices\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
-
message: "#^Parameter \\#2 \\$viewData \\(Doctrine\\\\Common\\\\Collections\\\\Collection\\) of method Chill\\\\PersonBundle\\\\Form\\\\DataMapper\\\\PersonAltNameDataMapper\\:\\:mapFormsToData\\(\\) should be contravariant with parameter \\$viewData \\(mixed\\) of method Symfony\\\\Component\\\\Form\\\\DataMapperInterface\\:\\:mapFormsToData\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Form/DataMapper/PersonAltNameDataMapper.php
-
message: "#^Parameter \\#3 \\$limit \\(int\\) of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluationRepository\\:\\:findBy\\(\\) should be contravariant with parameter \\$limit \\(int\\|null\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php
-
message: "#^Parameter \\#4 \\$offset \\(int\\) of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluationRepository\\:\\:findBy\\(\\) should be contravariant with parameter \\$offset \\(int\\|null\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php
-
message: "#^Parameter \\#3 \\$limit \\(int\\) of method Chill\\\\PersonBundle\\\\Repository\\\\Household\\\\HouseholdCompositionRepository\\:\\:findBy\\(\\) should be contravariant with parameter \\$limit \\(int\\|null\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepository.php
-
message: "#^Parameter \\#4 \\$offset \\(int\\) of method Chill\\\\PersonBundle\\\\Repository\\\\Household\\\\HouseholdCompositionRepository\\:\\:findBy\\(\\) should be contravariant with parameter \\$offset \\(int\\|null\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepository.php
-
message: "#^Parameter \\#3 \\$limit \\(int\\) of method Chill\\\\PersonBundle\\\\Repository\\\\Household\\\\HouseholdCompositionRepositoryInterface\\:\\:findBy\\(\\) should be contravariant with parameter \\$limit \\(int\\|null\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepositoryInterface.php
-
message: "#^Parameter \\#4 \\$offset \\(int\\) of method Chill\\\\PersonBundle\\\\Repository\\\\Household\\\\HouseholdCompositionRepositoryInterface\\:\\:findBy\\(\\) should be contravariant with parameter \\$offset \\(int\\|null\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepositoryInterface.php
-
message: "#^Return type \\(class\\-string\\) of method Chill\\\\PersonBundle\\\\Repository\\\\SocialWork\\\\EvaluationRepository\\:\\:getClassName\\(\\) should be covariant with return type \\(class\\-string\\<object\\>\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:getClassName\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php
-
message: "#^Return type \\(class\\-string\\) of method Chill\\\\PersonBundle\\\\Repository\\\\SocialWork\\\\EvaluationRepositoryInterface\\:\\:getClassName\\(\\) should be covariant with return type \\(class\\-string\\<object\\>\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:getClassName\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepositoryInterface.php
-
message: "#^Return type \\(class\\-string\\) of method Chill\\\\PersonBundle\\\\Repository\\\\SocialWork\\\\GoalRepository\\:\\:getClassName\\(\\) should be covariant with return type \\(class\\-string\\<object\\>\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:getClassName\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php
-
message: "#^Return type \\(class\\-string\\) of method Chill\\\\PersonBundle\\\\Repository\\\\SocialWork\\\\ResultRepository\\:\\:getClassName\\(\\) should be covariant with return type \\(class\\-string\\<object\\>\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:getClassName\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php
-
message: "#^Return type \\(class\\-string\\) of method Chill\\\\PersonBundle\\\\Repository\\\\SocialWork\\\\SocialActionRepository\\:\\:getClassName\\(\\) should be covariant with return type \\(class\\-string\\<object\\>\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:getClassName\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php
-
message: "#^Return type \\(class\\-string\\) of method Chill\\\\PersonBundle\\\\Repository\\\\SocialWork\\\\SocialIssueRepository\\:\\:getClassName\\(\\) should be covariant with return type \\(class\\-string\\<object\\>\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:getClassName\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluationDocument\\) of method Chill\\\\PersonBundle\\\\Security\\\\Authorization\\\\AccompanyingPeriodWorkEvaluationDocumentVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationDocumentVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluation\\) of method Chill\\\\PersonBundle\\\\Security\\\\Authorization\\\\AccompanyingPeriodWorkEvaluationVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodWork\\) of method Chill\\\\PersonBundle\\\\Security\\\\Authorization\\\\AccompanyingPeriodWorkVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkVoter.php
-
message: "#^Parameter \\#1 \\$period \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\|null\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodDocGenNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodDocGenNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareNormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodDocGenNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php
-
message: "#^Parameter \\#1 \\$origin \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\Origin\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodOriginNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodOriginNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php
-
message: "#^Parameter \\#1 \\$participation \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriodParticipation\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodParticipationNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodParticipationNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodResourceNormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodResourceNormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodWorkDenormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodWorkDenormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareDenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodWorkDenormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodWorkEvaluationDenormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDenormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodWorkEvaluationDenormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareDenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDenormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodWorkEvaluationDenormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDenormalizer.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluation\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodWorkEvaluationNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodWork\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\AccompanyingPeriodWorkNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\MembersEditorNormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\MembersEditorNormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\PersonDocGenNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\PersonDocGenNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareNormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\PersonDocGenNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php
-
message: "#^Parameter \\#1 \\$person \\(Chill\\\\PersonBundle\\\\Entity\\\\Person\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\PersonJsonNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\PersonJsonNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\PersonJsonNormalizer\\:\\:denormalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:denormalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
-
message: "#^Parameter \\#3 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\PersonJsonNormalizer\\:\\:supportsDenormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\DenormalizerInterface\\:\\:supportsDenormalization\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
-
message: "#^Parameter \\#1 \\$relation \\(Chill\\\\PersonBundle\\\\Entity\\\\Relationships\\\\Relationship\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\RelationshipDocGenNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\RelationshipDocGenNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareNormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\RelationshipDocGenNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\SocialActionNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\SocialActionNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\SocialIssueNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\SocialIssueNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\ContextAwareNormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php
-
message: "#^Parameter \\#2 \\$format \\(string\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\SocialIssueNormalizer\\:\\:supportsNormalization\\(\\) should be contravariant with parameter \\$format \\(string\\|null\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:supportsNormalization\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\) of method Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\WorkflowNormalizer\\:\\:normalize\\(\\) should be contravariant with parameter \\$object \\(mixed\\) of method Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface\\:\\:normalize\\(\\)$#"
count: 2
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluationDocument\\) of method Chill\\\\PersonBundle\\\\Workflow\\\\AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler\\:\\:getRelatedObjects\\(\\) should be contravariant with parameter \\$object \\(object\\) of method Chill\\\\MainBundle\\\\Workflow\\\\EntityWorkflowHandlerInterface\\:\\:getRelatedObjects\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluation\\) of method Chill\\\\PersonBundle\\\\Workflow\\\\AccompanyingPeriodWorkEvaluationWorkflowHandler\\:\\:getRelatedObjects\\(\\) should be contravariant with parameter \\$object \\(object\\) of method Chill\\\\MainBundle\\\\Workflow\\\\EntityWorkflowHandlerInterface\\:\\:getRelatedObjects\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandler.php
-
message: "#^Parameter \\#1 \\$object \\(Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodWork\\) of method Chill\\\\PersonBundle\\\\Workflow\\\\AccompanyingPeriodWorkWorkflowHandler\\:\\:getRelatedObjects\\(\\) should be contravariant with parameter \\$object \\(object\\) of method Chill\\\\MainBundle\\\\Workflow\\\\EntityWorkflowHandlerInterface\\:\\:getRelatedObjects\\(\\)$#"
count: 1
path: src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkWorkflowHandler.php
-
message: "#^Return type \\(Chill\\\\MainBundle\\\\Entity\\\\Center\\|null\\) of method Chill\\\\TaskBundle\\\\Entity\\\\AbstractTask\\:\\:getCenter\\(\\) should be covariant with return type \\(Chill\\\\MainBundle\\\\Entity\\\\Center\\) of method Chill\\\\MainBundle\\\\Entity\\\\HasCenterInterface\\:\\:getCenter\\(\\)$#"
count: 1
path: src/Bundle/ChillTaskBundle/Entity/AbstractTask.php
-
message: "#^Return type \\(Chill\\\\MainBundle\\\\Entity\\\\Scope\\|null\\) of method Chill\\\\TaskBundle\\\\Entity\\\\AbstractTask\\:\\:getScope\\(\\) should be covariant with return type \\(Chill\\\\MainBundle\\\\Entity\\\\Scope\\) of method Chill\\\\MainBundle\\\\Entity\\\\HasScopeInterface\\:\\:getScope\\(\\)$#"
count: 1
path: src/Bundle/ChillTaskBundle/Entity/AbstractTask.php
-
message: "#^Parameter \\#3 \\$entity \\(Chill\\\\ThirdPartyBundle\\\\Entity\\\\ThirdParty\\) of method Chill\\\\ThirdPartyBundle\\\\Controller\\\\ThirdPartyController\\:\\:onPostFetchEntity\\(\\) should be contravariant with parameter \\$entity \\(mixed\\) of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:onPostFetchEntity\\(\\)$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php
-
message: "#^Parameter \\#1 \\$createdAt \\(DateTimeImmutable\\) of method Chill\\\\ThirdPartyBundle\\\\Entity\\\\ThirdParty\\:\\:setCreatedAt\\(\\) should be contravariant with parameter \\$datetime \\(DateTimeInterface\\) of method Chill\\\\MainBundle\\\\Doctrine\\\\Model\\\\TrackCreationInterface\\:\\:setCreatedAt\\(\\)$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php
-
message: "#^Parameter \\#1 \\$updatedAt \\(DateTimeImmutable\\) of method Chill\\\\ThirdPartyBundle\\\\Entity\\\\ThirdParty\\:\\:setUpdatedAt\\(\\) should be contravariant with parameter \\$datetime \\(DateTimeInterface\\) of method Chill\\\\MainBundle\\\\Doctrine\\\\Model\\\\TrackUpdateInterface\\:\\:setUpdatedAt\\(\\)$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php
-
message: "#^Parameter \\#3 \\$limit \\(null\\) of method Chill\\\\ThirdPartyBundle\\\\Repository\\\\ThirdPartyRepository\\:\\:findBy\\(\\) should be contravariant with parameter \\$limit \\(int\\|null\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php
-
message: "#^Parameter \\#4 \\$offset \\(null\\) of method Chill\\\\ThirdPartyBundle\\\\Repository\\\\ThirdPartyRepository\\:\\:findBy\\(\\) should be contravariant with parameter \\$offset \\(int\\|null\\) of method Doctrine\\\\Persistence\\\\ObjectRepository\\<object\\>\\:\\:findBy\\(\\)$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php
-
message: "#^Parameter \\#2 \\$subject \\(Chill\\\\ThirdPartyBundle\\\\Entity\\\\ThirdParty\\|null\\) of method Chill\\\\ThirdPartyBundle\\\\Security\\\\Voter\\\\ThirdPartyVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php
-
message: "#^Parameter \\#1 \\$document \\(Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject\\) of method Chill\\\\WopiBundle\\\\Service\\\\Wopi\\\\ChillDocumentManager\\:\\:getBasename\\(\\) should be contravariant with parameter \\$document \\(ChampsLibres\\\\WopiLib\\\\Contract\\\\Entity\\\\Document\\) of method ChampsLibres\\\\WopiLib\\\\Contract\\\\Service\\\\DocumentManagerInterface\\:\\:getBasename\\(\\)$#"
count: 1
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
-
message: "#^Parameter \\#1 \\$document \\(Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject\\) of method Chill\\\\WopiBundle\\\\Service\\\\Wopi\\\\ChillDocumentManager\\:\\:getCreationDate\\(\\) should be contravariant with parameter \\$document \\(ChampsLibres\\\\WopiLib\\\\Contract\\\\Entity\\\\Document\\) of method ChampsLibres\\\\WopiLib\\\\Contract\\\\Service\\\\DocumentManagerInterface\\:\\:getCreationDate\\(\\)$#"
count: 1
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
-
message: "#^Parameter \\#1 \\$document \\(Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject\\) of method Chill\\\\WopiBundle\\\\Service\\\\Wopi\\\\ChillDocumentManager\\:\\:getDocumentId\\(\\) should be contravariant with parameter \\$document \\(ChampsLibres\\\\WopiLib\\\\Contract\\\\Entity\\\\Document\\) of method ChampsLibres\\\\WopiLib\\\\Contract\\\\Service\\\\DocumentManagerInterface\\:\\:getDocumentId\\(\\)$#"
count: 1
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
-
message: "#^Parameter \\#1 \\$document \\(Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject\\) of method Chill\\\\WopiBundle\\\\Service\\\\Wopi\\\\ChillDocumentManager\\:\\:getLastModifiedDate\\(\\) should be contravariant with parameter \\$document \\(ChampsLibres\\\\WopiLib\\\\Contract\\\\Entity\\\\Document\\) of method ChampsLibres\\\\WopiLib\\\\Contract\\\\Service\\\\DocumentManagerInterface\\:\\:getLastModifiedDate\\(\\)$#"
count: 1
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,686 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
-
message: "#^Parameter \\#1 \\$context of method Chill\\\\ActivityBundle\\\\Timeline\\\\TimelineActivityProvider\\:\\:checkContext\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php
-
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(Chill\\\\BudgetBundle\\\\Repository\\\\ChargeType\\)\\: mixed\\)\\|null, Closure\\(Chill\\\\BudgetBundle\\\\Entity\\\\ChargeKind\\)\\: int\\|null given\\.$#"
count: 1
path: src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php
-
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(Chill\\\\BudgetBundle\\\\Repository\\\\ResourceType\\)\\: mixed\\)\\|null, Closure\\(Chill\\\\BudgetBundle\\\\Entity\\\\ResourceKind\\)\\: int\\|null given\\.$#"
count: 1
path: src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php
-
message: "#^Parameter \\#2 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\InviteUpdateMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Controller/InviteApiController.php
-
message: "#^Parameter \\#2 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\CalendarRemovedMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarEntityListener.php
-
message: "#^Parameter \\#3 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\CalendarMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 2
path: src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarEntityListener.php
-
message: "#^Parameter \\#2 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\CalendarRangeRemovedMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarRangeEntityListener.php
-
message: "#^Parameter \\#3 \\$byUser of class Chill\\\\CalendarBundle\\\\Messenger\\\\Message\\\\CalendarRangeMessage constructor expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 2
path: src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarRangeEntityListener.php
-
message: "#^Parameter \\#1 \\$token of method Chill\\\\CalendarBundle\\\\RemoteCalendar\\\\Connector\\\\MSGraph\\\\OnBehalfOfUserTokenStorage\\:\\:setToken\\(\\) expects TheNetworg\\\\OAuth2\\\\Client\\\\Token\\\\AccessToken, League\\\\OAuth2\\\\Client\\\\Token\\\\AccessTokenInterface given\\.$#"
count: 1
path: src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserTokenStorage.php
-
message: "#^Parameter \\#2 \\$code of class Exception constructor expects int, array\\<string, int\\|string\\|null\\> given\\.$#"
count: 1
path: src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php
-
message: "#^Parameter \\#4 \\$offset of method Chill\\\\CalendarBundle\\\\Repository\\\\CalendarRepository\\:\\:findBy\\(\\) expects int\\|null, array\\|null given\\.$#"
count: 1
path: src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php
-
message: "#^Parameter \\#1 \\$prefix of function uniqid expects string, int\\<0, max\\> given\\.$#"
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php
-
message: "#^Parameter \\#2 \\$callback of function array_filter expects callable\\(Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadataInterface\\)\\: mixed, Closure\\(Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadata\\)\\: bool given\\.$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
-
message: "#^Parameter \\#3 \\$metadata of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:normalizeNullData\\(\\) expects Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassMetadata, Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassMetadataInterface given\\.$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
-
message: "#^Parameter \\#4 \\$attributes of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:normalizeNullData\\(\\) expects array\\<Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadata\\>, array\\<Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadataInterface\\> given\\.$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
-
message: "#^Parameter \\#5 \\$metadata of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:normalizeObject\\(\\) expects Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassMetadata, Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\ClassMetadataInterface given\\.$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
-
message: "#^Parameter \\#6 \\$attributes of method Chill\\\\DocGeneratorBundle\\\\Serializer\\\\Normalizer\\\\DocGenObjectNormalizer\\:\\:normalizeObject\\(\\) expects array\\<Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadata\\>, array\\<Symfony\\\\Component\\\\Serializer\\\\Mapping\\\\AttributeMetadataInterface\\> given\\.$#"
count: 1
path: src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 4
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Parameter \\#1 \\$name of method Symfony\\\\Component\\\\Form\\\\FormFactoryInterface\\:\\:createNamedBuilder\\(\\) expects string, null given\\.$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, Chill\\\\MainBundle\\\\Entity\\\\Center given\\.$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Parameter \\#1 \\$participations of method Chill\\\\EventBundle\\\\Controller\\\\ParticipationController\\:\\:createEditFormMultiple\\(\\) expects ArrayIterator, Traversable given\\.$#"
count: 2
path: src/Bundle/ChillEventBundle/Controller/ParticipationController.php
-
message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, null given\\.$#"
count: 2
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
-
message: "#^Parameter \\#2 \\$previous of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects Throwable\\|null, int given\\.$#"
count: 3
path: src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php
-
message: "#^Parameter \\#3 \\$code of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects int, Symfony\\\\Component\\\\Serializer\\\\Exception\\\\NotEncodableValueException given\\.$#"
count: 2
path: src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php
-
message: "#^Parameter \\#3 \\$code of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects int, Symfony\\\\Component\\\\Serializer\\\\Exception\\\\UnexpectedValueException given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php
-
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
-
message: "#^Parameter \\#3 \\$formClass of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:createFormFor\\(\\) expects string\\|null, Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\type\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
-
message: "#^Parameter \\#3 \\$scope of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\Scope\\|null, Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\Scope\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
-
message: "#^Parameter \\#1 \\$name of method Chill\\\\MainBundle\\\\Entity\\\\Country\\:\\:setName\\(\\) expects string, array\\<int\\|string, string\\> given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php
-
message: "#^Parameter \\#4 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, Chill\\\\MainBundle\\\\Entity\\\\the given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
-
message: "#^Parameter \\#1 \\$alias of method Chill\\\\MainBundle\\\\Export\\\\ExportManager\\:\\:getExport\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message: "#^Parameter \\#1 \\$name of method Symfony\\\\Component\\\\Form\\\\FormFactoryInterface\\:\\:createNamedBuilder\\(\\) expects string, null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message: "#^Parameter \\#3 \\$alias of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:exportFormStep\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message: "#^Parameter \\#3 \\$alias of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:formatterFormStep\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message: "#^Parameter \\#3 \\$alias of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:forwardToGenerate\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message: "#^Parameter \\#3 \\$alias of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:selectCentersStep\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countUnreadByUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/NotificationApiController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:findUnreadByUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/NotificationApiController.php
-
message: "#^Parameter \\#1 \\$addressee of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countAllForAttendee\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
-
message: "#^Parameter \\#1 \\$addressee of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:findAllForAttendee\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
-
message: "#^Parameter \\#1 \\$sender of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countAllForSender\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
-
message: "#^Parameter \\#1 \\$sender of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:findAllForSender\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countUnreadByUserWhereAddressee\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Repository\\\\NotificationRepository\\:\\:countUnreadByUserWhereSender\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/NotificationController.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 4
path: src/Bundle/ChillMainBundle/Controller/PasswordController.php
-
message: "#^Parameter \\#1 \\$token of class Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\PasswordRecoverEvent constructor expects Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\type\\|null, string given\\.$#"
count: 2
path: src/Bundle/ChillMainBundle/Controller/PasswordController.php
-
message: "#^Parameter \\#3 \\$ip of class Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\PasswordRecoverEvent constructor expects Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\type\\|null, string\\|null given\\.$#"
count: 4
path: src/Bundle/ChillMainBundle/Controller/PasswordController.php
-
message: "#^Parameter \\#1 \\$context of method Chill\\\\MainBundle\\\\Timeline\\\\TimelineBuilder\\:\\:countItems\\(\\) expects Chill\\\\MainBundle\\\\Timeline\\\\unknown, string given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:addSubscriberToFinal\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:addSubscriberToStep\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:isUserSubscribedToFinal\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:isUserSubscribedToStep\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:removeSubscriberToFinal\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflow\\:\\:removeSubscriberToStep\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php
-
message: "#^Parameter \\#1 \\$place of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Configuration\\:\\:filterWidgetByPlace\\(\\) expects string, Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php
-
message: "#^Parameter \\#1 \\$place of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Configuration\\:\\:getWidgetAliasesbyPlace\\(\\) expects Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\type, string given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php
-
message: "#^Parameter \\#2 \\$array of function implode expects array\\|null, Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/DependencyInjection/Configuration.php
-
message: "#^Parameter \\#2 \\$place of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\WidgetFactoryInterface\\:\\:createDefinition\\(\\) expects Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\type, string given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php
-
message: "#^Parameter \\#3 \\$order of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\WidgetFactoryInterface\\:\\:createDefinition\\(\\) expects Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\type, float given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php
-
message: "#^Parameter \\#2 \\$place of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\WidgetFactoryInterface\\:\\:getServiceId\\(\\) expects string, Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/AbstractWidgetFactory.php
-
message: "#^Parameter \\#3 \\$order of method Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\WidgetFactoryInterface\\:\\:getServiceId\\(\\) expects float, Chill\\\\MainBundle\\\\DependencyInjection\\\\Widget\\\\Factory\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/DependencyInjection/Widget/Factory/AbstractWidgetFactory.php
-
message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, array\\<Chill\\\\MainBundle\\\\Export\\\\AggregatorInterface\\> given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Export/ExportManager.php
-
message: "#^Parameter \\#2 \\$nbAggregators of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\CSVFormatter\\:\\:appendAggregatorForm\\(\\) expects string, int\\<0, max\\> given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php
-
message: "#^Parameter \\#2 \\$array of function array_map expects array, Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php
-
message: "#^Parameter \\#2 \\$nbAggregators of method Chill\\\\MainBundle\\\\Export\\\\Formatter\\\\SpreadSheetFormatter\\:\\:appendAggregatorForm\\(\\) expects string, int\\<0, max\\> given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php
-
message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, null given\\.$#"
count: 2
path: src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Embeddable\\\\PrivateCommentEmbeddable\\:\\:getCommentForUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php
-
message: "#^Parameter \\#1 \\$em of class Chill\\\\MainBundle\\\\Form\\\\Type\\\\DataTransformer\\\\ObjectToIdTransformer constructor expects Doctrine\\\\ORM\\\\EntityManagerInterface, Doctrine\\\\Persistence\\\\ObjectManager given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php
-
message: "#^Parameter \\#1 \\$em of class Chill\\\\MainBundle\\\\Form\\\\Type\\\\DataTransformer\\\\MultipleObjectsToIdTransformer constructor expects Doctrine\\\\ORM\\\\EntityManagerInterface, Doctrine\\\\Persistence\\\\ObjectManager given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php
-
message: "#^Parameter \\#1 \\$translatableStrings of method Chill\\\\MainBundle\\\\Templating\\\\TranslatableStringHelper\\:\\:localize\\(\\) expects array, string given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php
-
message: "#^Parameter \\#1 \\$datetime of class DateTime constructor expects string, Chill\\\\MainBundle\\\\Search\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Search/AbstractSearch.php
-
message: "#^Parameter \\#4 \\$paginator of method Chill\\\\MainBundle\\\\Search\\\\SearchApi\\:\\:fetchRawResult\\(\\) expects Chill\\\\MainBundle\\\\Pagination\\\\Paginator, Chill\\\\MainBundle\\\\Pagination\\\\PaginatorInterface given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Search/SearchApi.php
-
message: "#^Parameter \\#2 \\$callback of function uasort expects callable\\(Chill\\\\MainBundle\\\\Search\\\\HasAdvancedSearchForm, Chill\\\\MainBundle\\\\Search\\\\HasAdvancedSearchForm\\)\\: int, Closure\\(Chill\\\\MainBundle\\\\Search\\\\SearchInterface, Chill\\\\MainBundle\\\\Search\\\\SearchInterface\\)\\: \\-1\\|0\\|1 given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Search/SearchProvider.php
-
message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, Chill\\\\MainBundle\\\\Search\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Search/SearchProvider.php
-
message: "#^Parameter \\#1 \\$object of function get_class expects object, array\\<Chill\\\\MainBundle\\\\Entity\\\\Center\\> given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Notification\\:\\:isReadBy\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Entity\\\\Embeddable\\\\PrivateCommentEmbeddable\\:\\:setCommentForUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php
-
message: "#^Parameter \\#1 \\$context of method Chill\\\\MainBundle\\\\Timeline\\\\TimelineBuilder\\:\\:buildUnionQuery\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\unknown given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php
-
message: "#^Parameter \\#2 \\$context of method Chill\\\\MainBundle\\\\Timeline\\\\TimelineProviderInterface\\:\\:getEntityTemplate\\(\\) expects Chill\\\\MainBundle\\\\Timeline\\\\type, string given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php
-
message: "#^Parameter \\#1 \\$phoneNumber of method Chill\\\\MainBundle\\\\Phonenumber\\\\PhoneNumberHelperInterface\\:\\:format\\(\\) expects libphonenumber\\\\PhoneNumber\\|null, string given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php
-
message: "#^Parameter \\#1 \\$transitionBy of method Chill\\\\MainBundle\\\\Entity\\\\Workflow\\\\EntityWorkflowStep\\:\\:setTransitionBy\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 2
path: src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php
-
message: "#^Parameter \\#2 \\$callback of function usort expects callable\\(mixed, mixed\\)\\: int, Closure\\(mixed, mixed\\)\\: bool given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluationRepository\\:\\:countNearMaxDateByUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriod\\\\AccompanyingPeriodWorkEvaluationRepository\\:\\:findNearMaxDateByUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php
-
message: "#^Parameter \\#1 \\$object of static method DateTimeImmutable\\:\\:createFromMutable\\(\\) expects DateTime, DateTimeInterface given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php
-
message: "#^Parameter \\#2 \\$callback of function usort expects callable\\(mixed, mixed\\)\\: int, Closure\\(mixed, mixed\\)\\: bool given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/HouseholdController.php
-
message: "#^Parameter \\#2 \\$previous of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects Throwable\\|null, int given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php
-
message: "#^Parameter \\#3 \\$code of class Symfony\\\\Component\\\\HttpKernel\\\\Exception\\\\BadRequestHttpException constructor expects int, Symfony\\\\Component\\\\Serializer\\\\Exception\\\\InvalidArgumentException\\|Symfony\\\\Component\\\\Serializer\\\\Exception\\\\UnexpectedValueException given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 2
path: src/Bundle/ChillPersonBundle/Controller/PersonController.php
-
message: "#^Parameter \\#1 \\$form of method Chill\\\\PersonBundle\\\\Controller\\\\PersonController\\:\\:isLastPostDataChanges\\(\\) expects Symfony\\\\Component\\\\Form\\\\Form, Symfony\\\\Component\\\\Form\\\\FormInterface given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/PersonController.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
-
message: "#^Parameter \\#2 \\$precision of method Chill\\\\PersonBundle\\\\Search\\\\SimilarPersonMatcher\\:\\:matchPerson\\(\\) expects float, Chill\\\\PersonBundle\\\\Repository\\\\PersonNotDuplicateRepository given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
-
message: "#^Parameter \\#3 \\$orderBy of method Chill\\\\PersonBundle\\\\Search\\\\SimilarPersonMatcher\\:\\:matchPerson\\(\\) expects string, float given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
-
message: "#^Parameter \\#4 \\$addYearComparison of method Chill\\\\PersonBundle\\\\Search\\\\SimilarPersonMatcher\\:\\:matchPerson\\(\\) expects bool, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
-
message: "#^Parameter \\#1 \\$context of method Chill\\\\MainBundle\\\\Timeline\\\\TimelineBuilder\\:\\:countItems\\(\\) expects Chill\\\\MainBundle\\\\Timeline\\\\unknown, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php
-
message: "#^Parameter \\#1 \\$period of method Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\\\AccompanyingPeriodLocationHistory\\:\\:setPeriod\\(\\) expects Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod, null given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
-
message: "#^Parameter \\#1 \\$now of method Chill\\\\PersonBundle\\\\Entity\\\\Household\\\\Household\\:\\:getCurrentMembers\\(\\) expects DateTimeImmutable\\|null, DateTimeInterface\\|null given\\.$#"
count: 2
path: src/Bundle/ChillPersonBundle/Entity/Household/Household.php
-
message: "#^Parameter \\#1 \\$now of method Chill\\\\PersonBundle\\\\Entity\\\\Household\\\\Household\\:\\:getNonCurrentMembers\\(\\) expects DateTimeImmutable\\|null, DateTimeInterface\\|null given\\.$#"
count: 2
path: src/Bundle/ChillPersonBundle/Entity/Household/Household.php
-
message: "#^Parameter \\#1 \\$key of method Doctrine\\\\Common\\\\Collections\\\\Collection\\<\\(int\\|string\\),mixed\\>\\:\\:remove\\(\\) expects \\(int\\|string\\), Chill\\\\PersonBundle\\\\Entity\\\\SocialWork\\\\SocialAction given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php
-
message: "#^Parameter \\#1 \\$translatableStrings of method Chill\\\\MainBundle\\\\Templating\\\\TranslatableStringHelper\\:\\:localize\\(\\) expects array, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php
-
message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, null given\\.$#"
count: 2
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
-
message: "#^Parameter \\#1 \\$entityName of method Doctrine\\\\ORM\\\\EntityManager\\:\\:getRepository\\(\\) expects class\\-string\\<ChillPersonBundle\\:AccompanyingPeriod\\>, string given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php
-
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:filterReachableCenters\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php
-
message: "#^Parameter \\#3 \\$context of method Chill\\\\PersonBundle\\\\Timeline\\\\AbstractTimelineAccompanyingPeriod\\:\\:getBasicEntityTemplate\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodClosing.php
-
message: "#^Parameter \\#3 \\$context of method Chill\\\\PersonBundle\\\\Timeline\\\\AbstractTimelineAccompanyingPeriod\\:\\:getBasicEntityTemplate\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Timeline/TimelineAccompanyingPeriodOpening.php
-
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelperInterface\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php
-
message: "#^Parameter \\#1 \\$className of method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getRepository\\(\\) expects class\\-string\\<ChillReportBundle\\:Report\\>, string given\\.$#"
count: 4
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
-
message: "#^Parameter \\#1 \\$entity of method Chill\\\\ReportBundle\\\\Controller\\\\ReportController\\:\\:createEditForm\\(\\) expects Chill\\\\ReportBundle\\\\Entity\\\\Report, ChillReportBundle\\:Report given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 4
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
-
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableScopes\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
-
message: "#^Parameter \\#1 \\$em of class Chill\\\\MainBundle\\\\Form\\\\Type\\\\DataTransformer\\\\ScopeTransformer constructor expects Doctrine\\\\ORM\\\\EntityManagerInterface, Doctrine\\\\Persistence\\\\ObjectManager given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Form/ReportType.php
-
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableScopes\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Form/ReportType.php
-
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Search/ReportSearch.php
-
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableScopes\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Search/ReportSearch.php
-
message: "#^Parameter \\#1 \\$context of method Chill\\\\ReportBundle\\\\Timeline\\\\TimelineReportProvider\\:\\:checkContext\\(\\) expects string, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php
-
message: "#^Parameter \\#1 \\$entity of method Chill\\\\ReportBundle\\\\Timeline\\\\TimelineReportProvider\\:\\:getFieldsToRender\\(\\) expects Chill\\\\ReportBundle\\\\Entity\\\\Report, Chill\\\\MainBundle\\\\Timeline\\\\type given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php
-
message: "#^Parameter \\#1 \\$entityName of method Doctrine\\\\ORM\\\\EntityManager\\:\\:getRepository\\(\\) expects class\\-string\\<ChillReportBundle\\:Report\\>, string given\\.$#"
count: 1
path: src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 6
path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillTaskBundle/Controller/TaskController.php
-
message: "#^Parameter \\#1 \\$keys of function array_fill_keys expects array, Chill\\\\TaskBundle\\\\Entity\\\\json given\\.$#"
count: 1
path: src/Bundle/ChillTaskBundle/Entity/AbstractTask.php
-
message: "#^Parameter \\#1 \\$task of method Chill\\\\TaskBundle\\\\Entity\\\\Task\\\\SingleTaskPlaceEvent\\:\\:setTask\\(\\) expects Chill\\\\TaskBundle\\\\Entity\\\\SingleTask, Chill\\\\TaskBundle\\\\Entity\\\\AbstractTask given\\.$#"
count: 1
path: src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php
-
message: "#^Parameter \\#1 \\$repository of class Chill\\\\PersonBundle\\\\Form\\\\DataTransformer\\\\PersonToIdTransformer constructor expects Chill\\\\PersonBundle\\\\Repository\\\\PersonRepository, Doctrine\\\\ORM\\\\EntityManagerInterface given\\.$#"
count: 1
path: src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php
-
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
count: 4
path: src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php
-
message: "#^Parameter \\#1 \\$extras of method Knp\\\\Menu\\\\MenuItem\\:\\:setExtras\\(\\) expects array\\<string, mixed\\>, string given\\.$#"
count: 1
path: src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php
-
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
count: 1
path: src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php
-
message: "#^Parameter \\#1 \\$event of method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) expects object, string given\\.$#"
count: 1
path: src/Bundle/ChillTaskBundle/Security/Authorization/TaskVoter.php
-
message: "#^Parameter \\#2 \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCenters\\(\\) expects string, Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role given\\.$#"
count: 1
path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
-
message: "#^Parameter \\#1 \\$storedObject of method Chill\\\\WopiBundle\\\\Service\\\\Wopi\\\\ChillDocumentManager\\:\\:getContent\\(\\) expects Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject, ChampsLibres\\\\WopiLib\\\\Contract\\\\Entity\\\\Document given\\.$#"
count: 3
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
-
message: "#^Parameter \\#1 \\$storedObject of method Chill\\\\WopiBundle\\\\Service\\\\Wopi\\\\ChillDocumentManager\\:\\:setContent\\(\\) expects Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject, ChampsLibres\\\\WopiLib\\\\Contract\\\\Entity\\\\Document given\\.$#"
count: 1
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
-
message: "#^Parameter \\#1 \\$type of method Chill\\\\DocStoreBundle\\\\Entity\\\\StoredObject\\:\\:setType\\(\\) expects string\\|null, false given\\.$#"
count: 1
path: src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php

View File

@ -1,10 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Variable property access on \\$this\\(Chill\\\\ActivityBundle\\\\Entity\\\\ActivityType\\)\\.$#"
count: 3
path: src/Bundle/ChillActivityBundle/Entity/ActivityType.php
-
message: "#^Foreach overwrites \\$key with its key variable\\.$#"
count: 1
@ -20,11 +15,6 @@ parameters:
count: 1
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
-
message: "#^Variable method call on object\\.$#"
count: 2
path: src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php
-
message: "#^Cannot unset offset '_token' on array\\{formatter\\: mixed, export\\: mixed, centers\\: mixed, alias\\: string\\}\\.$#"
count: 1
@ -50,46 +40,11 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
-
message: "#^Variable \\$message on left side of \\?\\? always exists and is not nullable\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php
-
message: "#^Variable \\$sqls on left side of \\?\\? always exists and is not nullable\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php
-
message: "#^Class Chill\\\\PersonBundle\\\\Entity\\\\Person constructor invoked with 1 parameter, 0 required\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Variable \\$street1Value might not be defined\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Variable method call on mixed\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php
-
message: "#^Foreach overwrites \\$value with its value variable\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
-
message: "#^Foreach overwrites \\$action with its value variable\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php
-
message: "#^Foreach overwrites \\$action with its value variable\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php
-
message: "#^Foreach overwrites \\$value with its value variable\\.$#"
count: 1

View File

@ -1,86 +1,6 @@
parameters:
ignoreErrors:
-
message: "#^Implicit array creation is not allowed \\- variable \\$centers might not exist\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
-
message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Entity\\\\Household\\\\PersonHouseholdAddress\\:\\:\\$relation\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php
-
message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Entity\\\\AccompanyingPeriod\\:\\:\\$work\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
-
message: "#^Undefined variable\\: \\$person$#"
count: 1
path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php
-
message: "#^Variable variables are not allowed\\.$#"
count: 4
path: src/Bundle/ChillPersonBundle/Search/PersonSearch.php
-
message: "#^Function Chill\\\\PersonBundle\\\\Serializer\\\\Normalizer\\\\·\\\\is_array not found\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php
-
message: "#^Undefined variable\\: \\$choiceSlug$#"
count: 1
path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php
-
message: "#^Undefined variable\\: \\$choiceSlug$#"
count: 1
path: src/Bundle/ChillReportBundle/Export/Export/ReportList.php
-
message: "#^Undefined variable\\: \\$type$#"
count: 1
path: src/Bundle/ChillTaskBundle/Controller/TaskController.php
-
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\AbstractCRUDController\\:\\:getRoleFor\\(\\)\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php
-
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\Controller\\\\UserController\\:\\:createEditForm\\(\\)\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/UserController.php
-
message: "#^Undefined variable\\: \\$current$#"
count: 1
path: src/Bundle/ChillMainBundle/Pagination/PageGenerator.php
-
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AbstractChillVoter\\:\\:getSupportedAttributes\\(\\)\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php
-
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AbstractChillVoter\\:\\:getSupportedClasses\\(\\)\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php
-
message: "#^Call to an undefined method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AbstractChillVoter\\:\\:isGranted\\(\\)\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php
-
message: "#^Access to an undefined property Chill\\\\PersonBundle\\\\Controller\\\\PersonController\\:\\:\\$security\\.$#"
count: 3
path: src/Bundle/ChillPersonBundle/Controller/PersonController.php
-
message: "#^Call to an undefined method Chill\\\\ThirdPartyBundle\\\\Form\\\\Type\\\\PickThirdPartyTypeCategoryType\\:\\:transform\\(\\)\\.$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php

File diff suppressed because it is too large Load Diff

View File

@ -10,31 +10,11 @@ parameters:
count: 1
path: src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php
-
message: "#^Method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\StatActivityDuration\\:\\:getDescription\\(\\) should return string but return statement is missing\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php
-
message: "#^Method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\StatActivityDuration\\:\\:getTitle\\(\\) should return string but return statement is missing\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Form/ActivityType.php
-
message: "#^Only booleans are allowed in &&, mixed given on the right side\\.$#"
count: 3
path: src/Bundle/ChillActivityBundle/Form/ActivityType.php
-
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
count: 2
path: src/Bundle/ChillActivityBundle/Form/ActivityType.php
-
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
count: 3
@ -120,11 +100,6 @@ parameters:
count: 1
path: src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php
-
message: "#^Method Chill\\\\EventBundle\\\\Entity\\\\Participation\\:\\:offsetGet\\(\\) should return mixed but return statement is missing\\.$#"
count: 1
path: src/Bundle/ChillEventBundle/Entity/Participation.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
@ -255,11 +230,6 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/Entity/User.php
-
message: "#^Only booleans are allowed in a ternary operator condition, mixed given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
@ -340,26 +310,6 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 6
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 2
path: src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
@ -380,21 +330,11 @@ parameters:
count: 1
path: src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 3
path: src/Bundle/ChillPersonBundle/Search/PersonSearch.php
-
message: "#^Method Chill\\\\PersonBundle\\\\Search\\\\PersonSearch\\:\\:renderResult\\(\\) should return string but return statement is missing\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Search/PersonSearch.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 2
path: src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php
-
message: "#^Method Chill\\\\ReportBundle\\\\DataFixtures\\\\ORM\\\\LoadReports\\:\\:getRandomChoice\\(\\) should return array\\<string\\>\\|string but return statement is missing\\.$#"
count: 1
@ -440,16 +380,6 @@ parameters:
count: 1
path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
path: src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php
-
message: "#^Method Chill\\\\ThirdPartyBundle\\\\Search\\\\ThirdPartySearch\\:\\:renderResult\\(\\) should return string but return statement is missing\\.$#"
count: 1

View File

@ -1,7 +1,9 @@
parameters:
level: 1
level: 5
paths:
- src/
tmpDir: .cache/
reportUnmatchedIgnoredErrors: false
excludePaths:
- .php_cs*
- docs/
@ -24,4 +26,8 @@ includes:
- phpstan-critical.neon
- phpstan-deprecations.neon
- phpstan-types.neon
- phpstan-baseline-level-2.neon
- phpstan-baseline-level-3.neon
- phpstan-baseline-level-4.neon
- phpstan-baseline-level-5.neon

View File

@ -9,9 +9,10 @@
cacheDirectory="./.psalm"
>
<projectFiles>
<directory name="src" />
<directory name="src"/>
<ignoreFiles>
<directory name="./tests/" />
<directory name="./tests/"/>
<directory name="./node_modules/"/>
</ignoreFiles>
</projectFiles>
@ -20,9 +21,27 @@
<issueHandlers>
<UndefinedDocblockClass>
<errorLevel type="suppress">
<referencedClass name="UnitEnum" />
<referencedClass name="UnitEnum"/>
</errorLevel>
</UndefinedDocblockClass>
</issueHandlers>
<!--
<fileExtensions>
<extension name=".php"/>
<extension name=".twig" checker="tests/app/vendor/psalm/plugin-symfony/src/Twig/TemplateFileAnalyzer.php" />
</fileExtensions>
-->
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
<!--
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin">
<containerXml>tests/app/var/cache/dev/srcApp_KernelDevDebugContainer.xml</containerXml>
<stubs>
<file name="vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php" />
</stubs>
</pluginClass>
-->
</plugins>
</psalm>

60
rector.php Normal file
View File

@ -0,0 +1,60 @@
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/docs',
__DIR__ . '/src',
]);
//$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
//$rectorConfig->cacheDirectory(__DIR__ . '/.cache/rector');
// register a single rule
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
$rectorConfig->disableParallel();
//define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_74
]);
// skip some path...
$rectorConfig->skip([
// make rector stuck for some files
\Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector::class,
// we need to discuss this: are we going to have FALSE in tests instead of an error ?
\Rector\Php71\Rector\FuncCall\CountOnNullRector::class,
// must merge MR500 and review a typing of "ArrayCollection" in entities
\Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector::class,
// remove all PHP80 rules, in order to activate them one by one
\Rector\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector::class,
\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class,
\Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector::class,
\Rector\Php80\Rector\FuncCall\ClassOnObjectRector::class,
\Rector\Php80\Rector\ClassConstFetch\ClassOnThisVariableObjectRector::class,
\Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector::class,
\Rector\Php80\Rector\Class_\DoctrineAnnotationClassToAttributeRector::class,
\Rector\Php80\Rector\ClassMethod\FinalPrivateToPrivateVisibilityRector::class,
\Rector\Php80\Rector\Ternary\GetDebugTypeRector::class,
\Rector\Php80\Rector\FunctionLike\MixedTypeRector::class,
\Rector\Php80\Rector\Property\NestedAnnotationToAttributeRector::class,
\Rector\Php80\Rector\FuncCall\Php8ResourceReturnToObjectRector::class,
\Rector\Php80\Rector\Catch_\RemoveUnusedVariableInCatchRector::class,
\Rector\Php80\Rector\ClassMethod\SetStateToStaticRector::class,
\Rector\Php80\Rector\NotIdentical\StrContainsRector::class,
\Rector\Php80\Rector\Identical\StrEndsWithRector::class,
\Rector\Php80\Rector\Identical\StrStartsWithRector::class,
\Rector\Php80\Rector\Class_\StringableForToStringRector::class,
\Rector\Php80\Rector\FuncCall\TokenGetAllToObjectRector::class,
\Rector\Php80\Rector\FunctionLike\UnionTypesRector::class
]);
};

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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;
use Symfony\Component\HttpKernel\Bundle\Bundle;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Controller;
use Chill\ActivityBundle\Entity\Activity;
@ -17,10 +17,12 @@ use Chill\ActivityBundle\Form\ActivityType;
use Chill\ActivityBundle\Repository\ActivityACLAwareRepositoryInterface;
use Chill\ActivityBundle\Repository\ActivityRepository;
use Chill\ActivityBundle\Repository\ActivityTypeCategoryRepository;
use Chill\ActivityBundle\Repository\ActivityTypeRepository;
use Chill\ActivityBundle\Repository\ActivityTypeRepositoryInterface;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Chill\MainBundle\Repository\LocationRepository;
use Chill\MainBundle\Repository\UserRepositoryInterface;
use Chill\MainBundle\Security\Resolver\CenterResolverManagerInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Privacy\PrivacyEvent;
@ -39,9 +41,8 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_key_exists;
final class ActivityController extends AbstractController
@ -54,7 +55,9 @@ final class ActivityController extends AbstractController
private ActivityTypeCategoryRepository $activityTypeCategoryRepository;
private ActivityTypeRepository $activityTypeRepository;
private ActivityTypeRepositoryInterface $activityTypeRepository;
private CenterResolverManagerInterface $centerResolver;
private EntityManagerInterface $entityManager;
@ -70,9 +73,13 @@ final class ActivityController extends AbstractController
private ThirdPartyRepository $thirdPartyRepository;
private TranslatorInterface $translator;
private UserRepositoryInterface $userRepository;
public function __construct(
ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
ActivityTypeRepository $activityTypeRepository,
ActivityTypeRepositoryInterface $activityTypeRepository,
ActivityTypeCategoryRepository $activityTypeCategoryRepository,
PersonRepository $personRepository,
ThirdPartyRepository $thirdPartyRepository,
@ -82,7 +89,10 @@ final class ActivityController extends AbstractController
EntityManagerInterface $entityManager,
EventDispatcherInterface $eventDispatcher,
LoggerInterface $logger,
SerializerInterface $serializer
SerializerInterface $serializer,
UserRepositoryInterface $userRepository,
CenterResolverManagerInterface $centerResolver,
TranslatorInterface $translator
) {
$this->activityACLAwareRepository = $activityACLAwareRepository;
$this->activityTypeRepository = $activityTypeRepository;
@ -96,6 +106,9 @@ final class ActivityController extends AbstractController
$this->eventDispatcher = $eventDispatcher;
$this->logger = $logger;
$this->serializer = $serializer;
$this->userRepository = $userRepository;
$this->centerResolver = $centerResolver;
$this->translator = $translator;
}
/**
@ -151,7 +164,7 @@ final class ActivityController extends AbstractController
$this->entityManager->remove($activity);
$this->entityManager->flush();
$this->addFlash('success', $this->get('translator')
$this->addFlash('success', $this->translator
->trans('The activity has been successfully removed.'));
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
@ -198,8 +211,8 @@ final class ActivityController extends AbstractController
// $this->denyAccessUnlessGranted('CHILL_ACTIVITY_UPDATE', $entity);
$form = $this->createForm(ActivityType::class, $entity, [
'center' => $entity->getCenter(),
'role' => new Role('CHILL_ACTIVITY_UPDATE'),
'center' => $this->centerResolver->resolveCenters($entity)[0] ?? null,
'role' => 'CHILL_ACTIVITY_UPDATE',
'activityType' => $entity->getActivityType(),
'accompanyingPeriod' => $accompanyingPeriod,
]);
@ -236,7 +249,7 @@ final class ActivityController extends AbstractController
);
}
$this->addFlash('success', $this->get('translator')->trans('Success : activity updated!'));
$this->addFlash('success', $this->translator->trans('Success : activity updated!'));
return $this->redirectToRoute('chill_activity_activity_show', $params);
}
@ -354,6 +367,7 @@ final class ActivityController extends AbstractController
if ($person instanceof Person) {
$entity->setPerson($person);
$entity->getPersons()->add($person);
}
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
@ -366,7 +380,7 @@ final class ActivityController extends AbstractController
if ($request->query->has('activityData')) {
$activityData = $request->query->get('activityData');
if (array_key_exists('durationTime', $activityData)) {
if (array_key_exists('durationTime', $activityData) && $activityType->getDurationTimeVisible() > 0) {
$durationTimeInMinutes = $activityData['durationTime'];
$hours = floor($durationTimeInMinutes / 60);
$minutes = $durationTimeInMinutes % 60;
@ -385,26 +399,36 @@ final class ActivityController extends AbstractController
}
}
if (array_key_exists('personsId', $activityData)) {
if (array_key_exists('personsId', $activityData) && $activityType->getPersonsVisible() > 0) {
foreach ($activityData['personsId'] as $personId) {
$concernedPerson = $this->personRepository->find($personId);
$entity->addPerson($concernedPerson);
}
}
if (array_key_exists('professionalsId', $activityData)) {
if (array_key_exists('professionalsId', $activityData) && $activityType->getThirdPartiesVisible() > 0) {
foreach ($activityData['professionalsId'] as $professionalsId) {
$professional = $this->thirdPartyRepository->find($professionalsId);
$entity->addThirdParty($professional);
}
}
if (array_key_exists('location', $activityData)) {
if (array_key_exists('usersId', $activityData) && $activityType->getUsersVisible() > 0) {
foreach ($activityData['usersId'] as $userId) {
$user = $this->userRepository->find($userId);
if (null !== $user) {
$entity->addUser($user);
}
}
}
if (array_key_exists('location', $activityData) && $activityType->getLocationVisible() > 0) {
$location = $this->locationRepository->find($activityData['location']);
$entity->setLocation($location);
}
if (array_key_exists('comment', $activityData)) {
if (array_key_exists('comment', $activityData) && $activityType->getCommentVisible() > 0) {
$comment = new CommentEmbeddable();
$comment->setComment($activityData['comment']);
$comment->setUserId($this->getUser()->getid());
@ -416,8 +440,8 @@ final class ActivityController extends AbstractController
$this->denyAccessUnlessGranted(ActivityVoter::CREATE, $entity);
$form = $this->createForm(ActivityType::class, $entity, [
'center' => $entity->getCenter(),
'role' => new Role('CHILL_ACTIVITY_CREATE'),
'center' => $this->centerResolver->resolveCenters($entity)[0] ?? null,
'role' => 'CHILL_ACTIVITY_CREATE',
'activityType' => $entity->getActivityType(),
'accompanyingPeriod' => $accompanyingPeriod,
]);
@ -453,7 +477,7 @@ final class ActivityController extends AbstractController
);
}
$this->addFlash('success', $this->get('translator')->trans('Success : activity created!'));
$this->addFlash('success', $this->translator->trans('Success : activity created!'));
$params = $this->buildParamsToUrl($person, $accompanyingPeriod);
@ -626,8 +650,8 @@ final class ActivityController extends AbstractController
throw $this->createNotFoundException('Accompanying Period not found');
}
// TODO Add permission
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
// TODO Add permission
// $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
} else {
throw $this->createNotFoundException('Person or Accompanying Period not found');
}

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Controller;
use Chill\ActivityBundle\Entity\ActivityReasonCategory;

View File

@ -1,27 +1,36 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Controller;
use Chill\ActivityBundle\Entity\ActivityReason;
use Chill\ActivityBundle\Form\ActivityReasonType;
use Chill\ActivityBundle\Repository\ActivityReasonRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* ActivityReason controller.
*/
class ActivityReasonController extends AbstractController
{
private ActivityReasonRepository $activityReasonRepository;
public function __construct(ActivityReasonRepository $activityReasonRepository)
{
$this->activityReasonRepository = $activityReasonRepository;
}
/**
* Creates a new ActivityReason entity.
*/
@ -56,8 +65,8 @@ class ActivityReasonController extends AbstractController
$entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
if (null === $entity) {
throw new NotFoundHttpException('Unable to find ActivityReason entity.');
}
$editForm = $this->createEditForm($entity);
@ -75,7 +84,7 @@ class ActivityReasonController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->findAll();
$entities = $this->activityReasonRepository->findAll();
return $this->render('ChillActivityBundle:ActivityReason:index.html.twig', [
'entities' => $entities,

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\DataFixtures\ORM;
use Chill\ActivityBundle\Entity\Activity;
@ -50,7 +50,7 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
->findAll();
foreach ($persons as $person) {
$activityNbr = mt_rand(0, 3);
$activityNbr = random_int(0, 3);
for ($i = 0; $i < $activityNbr; ++$i) {
$activity = $this->newRandomActivity($person);
@ -75,7 +75,7 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
// ->setAttendee($this->faker->boolean())
for ($i = 0; mt_rand(0, 4) > $i; ++$i) {
for ($i = 0; random_int(0, 4) > $i; ++$i) {
$reason = $this->getRandomActivityReason();
if (null !== $reason) {

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\DataFixtures\ORM;
use Chill\ActivityBundle\Entity\Activity;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\DataFixtures\ORM;
use Chill\ActivityBundle\Entity\ActivityReason;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\DataFixtures\ORM;
use Chill\ActivityBundle\Entity\ActivityReasonCategory;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\DataFixtures\ORM;
use Chill\ActivityBundle\Entity\ActivityType;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\DataFixtures\ORM;
use Chill\ActivityBundle\Entity\ActivityTypeCategory;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\DataFixtures\ORM;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\DependencyInjection;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
@ -61,8 +61,6 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
ActivityVoter::DELETE => [ActivityVoter::SEE_DETAILS],
ActivityVoter::SEE_DETAILS => [ActivityVoter::SEE],
ActivityVoter::FULL => [
ActivityVoter::CREATE_PERSON,
ActivityVoter::CREATE_ACCOMPANYING_COURSE,
ActivityVoter::DELETE,
ActivityVoter::UPDATE,
],

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
@ -26,7 +26,7 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('chill_activity');
$rootNode = $treeBuilder->getRootNode('chill_activity');
$rootNode = $treeBuilder->getRootNode();
$rootNode
->children()
@ -59,9 +59,7 @@ class Configuration implements ConfigurationInterface
->info('The number of seconds of this duration. Must be an integer.')
->cannotBeEmpty()
->validate()
->ifTrue(static function ($data) {
return !is_int($data);
})->thenInvalid('The value %s is not a valid integer')
->ifTrue(static fn ($data) => !is_int($data))->thenInvalid('The value %s is not a valid integer')
->end()
->end()
->scalarNode('label')

View File

@ -1,23 +1,27 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Entity;
use Chill\ActivityBundle\Validator\Constraints as ActivityValidator;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
use Chill\MainBundle\Entity\HasCenterInterface;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\HasCentersInterface;
use Chill\MainBundle\Entity\HasScopesInterface;
use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User;
@ -55,8 +59,12 @@ use Symfony\Component\Validator\Constraints as Assert;
* getUserFunction="getUser",
* path="scope")
*/
class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface, HasCenterInterface, HasScopeInterface
class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface, HasCentersInterface, HasScopesInterface, TrackCreationInterface, TrackUpdateInterface
{
use TrackCreationTrait;
use TrackUpdateTrait;
public const SENTRECEIVED_RECEIVED = 'received';
public const SENTRECEIVED_SENT = 'sent';
@ -187,7 +195,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
* @Groups({"docgen:read"})
*/
private User $user;
private ?User $user = null;
/**
* @ORM\ManyToMany(targetEntity="Chill\MainBundle\Entity\User")
@ -249,12 +257,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
/**
* Add a social issue.
*
* Note: the social issue consistency (the fact that only yougest social issues
* Note: the social issue consistency (the fact that only youngest social issues
* are kept) is processed by an entity listener:
*
* @see{\Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodSocialIssueConsistencyEntityListener}
*
* @return $this
*/
public function addSocialIssue(SocialIssue $socialIssue): self
{
@ -262,6 +268,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
$this->socialIssues[] = $socialIssue;
}
if ($this->getAccompanyingPeriod() !== null) {
$this->getAccompanyingPeriod()->addSocialIssue($socialIssue);
}
return $this;
}
@ -306,13 +316,17 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
* get the center
* center is extracted from person.
*/
public function getCenter(): ?Center
public function getCenters(): iterable
{
if ($this->person instanceof Person) {
return $this->person->getCenter();
return [$this->person->getCenter()];
}
return null;
if ($this->getAccompanyingPeriod() instanceof AccompanyingPeriod) {
return $this->getAccompanyingPeriod()->getCenters() ?? [];
}
return [];
}
public function getComment(): CommentEmbeddable
@ -422,6 +436,19 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this->scope;
}
public function getScopes(): iterable
{
if (null !== $this->getAccompanyingPeriod()) {
return $this->getAccompanyingPeriod()->getScopes();
}
if (null !== $this->getPerson()) {
return [$this->scope];
}
return [];
}
public function getSentReceived(): string
{
return $this->sentReceived;
@ -467,7 +494,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this->activityType;
}
public function getUser(): User
public function getUser(): ?User
{
return $this->user;
}
@ -525,6 +552,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
{
$this->accompanyingPeriod = $accompanyingPeriod;
foreach ($this->getSocialIssues() as $issue) {
$this->accompanyingPeriod->addSocialIssue($issue);
}
return $this;
}
@ -650,14 +681,14 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this;
}
public function setUser(UserInterface $user): self
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function setUsers(?Collection $users): self
public function setUsers(Collection $users): self
{
$this->users = $users;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Entity;
use Doctrine\ORM\Mapping as ORM;
@ -34,7 +34,7 @@ class ActivityPresence
* @ORM\GeneratedValue(strategy="AUTO")
* @Serializer\Groups({"docgen:read"})
*/
private ?int $id;
private ?int $id = null;
/**
* @ORM\Column(type="json")

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Entity;
use Doctrine\ORM\Mapping as ORM;
@ -63,10 +63,8 @@ class ActivityReason
/**
* Get category.
*
* @return ActivityReasonCategory
*/
public function getCategory()
public function getCategory(): ?ActivityReasonCategory
{
return $this->category;
}
@ -107,6 +105,11 @@ class ActivityReason
return $this->name;
}
public function isActiveAndParentActive(): bool
{
return $this->active && null !== $this->getCategory() && $this->getCategory()->getActive();
}
/**
* Set active.
*

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Entity;
use Doctrine\Common\Collections\ArrayCollection;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Entity;
use Doctrine\ORM\Mapping as ORM;
@ -122,7 +122,7 @@ class ActivityType
* @ORM\GeneratedValue(strategy="AUTO")
* @Groups({"docgen:read"})
*/
private ?int $id;
private ?int $id = null;
/**
* @ORM\Column(type="string", nullable=false, options={"default": ""})
@ -380,6 +380,7 @@ class ActivityType
throw new InvalidArgumentException('Field "' . $field . '" not found');
}
/** @phpstan-ignore-next-line */
return $this->{$property};
}
@ -516,6 +517,11 @@ class ActivityType
return $this->userVisible;
}
public function hasCategory(): bool
{
return null !== $this->getCategory();
}
/**
* Is active
* return true if the type is active.
@ -533,6 +539,7 @@ class ActivityType
throw new InvalidArgumentException('Field "' . $field . '" not found');
}
/** @phpstan-ignore-next-line */
return self::FIELD_REQUIRED === $this->{$property};
}
@ -544,6 +551,7 @@ class ActivityType
throw new InvalidArgumentException('Field "' . $field . '" not found');
}
/** @phpstan-ignore-next-line */
return self::FIELD_INVISIBLE !== $this->{$property};
}

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Entity;
use Doctrine\ORM\Mapping as ORM;

View File

@ -1,14 +1,14 @@
<?php
/**
declare(strict_types=1);
/*
* 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\EntityListener;
use Chill\ActivityBundle\Entity\Activity;

View File

@ -0,0 +1,68 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator\ACPAggregators;
use Chill\ActivityBundle\Entity\Activity;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\PersonBundle\Export\Declarations;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
class ByActivityNumberAggregator implements AggregatorInterface
{
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->addSelect('(SELECT COUNT(activity.id) FROM ' . Activity::class . ' activity WHERE activity.accompanyingPeriod = acp) AS activity_by_number_aggregator')
->addGroupBy('activity_by_number_aggregator');
}
public function applyOn(): string
{
return Declarations::ACP_TYPE;
}
public function buildForm(FormBuilderInterface $builder): void
{
// No form needed
}
public function getLabels($key, array $values, $data)
{
return static function ($value) {
if ('_header' === $value) {
return '';
}
if (null === $value) {
return '';
}
return $value;
};
}
public function getQueryKeys($data): array
{
return ['activity_by_number_aggregator'];
}
public function getTitle(): string
{
return 'Group acp by activity number';
}
}

View File

@ -0,0 +1,82 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator\ACPAggregators;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Repository\UserRepositoryInterface;
use Chill\MainBundle\Templating\Entity\UserRender;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
class ByCreatorAggregator implements AggregatorInterface
{
private UserRender $userRender;
private UserRepositoryInterface $userRepository;
public function __construct(
UserRepositoryInterface $userRepository,
UserRender $userRender
) {
$this->userRepository = $userRepository;
$this->userRender = $userRender;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
$qb->addSelect('IDENTITY(activity.createdBy) AS creator_aggregator');
$qb->addGroupBy('creator_aggregator');
}
public function applyOn(): string
{
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
{
// no form
}
public function getLabels($key, array $values, $data)
{
return function ($value): string {
if ('_header' === $value) {
return 'Created by';
}
if (null === $value || '' === $value) {
return '';
}
$u = $this->userRepository->find($value);
return $this->userRender->renderString($u, []);
};
}
public function getQueryKeys($data): array
{
return ['creator_aggregator'];
}
public function getTitle(): string
{
return 'Group activity by creator';
}
}

View File

@ -0,0 +1,87 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator\ACPAggregators;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\PersonBundle\Repository\SocialWork\SocialActionRepository;
use Chill\PersonBundle\Templating\Entity\SocialActionRender;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
class BySocialActionAggregator implements AggregatorInterface
{
private SocialActionRender $actionRender;
private SocialActionRepository $actionRepository;
public function __construct(
SocialActionRender $actionRender,
SocialActionRepository $actionRepository
) {
$this->actionRender = $actionRender;
$this->actionRepository = $actionRepository;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
if (!in_array('actsocialaction', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.socialActions', 'actsocialaction');
}
$qb->addSelect('actsocialaction.id AS socialaction_aggregator');
$qb->addGroupBy('socialaction_aggregator');
}
public function applyOn(): string
{
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
{
// no form
}
public function getLabels($key, array $values, $data)
{
return function ($value) {
if ('_header' === $value) {
return 'Social action';
}
if (null === $value || '' === $value) {
return '';
}
$sa = $this->actionRepository->find($value);
return $this->actionRender->renderString($sa, []);
};
}
public function getQueryKeys($data): array
{
return ['socialaction_aggregator'];
}
public function getTitle(): string
{
return 'Group activity by linked socialaction';
}
}

View File

@ -0,0 +1,87 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator\ACPAggregators;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\PersonBundle\Repository\SocialWork\SocialIssueRepository;
use Chill\PersonBundle\Templating\Entity\SocialIssueRender;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
class BySocialIssueAggregator implements AggregatorInterface
{
private SocialIssueRender $issueRender;
private SocialIssueRepository $issueRepository;
public function __construct(
SocialIssueRepository $issueRepository,
SocialIssueRender $issueRender
) {
$this->issueRepository = $issueRepository;
$this->issueRender = $issueRender;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
if (!in_array('actsocialissue', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.socialIssues', 'actsocialissue');
}
$qb->addSelect('actsocialissue.id AS socialissue_aggregator');
$qb->addGroupBy('socialissue_aggregator');
}
public function applyOn(): string
{
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
{
// no form
}
public function getLabels($key, array $values, $data)
{
return function ($value): string {
if ('_header' === $value) {
return 'Social issues';
}
if (null === $value || '' === $value) {
return '';
}
$i = $this->issueRepository->find($value);
return $this->issueRender->renderString($i, []);
};
}
public function getQueryKeys($data): array
{
return ['socialissue_aggregator'];
}
public function getTitle(): string
{
return 'Group activity by linked socialissue';
}
}

View File

@ -0,0 +1,87 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator\ACPAggregators;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\ThirdPartyBundle\Repository\ThirdPartyRepository;
use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
class ByThirdpartyAggregator implements AggregatorInterface
{
private ThirdPartyRender $thirdPartyRender;
private ThirdPartyRepository $thirdPartyRepository;
public function __construct(
ThirdPartyRepository $thirdPartyRepository,
ThirdPartyRender $thirdPartyRender
) {
$this->thirdPartyRepository = $thirdPartyRepository;
$this->thirdPartyRender = $thirdPartyRender;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
if (!in_array('acttparty', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.thirdParties', 'acttparty');
}
$qb->addSelect('acttparty.id AS thirdparty_aggregator');
$qb->addGroupBy('thirdparty_aggregator');
}
public function applyOn(): string
{
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
{
// no form
}
public function getLabels($key, array $values, $data)
{
return function ($value): string {
if ('_header' === $value) {
return 'Accepted thirdparty';
}
if (null === $value || '' === $value) {
return '';
}
$tp = $this->thirdPartyRepository->find($value);
return $this->thirdPartyRender->renderString($tp, []);
};
}
public function getQueryKeys($data): array
{
return ['thirdparty_aggregator'];
}
public function getTitle(): string
{
return 'Group activity by linked thirdparties';
}
}

View File

@ -0,0 +1,89 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator\ACPAggregators;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Repository\ScopeRepository;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
class CreatorScopeAggregator implements AggregatorInterface
{
private ScopeRepository $scopeRepository;
private TranslatableStringHelper $translatableStringHelper;
public function __construct(
ScopeRepository $scopeRepository,
TranslatableStringHelper $translatableStringHelper
) {
$this->scopeRepository = $scopeRepository;
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
if (!in_array('actcreator', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.createdBy', 'actcreator');
}
$qb->addSelect('IDENTITY(actcreator.mainScope) AS creatorscope_aggregator');
$qb->addGroupBy('creatorscope_aggregator');
}
public function applyOn(): string
{
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
{
// no form
}
public function getLabels($key, array $values, $data)
{
return function ($value): string {
if ('_header' === $value) {
return 'Scope';
}
if (null === $value || '' === $value) {
return '';
}
$s = $this->scopeRepository->find($value);
return $this->translatableStringHelper->localize(
$s->getName()
);
};
}
public function getQueryKeys($data): array
{
return ['creatorscope_aggregator'];
}
public function getTitle(): string
{
return 'Group activity by creator scope';
}
}

View File

@ -0,0 +1,125 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator\ACPAggregators;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Doctrine\ORM\QueryBuilder;
use RuntimeException;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class DateAggregator implements AggregatorInterface
{
private const CHOICES = [
'by month' => 'month',
'by week' => 'week',
'by year' => 'year',
];
private const DEFAULT_CHOICE = 'year';
private TranslatorInterface $translator;
public function __construct(
TranslatorInterface $translator
) {
$this->translator = $translator;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
$order = null;
switch ($data['frequency']) {
case 'month':
$fmt = 'YYYY-MM';
break;
case 'week':
$fmt = 'YYYY-IW';
break;
case 'year':
$fmt = 'YYYY';
$order = 'DESC';
break; // order DESC does not works !
default:
throw new RuntimeException(sprintf("The frequency data '%s' is invalid.", $data['frequency']));
}
$qb->addSelect(sprintf("TO_CHAR(activity.date, '%s') AS date_aggregator", $fmt));
$qb->addGroupBy('date_aggregator');
$qb->addOrderBy('date_aggregator', $order);
}
public function applyOn(): string
{
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
{
$builder->add('frequency', ChoiceType::class, [
'choices' => self::CHOICES,
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getLabels($key, array $values, $data)
{
return static function ($value) use ($data): string {
if ('_header' === $value) {
return 'by ' . $data['frequency'];
}
if (null === $value) {
return '';
}
switch ($data['frequency']) {
case 'month':
case 'week':
//return $this->translator->trans('for week') .' '. $value ;
case 'year':
//return $this->translator->trans('in year') .' '. $value ;
default:
return $value;
}
};
}
public function getQueryKeys($data): array
{
return ['date_aggregator'];
}
public function getTitle(): string
{
return 'Group activity by date';
}
}

View File

@ -0,0 +1,91 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator\ACPAggregators;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Repository\LocationTypeRepository;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
class LocationTypeAggregator implements AggregatorInterface
{
private LocationTypeRepository $locationTypeRepository;
private TranslatableStringHelper $translatableStringHelper;
public function __construct(
LocationTypeRepository $locationTypeRepository,
TranslatableStringHelper $translatableStringHelper
) {
$this->locationTypeRepository = $locationTypeRepository;
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
if (!in_array('actloc', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.location', 'actloc');
}
$qb->addSelect('IDENTITY(actloc.locationType) AS locationtype_aggregator');
$qb->addGroupBy('locationtype_aggregator');
}
public function applyOn(): string
{
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
{
// no form
}
public function getLabels($key, array $values, $data)
{
return function ($value): string {
if ('_header' === $value) {
return 'Accepted locationtype';
}
if (null === $value || '' === $value) {
return '';
}
if (null === $lt = $this->locationTypeRepository->find($value)) {
return '';
}
return $this->translatableStringHelper->localize(
$lt->getTitle()
);
};
}
public function getQueryKeys($data): array
{
return ['locationtype_aggregator'];
}
public function getTitle(): string
{
return 'Group activity by locationtype';
}
}

View File

@ -1,59 +1,59 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Export\Aggregator;
use Chill\ActivityBundle\Repository\ActivityTypeRepository;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Repository\ActivityTypeRepositoryInterface;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Closure;
use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
use function in_array;
class ActivityTypeAggregator implements AggregatorInterface
{
public const KEY = 'activity_type_aggregator';
protected ActivityTypeRepository $activityTypeRepository;
protected ActivityTypeRepositoryInterface $activityTypeRepository;
protected TranslatableStringHelperInterface $translatableStringHelper;
public function __construct(
ActivityTypeRepository $activityTypeRepository,
ActivityTypeRepositoryInterface $activityTypeRepository,
TranslatableStringHelperInterface $translatableStringHelper
) {
$this->activityTypeRepository = $activityTypeRepository;
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return new Role(ActivityStatsVoter::STATS);
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
// add select element
$qb->addSelect(sprintf('IDENTITY(activity.type) AS %s', self::KEY));
if (!in_array('acttype', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.activityType', 'acttype');
}
// add the "group by" part
$qb->addSelect(sprintf('IDENTITY(activity.activityType) AS %s', self::KEY));
$qb->addGroupBy(self::KEY);
}
public function applyOn()
public function applyOn(): string
{
return 'activity';
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
@ -71,6 +71,10 @@ class ActivityTypeAggregator implements AggregatorInterface
return 'Activity type';
}
if (null === $value || '' === $value) {
return '';
}
$t = $this->activityTypeRepository->find($value);
return $this->translatableStringHelper->localize($t->getName());
@ -86,23 +90,4 @@ class ActivityTypeAggregator implements AggregatorInterface
{
return 'Aggregate by activity type';
}
/**
* Check if a join between Activity and another alias.
*
* @param Join[] $joins
* @param string $alias the alias to search for
*
* @return bool
*/
private function checkJoinAlreadyDefined(array $joins, $alias)
{
foreach ($joins as $join) {
if ($join->getAlias() === $alias) {
return true;
}
}
return false;
}
}

View File

@ -1,39 +1,43 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Export\Aggregator;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Repository\UserRepository;
use Chill\MainBundle\Templating\Entity\UserRender;
use Closure;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
class ActivityUserAggregator implements AggregatorInterface
{
public const KEY = 'activity_user_id';
private UserRender $userRender;
private UserRepository $userRepository;
public function __construct(
UserRepository $userRepository
UserRepository $userRepository,
UserRender $userRender
) {
$this->userRepository = $userRepository;
$this->userRender = $userRender;
}
public function addRole()
public function addRole(): ?string
{
return new Role(ActivityStatsVoter::STATS);
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
@ -47,7 +51,7 @@ class ActivityUserAggregator implements AggregatorInterface
public function applyOn(): string
{
return 'activity';
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
@ -57,15 +61,18 @@ class ActivityUserAggregator implements AggregatorInterface
public function getLabels($key, $values, $data): Closure
{
// preload users at once
$this->userRepository->findBy(['id' => $values]);
return function ($value) {
if ('_header' === $value) {
return 'activity user';
return 'Activity user';
}
return $this->userRepository->find($value)->getUsername();
if (null === $value || '' === $value) {
return '';
}
$u = $this->userRepository->find($value);
return $this->userRender->renderString($u, []);
};
}

View File

@ -0,0 +1,86 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Repository\UserRepositoryInterface;
use Chill\MainBundle\Templating\Entity\UserRender;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
class ActivityUsersAggregator implements AggregatorInterface
{
private UserRender $userRender;
private UserRepositoryInterface $userRepository;
public function __construct(UserRepositoryInterface $userRepository, UserRender $userRender)
{
$this->userRepository = $userRepository;
$this->userRender = $userRender;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
if (!in_array('actusers', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.users', 'actusers');
}
$qb
->addSelect('actusers.id AS activity_users_aggregator')
->addGroupBy('activity_users_aggregator');
}
public function applyOn(): string
{
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
{
// nothing to add on the form
}
public function getLabels($key, array $values, $data)
{
return function ($value) {
if ('_header' === $value) {
return 'Activity users';
}
if (null === $value || '' === $value) {
return '';
}
$u = $this->userRepository->find($value);
return $this->userRender->renderString($u, []);
};
}
public function getQueryKeys($data)
{
return ['activity_users_aggregator'];
}
public function getTitle()
{
return 'Aggregate by activity users';
}
}

View File

@ -0,0 +1,87 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Repository\UserJobRepositoryInterface;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
class ActivityUsersJobAggregator implements \Chill\MainBundle\Export\AggregatorInterface
{
private TranslatableStringHelperInterface $translatableStringHelper;
private UserJobRepositoryInterface $userJobRepository;
public function __construct(UserJobRepositoryInterface $userJobRepository, TranslatableStringHelperInterface $translatableStringHelper)
{
$this->userJobRepository = $userJobRepository;
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
if (!in_array('actusers', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.users', 'actusers');
}
$qb
->addSelect('IDENTITY(actusers.userJob) AS activity_users_job_aggregator')
->addGroupBy('activity_users_job_aggregator');
}
public function applyOn()
{
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
{
// nothing to add in the form
}
public function getLabels($key, array $values, $data)
{
return function ($value): string {
if ('_header' === $value) {
return 'Users \'s job';
}
if (null === $value || '' === $value) {
return '';
}
$j = $this->userJobRepository->find($value);
return $this->translatableStringHelper->localize(
$j->getLabel()
);
};
}
public function getQueryKeys($data): array
{
return ['activity_users_job_aggregator'];
}
public function getTitle()
{
return 'Aggregate by users job';
}
}

View File

@ -0,0 +1,87 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Repository\ScopeRepositoryInterface;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use function in_array;
class ActivityUsersScopeAggregator implements \Chill\MainBundle\Export\AggregatorInterface
{
private ScopeRepositoryInterface $scopeRepository;
private TranslatableStringHelperInterface $translatableStringHelper;
public function __construct(ScopeRepositoryInterface $scopeRepository, TranslatableStringHelperInterface $translatableStringHelper)
{
$this->scopeRepository = $scopeRepository;
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
if (!in_array('actusers', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.users', 'actusers');
}
$qb
->addSelect('IDENTITY(actusers.mainScope) AS activity_users_main_scope_aggregator')
->addGroupBy('activity_users_main_scope_aggregator');
}
public function applyOn()
{
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
{
// nothing to add in the form
}
public function getLabels($key, array $values, $data)
{
return function ($value): string {
if ('_header' === $value) {
return 'Users \'s scope';
}
if (null === $value || '' === $value) {
return '';
}
$s = $this->scopeRepository->find($value);
return $this->translatableStringHelper->localize(
$s->getName()
);
};
}
public function getQueryKeys($data): array
{
return ['activity_users_main_scope_aggregator'];
}
public function getTitle()
{
return 'Aggregate by users scope';
}
}

View File

@ -1,19 +1,19 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Export\Aggregator;
namespace Chill\ActivityBundle\Export\Aggregator\PersonAggregators;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Repository\ActivityReasonCategoryRepository;
use Chill\ActivityBundle\Repository\ActivityReasonRepository;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Export\AggregatorInterface;
use Chill\MainBundle\Export\ExportElementValidatedInterface;
use Chill\MainBundle\Templating\TranslatableStringHelper;
@ -23,11 +23,10 @@ use Doctrine\ORM\QueryBuilder;
use RuntimeException;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use function array_key_exists;
use function count;
use function in_array;
class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface
{
@ -47,19 +46,19 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return new Role(ActivityStatsVoter::STATS);
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
{
// add select element
if ('reasons' === $data['level']) {
$elem = 'reasons.id';
$elem = 'actreasons.id';
$alias = 'activity_reasons_id';
} elseif ('categories' === $data['level']) {
$elem = 'category.id';
$elem = 'actreasoncat.id';
$alias = 'activity_categories_id';
} else {
throw new RuntimeException('The data provided are not recognized.');
@ -68,29 +67,15 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
$qb->addSelect($elem . ' as ' . $alias);
// make a jointure only if needed
$join = $qb->getDQLPart('join');
if (
(
array_key_exists('activity', $join)
&& !$this->checkJoinAlreadyDefined($join['activity'], 'reasons')
)
|| (!array_key_exists('activity', $join))
) {
$qb->add(
'join',
[
'activity' => new Join(Join::INNER_JOIN, 'activity.reasons', 'reasons'),
],
true
);
if (!in_array('actreasons', $qb->getAllAliases(), true)) {
$qb->innerJoin('activity.reasons', 'actreasons');
}
// join category if necessary
if ('activity_categories_id' === $alias) {
// add join only if needed
if (!$this->checkJoinAlreadyDefined($qb->getDQLPart('join')['activity'], 'category')) {
$qb->join('reasons.category', 'category');
if (!in_array('actreasoncat', $qb->getAllAliases(), true)) {
$qb->join('actreasons.category', 'actreasoncat');
}
}
@ -104,9 +89,9 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
}
}
public function applyOn()
public function applyOn(): string
{
return 'activity';
return Declarations::ACTIVITY_PERSON;
}
public function buildForm(FormBuilderInterface $builder)
@ -149,6 +134,10 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
return 'reasons' === $data['level'] ? 'Group by reasons' : 'Group by categories of reason';
}
if (null === $value || '' === $value) {
return '';
}
switch ($data['level']) {
case 'reasons':
$r = $this->activityReasonRepository->find($value);
@ -194,23 +183,4 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
->addViolation();
}
}
/**
* Check if a join between Activity and another alias.
*
* @param Join[] $joins
* @param string $alias the alias to search for
*
* @return bool
*/
private function checkJoinAlreadyDefined(array $joins, $alias)
{
foreach ($joins as $join) {
if ($join->getAlias() === $alias) {
return true;
}
}
return false;
}
}

View File

@ -0,0 +1,84 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Aggregator;
use Chill\ActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\AggregatorInterface;
use Doctrine\ORM\QueryBuilder;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
class SentReceivedAggregator implements AggregatorInterface
{
private TranslatorInterface $translator;
public function __construct(TranslatorInterface $translator)
{
$this->translator = $translator;
}
public function addRole(): ?string
{
return null;
}
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->addSelect('activity.sentReceived AS activity_sentreceived_aggregator')
->addGroupBy('activity_sentreceived_aggregator');
}
public function applyOn(): string
{
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder): void
{
// No form needed
}
public function getLabels($key, array $values, $data): callable
{
return function (?string $value): string {
if ('_header' === $value) {
return 'export.aggregator.activity.by_sent_received.Sent or received';
}
switch ($value) {
case null:
case '':
return '';
case 'sent':
return $this->translator->trans('export.aggregator.activity.by_sent_received.is sent');
case 'received':
return $this->translator->trans('export.aggregator.activity.by_sent_received.is received');
default:
throw new LogicException(sprintf('The value %s is not valid', $value));
}
};
}
public function getQueryKeys($data): array
{
return ['activity_sentreceived_aggregator'];
}
public function getTitle(): string
{
return 'export.aggregator.activity.by_sent_received.Group activity by sentreceived';
}
}

View File

@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export;
/**
* This class declare constants used for the export framework.
*/
abstract class Declarations
{
public const ACTIVITY = 'activity';
public const ACTIVITY_ACP = 'activity_linked_to_acp';
public const ACTIVITY_PERSON = 'activity_linked_to_person';
}

View File

@ -0,0 +1,125 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Export\LinkedToACP;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Export\ExportInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
class AvgActivityDuration implements ExportInterface, GroupedExportInterface
{
protected EntityRepository $repository;
public function __construct(
EntityManagerInterface $em
) {
$this->repository = $em->getRepository(Activity::class);
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function getAllowedFormattersTypes(): array
{
return [FormatterInterface::TYPE_TABULAR];
}
public function getDescription(): string
{
return 'Average activities linked to an accompanying period duration by various parameters.';
}
public function getGroup(): string
{
return 'Exports of activities linked to an accompanying period';
}
public function getLabels($key, array $values, $data)
{
if ('export_avg_activity_duration' !== $key) {
throw new LogicException("the key {$key} is not used by this export");
}
return static fn ($value) => '_header' === $value ? 'Average activities linked to an accompanying period duration' : $value;
}
public function getQueryKeys($data): array
{
return ['export_avg_activity_duration'];
}
public function getResult($query, $data)
{
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
}
public function getTitle(): string
{
return 'Average activity linked to an accompanying period duration';
}
public function getType(): string
{
return Declarations::ACTIVITY;
}
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository->createQueryBuilder('activity');
$qb
->join('activity.accompanyingPeriod', 'acp')
->select('AVG(activity.durationTime) as export_avg_activity_duration')
->andWhere($qb->expr()->isNotNull('activity.durationTime'));
$qb
->andWhere(
$qb->expr()->exists(
'SELECT 1 FROM ' . AccompanyingPeriodParticipation::class . ' acl_count_part
JOIN ' . PersonCenterHistory::class . ' acl_count_person_history WITH IDENTITY(acl_count_person_history.person) = IDENTITY(acl_count_part.person)
WHERE acl_count_part.accompanyingPeriod = acp.id AND acl_count_person_history.center IN (:authorized_centers)
'
)
)
->setParameter('authorized_centers', $centers);
return $qb;
}
public function requiredRole(): string
{
return ActivityStatsVoter::STATS;
}
public function supportsModifiers(): array
{
return [
Declarations::ACTIVITY,
Declarations::ACTIVITY_ACP,
PersonDeclarations::ACP_TYPE,
];
}
}

View File

@ -0,0 +1,126 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Export\LinkedToACP;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Export\ExportInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterface
{
protected EntityRepository $repository;
public function __construct(
EntityManagerInterface $em
) {
$this->repository = $em->getRepository(Activity::class);
}
public function buildForm(FormBuilderInterface $builder)
{
// TODO: Implement buildForm() method.
}
public function getAllowedFormattersTypes(): array
{
return [FormatterInterface::TYPE_TABULAR];
}
public function getDescription(): string
{
return 'Average activities linked to an accompanying period visit duration by various parameters.';
}
public function getGroup(): string
{
return 'Exports of activities linked to an accompanying period';
}
public function getLabels($key, array $values, $data)
{
if ('export_avg_activity_visit_duration' !== $key) {
throw new LogicException("the key {$key} is not used by this export");
}
return static fn ($value) => '_header' === $value ? 'Average activities linked to an accompanying period visit duration' : $value;
}
public function getQueryKeys($data): array
{
return ['export_avg_activity_visit_duration'];
}
public function getResult($query, $data)
{
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
}
public function getTitle(): string
{
return 'Average activity linked to an accompanying period visit duration';
}
public function getType(): string
{
return Declarations::ACTIVITY;
}
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository->createQueryBuilder('activity');
$qb
->join('activity.accompanyingPeriod', 'acp')
->select('AVG(activity.travelTime) as export_avg_activity_visit_duration')
->andWhere($qb->expr()->isNotNull('activity.travelTime'));
$qb
->andWhere(
$qb->expr()->exists(
'SELECT 1 FROM ' . AccompanyingPeriodParticipation::class . ' acl_count_part
JOIN ' . PersonCenterHistory::class . ' acl_count_person_history WITH IDENTITY(acl_count_person_history.person) = IDENTITY(acl_count_part.person)
WHERE acl_count_part.accompanyingPeriod = acp.id AND acl_count_person_history.center IN (:authorized_centers)
'
)
)
->setParameter('authorized_centers', $centers);
return $qb;
}
public function requiredRole(): string
{
return ActivityStatsVoter::STATS;
}
public function supportsModifiers(): array
{
return [
Declarations::ACTIVITY,
Declarations::ACTIVITY_ACP,
PersonDeclarations::ACP_TYPE,
];
}
}

View File

@ -0,0 +1,124 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Export\LinkedToACP;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Export\ExportInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
class CountActivity implements ExportInterface, GroupedExportInterface
{
protected EntityRepository $repository;
public function __construct(
EntityManagerInterface $em
) {
$this->repository = $em->getRepository(Activity::class);
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function getAllowedFormattersTypes(): array
{
return [FormatterInterface::TYPE_TABULAR];
}
public function getDescription(): string
{
return 'Count activities linked to an accompanying period by various parameters.';
}
public function getGroup(): string
{
return 'Exports of activities linked to an accompanying period';
}
public function getLabels($key, array $values, $data)
{
if ('export_count_activity' !== $key) {
throw new LogicException("the key {$key} is not used by this export");
}
return static fn ($value) => '_header' === $value ? 'Number of activities linked to an accompanying period' : $value;
}
public function getQueryKeys($data): array
{
return ['export_count_activity'];
}
public function getResult($query, $data)
{
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
}
public function getTitle(): string
{
return 'Count activities linked to an accompanying period';
}
public function getType(): string
{
return Declarations::ACTIVITY;
}
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository
->createQueryBuilder('activity')
->join('activity.accompanyingPeriod', 'acp');
$qb
->andWhere(
$qb->expr()->exists(
'SELECT 1 FROM ' . AccompanyingPeriodParticipation::class . ' acl_count_part
JOIN ' . PersonCenterHistory::class . ' acl_count_person_history WITH IDENTITY(acl_count_person_history.person) = IDENTITY(acl_count_part.person)
WHERE acl_count_part.accompanyingPeriod = acp.id AND acl_count_person_history.center IN (:authorized_centers)
'
)
)
->setParameter('authorized_centers', $centers);
$qb->select('COUNT(DISTINCT activity.id) as export_count_activity');
return $qb;
}
public function requiredRole(): string
{
return ActivityStatsVoter::STATS;
}
public function supportsModifiers(): array
{
return [
Declarations::ACTIVITY,
Declarations::ACTIVITY_ACP,
PersonDeclarations::ACP_TYPE,
];
}
}

View File

@ -0,0 +1,163 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Export\LinkedToACP;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Export\Export\ListActivityHelper;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\MainBundle\Export\Helper\TranslatableStringExportLabelHelper;
use Chill\MainBundle\Export\ListInterface;
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Form\FormBuilderInterface;
class ListActivity implements ListInterface, GroupedExportInterface
{
private EntityManagerInterface $entityManager;
private ListActivityHelper $helper;
private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper;
public function __construct(
ListActivityHelper $helper,
EntityManagerInterface $entityManager,
TranslatableStringExportLabelHelper $translatableStringExportLabelHelper
) {
$this->helper = $helper;
$this->entityManager = $entityManager;
$this->translatableStringExportLabelHelper = $translatableStringExportLabelHelper;
}
public function buildForm(FormBuilderInterface $builder)
{
$this->helper->buildForm($builder);
}
public function getAllowedFormattersTypes()
{
return $this->helper->getAllowedFormattersTypes();
}
public function getDescription()
{
return ListActivityHelper::MSG_KEY . 'List activities linked to an accompanying course';
}
public function getGroup(): string
{
return 'Exports of activities linked to an accompanying period';
}
public function getLabels($key, array $values, $data)
{
switch ($key) {
case 'acpId':
return static function ($value) {
if ('_header' === $value) {
return ListActivityHelper::MSG_KEY . 'accompanying course id';
}
return $value ?? '';
};
case 'scopesNames':
return $this->translatableStringExportLabelHelper->getLabelMulti($key, $values, ListActivityHelper::MSG_KEY . 'course circles');
default:
return $this->helper->getLabels($key, $values, $data);
}
}
public function getQueryKeys($data)
{
return
array_merge(
$this->helper->getQueryKeys($data),
[
'acpId',
'scopesNames',
]
);
}
public function getResult($query, $data)
{
return $this->helper->getResult($query, $data);
}
public function getTitle()
{
return ListActivityHelper::MSG_KEY . 'List activity linked to a course';
}
public function getType()
{
return $this->helper->getType();
}
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->entityManager->createQueryBuilder();
$qb
->distinct()
->from(Activity::class, 'activity')
->join('activity.accompanyingPeriod', 'acp')
->leftJoin('acp.participations', 'acppart')
->leftJoin('acppart.person', 'person')
->andWhere('acppart.startDate != acppart.endDate OR acppart.endDate IS NULL')
->andWhere(
$qb->expr()->exists(
'SELECT 1
FROM ' . PersonCenterHistory::class . ' acl_count_person_history
WHERE acl_count_person_history.person = person
AND acl_count_person_history.center IN (:authorized_centers)
'
)
)
// some grouping are necessary
->addGroupBy('acp.id')
->addOrderBy('activity.date')
->addOrderBy('activity.id')
->setParameter('authorized_centers', $centers);
$this->helper->addSelect($qb);
// add select for this step
$qb
->addSelect('acp.id AS acpId')
->addSelect('(SELECT AGGREGATE(acpScope.name) FROM ' . Scope::class . ' acpScope WHERE acpScope MEMBER OF acp.scopes) AS scopesNames')
->addGroupBy('scopesNames');
return $qb;
}
public function requiredRole(): string
{
return ActivityStatsVoter::LISTS;
}
public function supportsModifiers()
{
return array_merge(
$this->helper->supportsModifiers(),
[
\Chill\PersonBundle\Export\Declarations::ACP_TYPE,
]
);
}
}

View File

@ -0,0 +1,126 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Export\LinkedToACP;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Export\ExportInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
class SumActivityDuration implements ExportInterface, GroupedExportInterface
{
protected EntityRepository $repository;
public function __construct(
EntityManagerInterface $em
) {
$this->repository = $em->getRepository(Activity::class);
}
public function buildForm(FormBuilderInterface $builder)
{
// TODO: Implement buildForm() method.
}
public function getAllowedFormattersTypes(): array
{
return [FormatterInterface::TYPE_TABULAR];
}
public function getDescription(): string
{
return 'Sum activities linked to an accompanying period duration by various parameters.';
}
public function getGroup(): string
{
return 'Exports of activities linked to an accompanying period';
}
public function getLabels($key, array $values, $data)
{
if ('export_sum_activity_duration' !== $key) {
throw new LogicException("the key {$key} is not used by this export");
}
return static fn ($value) => '_header' === $value ? 'Sum activities linked to an accompanying period duration' : $value;
}
public function getQueryKeys($data): array
{
return ['export_sum_activity_duration'];
}
public function getResult($query, $data)
{
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
}
public function getTitle(): string
{
return 'Sum activity linked to an accompanying period duration';
}
public function getType(): string
{
return Declarations::ACTIVITY;
}
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository
->createQueryBuilder('activity')
->join('activity.accompanyingPeriod', 'acp');
$qb->select('SUM(activity.durationTime) as export_sum_activity_duration')
->andWhere($qb->expr()->isNotNull('activity.durationTime'));
$qb
->andWhere(
$qb->expr()->exists(
'SELECT 1 FROM ' . AccompanyingPeriodParticipation::class . ' acl_count_part
JOIN ' . PersonCenterHistory::class . ' acl_count_person_history WITH IDENTITY(acl_count_person_history.person) = IDENTITY(acl_count_part.person)
WHERE acl_count_part.accompanyingPeriod = acp.id AND acl_count_person_history.center IN (:authorized_centers)
'
)
)
->setParameter('authorized_centers', $centers);
return $qb;
}
public function requiredRole(): string
{
return ActivityStatsVoter::STATS;
}
public function supportsModifiers(): array
{
return [
Declarations::ACTIVITY,
Declarations::ACTIVITY_ACP,
PersonDeclarations::ACP_TYPE,
];
}
}

View File

@ -0,0 +1,126 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Export\LinkedToACP;
use Chill\ActivityBundle\Entity\Activity;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Export\ExportInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Chill\PersonBundle\Entity\Person\PersonCenterHistory;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
class SumActivityVisitDuration implements ExportInterface, GroupedExportInterface
{
protected EntityRepository $repository;
public function __construct(
EntityManagerInterface $em
) {
$this->repository = $em->getRepository(Activity::class);
}
public function buildForm(FormBuilderInterface $builder)
{
// TODO: Implement buildForm() method.
}
public function getAllowedFormattersTypes(): array
{
return [FormatterInterface::TYPE_TABULAR];
}
public function getDescription(): string
{
return 'Sum activities linked to an accompanying period visit duration by various parameters.';
}
public function getGroup(): string
{
return 'Exports of activities linked to an accompanying period';
}
public function getLabels($key, array $values, $data)
{
if ('export_sum_activity_visit_duration' !== $key) {
throw new LogicException("the key {$key} is not used by this export");
}
return static fn ($value) => '_header' === $value ? 'Sum activities linked to an accompanying period visit duration' : $value;
}
public function getQueryKeys($data): array
{
return ['export_sum_activity_visit_duration'];
}
public function getResult($query, $data)
{
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
}
public function getTitle(): string
{
return 'Sum activity linked to an accompanying period visit duration';
}
public function getType(): string
{
return Declarations::ACTIVITY;
}
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this->repository
->createQueryBuilder('activity')
->join('activity.accompanyingPeriod', 'acp');
$qb->select('SUM(activity.travelTime) as export_sum_activity_visit_duration')
->andWhere($qb->expr()->isNotNull('activity.travelTime'));
$qb
->andWhere(
$qb->expr()->exists(
'SELECT 1 FROM ' . AccompanyingPeriodParticipation::class . ' acl_count_part
JOIN ' . PersonCenterHistory::class . ' acl_count_person_history WITH IDENTITY(acl_count_person_history.person) = IDENTITY(acl_count_part.person)
WHERE acl_count_part.accompanyingPeriod = acp.id AND acl_count_person_history.center IN (:authorized_centers)
'
)
)
->setParameter('authorized_centers', $centers);
return $qb;
}
public function requiredRole(): string
{
return ActivityStatsVoter::STATS;
}
public function supportsModifiers(): array
{
return [
Declarations::ACTIVITY,
Declarations::ACTIVITY_ACP,
PersonDeclarations::ACP_TYPE,
];
}
}

View File

@ -1,26 +1,28 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Export\Export;
namespace Chill\ActivityBundle\Export\Export\LinkedToPerson;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Repository\ActivityRepository;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Export\ExportInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
use Doctrine\ORM\Query;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
class CountActivity implements ExportInterface
class CountActivity implements ExportInterface, GroupedExportInterface
{
protected ActivityRepository $activityRepository;
@ -41,7 +43,12 @@ class CountActivity implements ExportInterface
public function getDescription()
{
return 'Count activities by various parameters.';
return 'Count activities linked to a person by various parameters.';
}
public function getGroup(): string
{
return 'Exports of activities linked to a person';
}
public function getLabels($key, array $values, $data)
@ -50,7 +57,7 @@ class CountActivity implements ExportInterface
throw new LogicException("the key {$key} is not used by this export");
}
return static fn ($value) => '_header' === $value ? 'Number of activities' : $value;
return static fn ($value) => '_header' === $value ? 'Number of activities linked to a person' : $value;
}
public function getQueryKeys($data)
@ -58,45 +65,59 @@ class CountActivity implements ExportInterface
return ['export_count_activity'];
}
public function getResult($qb, $data)
public function getResult($query, $data)
{
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
}
public function getTitle()
{
return 'Count activities';
return 'Count activities linked to a person';
}
public function getType()
public function getType(): string
{
return 'activity';
return Declarations::ACTIVITY;
}
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static fn ($el) => $el['center'], $acl);
$qb = $this
->activityRepository
$qb = $this->activityRepository
->createQueryBuilder('activity')
->select('COUNT(activity.id) as export_count_activity')
->join('activity.person', 'person');
->join('activity.person', 'person')
->join('person.centerHistory', 'centerHistory');
$qb->select('COUNT(activity.id) as export_count_activity');
$qb
->where($qb->expr()->in('person.center', ':centers'))
->where(
$qb->expr()->andX(
$qb->expr()->lte('centerHistory.startDate', 'activity.date'),
$qb->expr()->orX(
$qb->expr()->isNull('centerHistory.endDate'),
$qb->expr()->gt('centerHistory.endDate', 'activity.date')
)
)
)
->andWhere($qb->expr()->in('centerHistory.center', ':centers'))
->setParameter('centers', $centers);
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
return new Role(ActivityStatsVoter::STATS);
return ActivityStatsVoter::STATS;
}
public function supportsModifiers()
{
return ['person', 'activity'];
return [
Declarations::ACTIVITY,
Declarations::ACTIVITY_PERSON,
PersonDeclarations::PERSON_TYPE,
];
}
}

View File

@ -1,29 +1,31 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Export\Export;
namespace Chill\ActivityBundle\Export\Export\LinkedToPerson;
use Chill\ActivityBundle\Entity\ActivityReason;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Repository\ActivityRepository;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\MainBundle\Export\ListInterface;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
use DateTime;
use Doctrine\DBAL\Exception\InvalidArgumentException;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Validator\Constraints\Callback;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
@ -32,7 +34,7 @@ use function array_key_exists;
use function count;
use function in_array;
class ListActivity implements ListInterface
class ListActivity implements ListInterface, GroupedExportInterface
{
protected EntityManagerInterface $entityManager;
@ -94,7 +96,12 @@ class ListActivity implements ListInterface
public function getDescription()
{
return 'List activities';
return 'List activities linked to a person description';
}
public function getGroup(): string
{
return 'Exports of activities linked to a person';
}
public function getLabels($key, array $values, $data)
@ -117,7 +124,7 @@ class ListActivity implements ListInterface
return 'attendee';
}
return $value ? 1 : 0;
return $value ? 'X' : '';
};
case 'list_reasons':
@ -130,13 +137,11 @@ class ListActivity implements ListInterface
$activity = $activityRepository->find($value);
return implode(', ', array_map(function (ActivityReason $r) {
return '"' .
$this->translatableStringHelper->localize($r->getCategory()->getName())
. ' > ' .
$this->translatableStringHelper->localize($r->getName())
. '"';
}, $activity->getReasons()->toArray()));
return implode(', ', array_map(fn (ActivityReason $r) => '"' .
$this->translatableStringHelper->localize($r->getCategory()->getName())
. ' > ' .
$this->translatableStringHelper->localize($r->getName())
. '"', $activity->getReasons()->toArray()));
};
case 'circle_name':
@ -145,7 +150,7 @@ class ListActivity implements ListInterface
return 'circle';
}
return $this->translatableStringHelper->localize(json_decode($value, true));
return $this->translatableStringHelper->localize(json_decode($value, true, 512, JSON_THROW_ON_ERROR));
};
case 'type_name':
@ -154,7 +159,7 @@ class ListActivity implements ListInterface
return 'activity type';
}
return $this->translatableStringHelper->localize(json_decode($value, true));
return $this->translatableStringHelper->localize(json_decode($value, true, 512, JSON_THROW_ON_ERROR));
};
default:
@ -180,19 +185,17 @@ class ListActivity implements ListInterface
public function getTitle()
{
return 'List activities';
return 'List activity linked to a person';
}
public function getType()
public function getType(): string
{
return 'activity';
return Declarations::ACTIVITY;
}
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(static function ($el) {
return $el['center'];
}, $acl);
$centers = array_map(static fn ($el) => $el['center'], $acl);
// throw an error if any fields are present
if (!array_key_exists('fields', $data)) {
@ -203,10 +206,20 @@ class ListActivity implements ListInterface
$qb
->from('ChillActivityBundle:Activity', 'activity')
->join('activity.person', 'person')
->join('person.center', 'center')
->andWhere('center IN (:authorized_centers)')
->setParameter('authorized_centers', $centers);
->join('activity.person', 'actperson')
->join('actperson.centerHistory', 'centerHistory');
$qb->where(
$qb->expr()->andX(
$qb->expr()->lte('centerHistory.startDate', 'activity.date'),
$qb->expr()->orX(
$qb->expr()->isNull('centerHistory.endDate'),
$qb->expr()->gt('centerHistory.endDate', 'activity.date')
)
)
)
->andWhere($qb->expr()->in('centerHistory.center', ':centers'))
->setParameter('centers', $centers);
foreach ($this->fields as $f) {
if (in_array($f, $data['fields'], true)) {
@ -217,23 +230,23 @@ class ListActivity implements ListInterface
break;
case 'person_firstname':
$qb->addSelect('person.firstName AS person_firstname');
$qb->addSelect('actperson.firstName AS person_firstname');
break;
case 'person_lastname':
$qb->addSelect('person.lastName AS person_lastname');
$qb->addSelect('actperson.lastName AS person_lastname');
break;
case 'person_id':
$qb->addSelect('person.id AS person_id');
$qb->addSelect('actperson.id AS person_id');
break;
case 'user_username':
$qb->join('activity.user', 'user');
$qb->addSelect('user.username AS user_username');
$qb->join('activity.user', 'actuser');
$qb->addSelect('actuser.username AS user_username');
break;
@ -244,7 +257,7 @@ class ListActivity implements ListInterface
break;
case 'type_name':
$qb->join('activity.type', 'type');
$qb->join('activity.activityType', 'type');
$qb->addSelect('type.name AS type_name');
break;
@ -256,6 +269,11 @@ class ListActivity implements ListInterface
break;
case 'attendee':
$qb->addSelect('IDENTITY(activity.attendee) AS attendee');
break;
default:
$qb->addSelect(sprintf('activity.%s as %s', $f, $f));
@ -267,13 +285,17 @@ class ListActivity implements ListInterface
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
return new Role(ActivityStatsVoter::LISTS);
return ActivityStatsVoter::LISTS;
}
public function supportsModifiers()
{
return ['activity', 'person'];
return [
Declarations::ACTIVITY,
Declarations::ACTIVITY_PERSON,
//PersonDeclarations::PERSON_TYPE,
];
}
}

View File

@ -1,31 +1,34 @@
<?php
/**
declare(strict_types=1);
/*
* 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\Export\Export;
namespace Chill\ActivityBundle\Export\Export\LinkedToPerson;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Repository\ActivityRepository;
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Export\ExportInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\PersonBundle\Export\Declarations as PersonDeclarations;
use Doctrine\ORM\Query;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Security\Core\Role\Role;
/**
* This export allow to compute stats on activity duration.
*
* The desired stat must be given in constructor.
*/
class StatActivityDuration implements ExportInterface
class StatActivityDuration implements ExportInterface, GroupedExportInterface
{
public const SUM = 'sum';
@ -59,8 +62,15 @@ class StatActivityDuration implements ExportInterface
public function getDescription()
{
if (self::SUM === $this->action) {
return 'Sum activities duration by various parameters.';
return 'Sum activities linked to a person duration by various parameters.';
}
throw new LogicException('this action is not supported: ' . $this->action);
}
public function getGroup(): string
{
return 'Exports of activities linked to a person';
}
public function getLabels($key, array $values, $data)
@ -69,7 +79,7 @@ class StatActivityDuration implements ExportInterface
throw new LogicException(sprintf('The key %s is not used by this export', $key));
}
$header = self::SUM === $this->action ? 'Sum of activities duration' : false;
$header = self::SUM === $this->action ? 'Sum activities linked to a person duration' : false;
return static fn (string $value) => '_header' === $value ? $header : $value;
}
@ -79,27 +89,29 @@ class StatActivityDuration implements ExportInterface
return ['export_stat_activity'];
}
public function getResult($qb, $data)
public function getResult($query, $data)
{
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
}
public function getTitle()
{
if (self::SUM === $this->action) {
return 'Sum activity duration';
return 'Sum activity linked to a person duration';
}
throw new LogicException('This action is not supported: ' . $this->action);
}
public function getType()
public function getType(): string
{
return 'activity';
return Declarations::ACTIVITY;
}
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
$centers = array_map(
static fn (array $el): string => $el['center'],
static fn (array $el): Center => $el['center'],
$acl
);
@ -111,20 +123,37 @@ class StatActivityDuration implements ExportInterface
$select = 'SUM(activity.durationTime) AS export_stat_activity';
}
return $qb->select($select)
$qb->select($select)
->join('activity.person', 'person')
->join('person.center', 'center')
->where($qb->expr()->in('center', ':centers'))
->setParameter(':centers', $centers);
->join('person.centerHistory', 'centerHistory');
$qb
->where(
$qb->expr()->andX(
$qb->expr()->lte('centerHistory.startDate', 'activity.date'),
$qb->expr()->orX(
$qb->expr()->isNull('centerHistory.endDate'),
$qb->expr()->gt('centerHistory.endDate', 'activity.date')
)
)
)
->andWhere($qb->expr()->in('centerHistory.center', ':centers'))
->setParameter('centers', $centers);
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
return new Role(ActivityStatsVoter::STATS);
return ActivityStatsVoter::STATS;
}
public function supportsModifiers()
{
return ['person', 'activity'];
return [
Declarations::ACTIVITY,
Declarations::ACTIVITY_PERSON,
//PersonDeclarations::PERSON_TYPE,
];
}
}

View File

@ -0,0 +1,269 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Export\Export;
use Chill\ActivityBundle\Export\Declarations;
use Chill\ActivityBundle\Repository\ActivityPresenceRepositoryInterface;
use Chill\ActivityBundle\Repository\ActivityTypeRepositoryInterface;
use Chill\MainBundle\Export\FormatterInterface;
use Chill\MainBundle\Export\Helper\DateTimeHelper;
use Chill\MainBundle\Export\Helper\TranslatableStringExportLabelHelper;
use Chill\MainBundle\Export\Helper\UserHelper;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Export\Helper\LabelPersonHelper;
use Chill\ThirdPartyBundle\Export\Helper\LabelThirdPartyHelper;
use Doctrine\ORM\AbstractQuery;
use Doctrine\ORM\QueryBuilder;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use const SORT_NUMERIC;
class ListActivityHelper
{
public const MSG_KEY = 'export.list.activity.';
private ActivityPresenceRepositoryInterface $activityPresenceRepository;
private ActivityTypeRepositoryInterface $activityTypeRepository;
private DateTimeHelper $dateTimeHelper;
private LabelPersonHelper $labelPersonHelper;
private LabelThirdPartyHelper $labelThirdPartyHelper;
private TranslatableStringHelperInterface $translatableStringHelper;
private TranslatableStringExportLabelHelper $translatableStringLabelHelper;
private TranslatorInterface $translator;
private UserHelper $userHelper;
public function __construct(
ActivityPresenceRepositoryInterface $activityPresenceRepository,
ActivityTypeRepositoryInterface $activityTypeRepository,
DateTimeHelper $dateTimeHelper,
LabelPersonHelper $labelPersonHelper,
LabelThirdPartyHelper $labelThirdPartyHelper,
TranslatorInterface $translator,
TranslatableStringHelperInterface $translatableStringHelper,
TranslatableStringExportLabelHelper $translatableStringLabelHelper,
UserHelper $userHelper
) {
$this->activityPresenceRepository = $activityPresenceRepository;
$this->activityTypeRepository = $activityTypeRepository;
$this->dateTimeHelper = $dateTimeHelper;
$this->labelPersonHelper = $labelPersonHelper;
$this->labelThirdPartyHelper = $labelThirdPartyHelper;
$this->translator = $translator;
$this->translatableStringHelper = $translatableStringHelper;
$this->translatableStringLabelHelper = $translatableStringLabelHelper;
$this->userHelper = $userHelper;
}
public function addSelect(QueryBuilder $qb): void
{
$qb
->addSelect('activity.id AS id')
->addSelect('activity.date')
->addSelect('IDENTITY(activity.activityType) AS typeName')
->leftJoin('activity.reasons', 'reasons')
->addSelect('AGGREGATE(reasons.name) AS listReasons')
->leftJoin('activity.persons', 'actPerson')
->addSelect('AGGREGATE(actPerson.id) AS personsIds')
->addSelect('AGGREGATE(actPerson.id) AS personsNames')
->leftJoin('activity.users', 'users_u')
->addSelect('AGGREGATE(users_u.id) AS usersIds')
->addSelect('AGGREGATE(users_u.id) AS usersNames')
->leftJoin('activity.thirdParties', 'thirdparty')
->addSelect('AGGREGATE(thirdparty.id) AS thirdPartiesIds')
->addSelect('AGGREGATE(thirdparty.id) AS thirdPartiesNames')
->addSelect('IDENTITY(activity.attendee) AS attendeeName')
->addSelect('activity.durationTime')
->addSelect('activity.travelTime')
->addSelect('activity.emergency')
->leftJoin('activity.location', 'location')
->addSelect('location.name AS locationName')
->addSelect('activity.sentReceived')
->addSelect('IDENTITY(activity.createdBy) AS createdBy')
->addSelect('activity.createdAt')
->addSelect('IDENTITY(activity.updatedBy) AS updatedBy')
->addSelect('activity.updatedAt')
->addGroupBy('activity.id')
->addGroupBy('location.id');
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function getAllowedFormattersTypes()
{
return [FormatterInterface::TYPE_LIST];
}
public function getLabels($key, array $values, $data)
{
switch ($key) {
case 'createdAt':
case 'updatedAt':
return $this->dateTimeHelper->getLabel($key);
case 'createdBy':
case 'updatedBy':
return $this->userHelper->getLabel($key, $values, $key);
case 'date':
return $this->dateTimeHelper->getLabel(self::MSG_KEY . $key);
case 'attendeeName':
return function ($value) {
if ('_header' === $value) {
return 'Attendee';
}
if (null === $value || null === $presence = $this->activityPresenceRepository->find($value)) {
return '';
}
return $this->translatableStringHelper->localize($presence->getName());
};
case 'listReasons':
return $this->translatableStringLabelHelper->getLabelMulti($key, $values, 'Activity Reasons');
case 'typeName':
return function ($value) {
if ('_header' === $value) {
return 'Activity type';
}
if (null === $value || null === $type = $this->activityTypeRepository->find($value)) {
return '';
}
return $this->translatableStringHelper->localize($type->getName());
};
case 'usersNames':
return $this->userHelper->getLabelMulti($key, $values, self::MSG_KEY . 'users name');
case 'usersIds':
case 'thirdPartiesIds':
case 'personsIds':
return static function ($value) use ($key) {
if ('_header' === $value) {
switch ($key) {
case 'usersIds':
return self::MSG_KEY . 'users ids';
case 'thirdPartiesIds':
return self::MSG_KEY . 'third parties ids';
case 'personsIds':
return self::MSG_KEY . 'persons ids';
default:
throw new LogicException('key not supported');
}
}
$decoded = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
return implode(
'|',
array_unique(
array_filter($decoded, static fn (?int $id) => null !== $id),
SORT_NUMERIC
)
);
};
case 'personsNames':
return $this->labelPersonHelper->getLabelMulti($key, $values, self::MSG_KEY . 'persons name');
case 'thirdPartiesNames':
return $this->labelThirdPartyHelper->getLabelMulti($key, $values, self::MSG_KEY . 'thirds parties');
case 'sentReceived':
return function ($value) {
if ('_header' === $value) {
return self::MSG_KEY . 'sent received';
}
if (null === $value) {
return '';
}
return $this->translator->trans($value);
};
default:
return function ($value) use ($key) {
if ('_header' === $value) {
return self::MSG_KEY . $key;
}
if (null === $value) {
return '';
}
return $this->translator->trans($value);
};
}
}
public function getQueryKeys($data)
{
return [
'id',
'date',
'typeName',
'listReasons',
'attendeeName',
'durationTime',
'travelTime',
'emergency',
'locationName',
'sentReceived',
'personsIds',
'personsNames',
'usersIds',
'usersNames',
'thirdPartiesIds',
'thirdPartiesNames',
'createdBy',
'createdAt',
'updatedBy',
'updatedAt',
];
}
public function getResult($query, $data)
{
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR);
}
public function getType(): string
{
return Declarations::ACTIVITY;
}
public function supportsModifiers()
{
return [
Declarations::ACTIVITY,
];
}
}

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