Merge branch 'master' into admin-permissionsgroup-templates

This commit is contained in:
Mathieu Jaumotte 2023-04-14 12:22:32 +02:00
commit 78d3c6f1be
375 changed files with 12036 additions and 4094 deletions

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 # 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. # See http://docs.gitlab.com/ee/ci/services/README.html for examples.
services: services:
- name: postgis/postgis:12-3.1-alpine - name: postgis/postgis:14-3.3-alpine
alias: db alias: db
- name: redis - name: redis
alias: redis alias: redis
@ -21,7 +21,7 @@ variables:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
# configure database access # 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 # fetch the chill-app using git submodules
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
REDIS_HOST: redis REDIS_HOST: redis
@ -37,12 +37,11 @@ stages:
build: build:
stage: Composer install 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: before_script:
- curl -sS https://getcomposer.org/installer | php - composer config -g cache-dir "$(pwd)/.cache"
- php -d memory_limit=2G composer.phar config -g cache-dir "$(pwd)/.cache"
script: 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: cache:
paths: paths:
- .cache/ - .cache/
@ -54,9 +53,12 @@ build:
code_style: code_style:
stage: 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: script:
- bin/grumphp run --tasks=phpcsfixer - php-cs-fixer fix --dry-run -v --show-progress=none
cache:
paths:
- .cache/
artifacts: artifacts:
expire_in: 30 min expire_in: 30 min
paths: paths:
@ -65,30 +67,49 @@ code_style:
phpstan_tests: phpstan_tests:
stage: 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: script:
- bin/grumphp run --tasks=phpstan - bin/phpstan analyze --memory-limit=2G
cache:
paths:
- .cache/
artifacts: artifacts:
expire_in: 30 min expire_in: 30 min
paths: paths:
- bin - bin
- tests/app/vendor/ - tests/app/vendor/
psalm_tests: rector_tests:
stage: 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: script:
- bin/grumphp run --tasks=psalm - bin/rector --dry-run
allow_failure: true cache:
paths:
- .cache/
artifacts: artifacts:
expire_in: 30 min expire_in: 30 min
paths: paths:
- bin - bin
- tests/app/vendor/ - 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: unit_tests:
stage: 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: script:
- php tests/app/bin/console doctrine:migrations:migrate -n - php tests/app/bin/console doctrine:migrations:migrate -n
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev - php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev

View File

@ -9,13 +9,24 @@ declare(strict_types=1);
* the LICENSE file that was distributed with this source code. * the LICENSE file that was distributed with this source code.
*/ */
$config = require __DIR__ . '/tests/app/vendor/drupol/php-conventions/config/php73/php_cs_fixer.config.php'; $finder = PhpCsFixer\Finder::create();
$config $finder
->getFinder() ->in(__DIR__.'/src')
->ignoreDotFiles(false) ->append([__FILE__])
->exclude(['docs/', 'tests/app'])
->notPath('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(); $rules = $config->getRules();
@ -68,9 +79,42 @@ $riskyRules = [
// 'psr_autoloading' => false, // '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( $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, $rules,
$riskyRules $riskyRules,
$untilFullSwitchToPhp8,
); );
$rules['header_comment']['header'] = trim(file_get_contents(__DIR__ . '/resource/header.txt')); $rules['header_comment']['header'] = trim(file_get_contents(__DIR__ . '/resource/header.txt'));

View File

@ -8,7 +8,7 @@
"social worker" "social worker"
], ],
"require": { "require": {
"php": "^7.4", "php": "^7.4|^8.2",
"ext-json": "*", "ext-json": "*",
"ext-openssl": "*", "ext-openssl": "*",
"ext-redis": "*", "ext-redis": "*",
@ -64,18 +64,25 @@
}, },
"require-dev": { "require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3", "doctrine/doctrine-fixtures-bundle": "^3.3",
"drupol/php-conventions": "^5",
"fakerphp/faker": "^1.13", "fakerphp/faker": "^1.13",
"jangregor/phpstan-prophecy": "^1.0",
"nelmio/alice": "^3.8", "nelmio/alice": "^3.8",
"phpspec/prophecy-phpunit": "^2.0", "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", "phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": ">= 7.5", "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/debug-bundle": "^5.1",
"symfony/dotenv": "^4.4", "symfony/dotenv": "^4.4",
"symfony/maker-bundle": "^1.20", "symfony/maker-bundle": "^1.20",
"symfony/phpunit-bridge": "^4.4", "symfony/phpunit-bridge": "^4.4",
"symfony/stopwatch": "^4.4", "symfony/stopwatch": "^4.4",
"symfony/var-dumper": "^4.4" "symfony/var-dumper": "^4.4",
"vimeo/psalm": "^4.30.0"
}, },
"conflict": { "conflict": {
"symfony/symfony": "*" "symfony/symfony": "*"

View File

@ -129,12 +129,12 @@ This script will :
.. note:: .. 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 .. code-block:: bash
docker-compose images php docker-compose images php
docker rmi -f chill_php:prod docker rmi -f chill_php82:prod
docker-compose rm php docker-compose rm php

View File

@ -1,40 +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/"
- "/tests/app"
# Psalm
tasks.psalm.blocking: true
tasks.psalm.ignore_patterns:
- "/.github/"
- "/.idea/"
- "/build/"
- "/benchmarks/"
- "/node_modules/"
- "/resource/"
- "/spec/"
- "/var/"
- "/vendor/"

View File

@ -34,13 +34,14 @@
"webpack-cli": "^5.0.1" "webpack-cli": "^5.0.1"
}, },
"dependencies": { "dependencies": {
"@fullcalendar/core": "^5.11.0", "@fullcalendar/core": "^6.1.4",
"@fullcalendar/daygrid": "^5.11.0", "@fullcalendar/daygrid": "^6.1.4",
"@fullcalendar/interaction": "^5.11.0", "@fullcalendar/interaction": "^6.1.4",
"@fullcalendar/list": "^5.11.0", "@fullcalendar/list": "^6.1.4",
"@fullcalendar/timegrid": "^5.11.0", "@fullcalendar/timegrid": "^6.1.4",
"@fullcalendar/vue3": "^5.11.1", "@fullcalendar/vue3": "^6.1.4",
"@popperjs/core": "^2.9.2", "@popperjs/core": "^2.9.2",
"@types/leaflet": "^1.9.3",
"dropzone": "^5.7.6", "dropzone": "^5.7.6",
"es6-promise": "^4.2.8", "es6-promise": "^4.2.8",
"leaflet": "^1.7.1", "leaflet": "^1.7.1",

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: parameters:
ignoreErrors: 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\\.$#" message: "#^Foreach overwrites \\$key with its key variable\\.$#"
count: 1 count: 1
@ -20,11 +15,6 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php 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\\}\\.$#" message: "#^Cannot unset offset '_token' on array\\{formatter\\: mixed, export\\: mixed, centers\\: mixed, alias\\: string\\}\\.$#"
count: 1 count: 1
@ -50,46 +40,11 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php 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\\.$#" message: "#^Foreach overwrites \\$value with its value variable\\.$#"
count: 1 count: 1
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php 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\\.$#" message: "#^Foreach overwrites \\$value with its value variable\\.$#"
count: 1 count: 1

View File

@ -1,76 +1,6 @@
parameters: parameters:
ignoreErrors: 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\\\\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/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\\(\\)\\.$#" message: "#^Call to an undefined method Chill\\\\MainBundle\\\\Controller\\\\UserController\\:\\:createEditForm\\(\\)\\.$#"
count: 1 count: 1
path: src/Bundle/ChillMainBundle/Controller/UserController.php 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

View File

@ -32,14 +32,6 @@ parameters:
path: src/Bundle/ChillActivityBundle/Form/ActivityType.php path: src/Bundle/ChillActivityBundle/Form/ActivityType.php
-
message: """
#^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\:
since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$#
"""
count: 1
path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php
- -
message: """ message: """
#^Parameter \\$centerResolverDispatcher of method Chill\\\\ActivityBundle\\\\Repository\\\\ActivityACLAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\: #^Parameter \\$centerResolverDispatcher of method Chill\\\\ActivityBundle\\\\Repository\\\\ActivityACLAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\:
@ -199,14 +191,6 @@ parameters:
count: 2 count: 2
path: src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php path: src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php
-
message: """
#^Class Chill\\\\MainBundle\\\\Entity\\\\User implements deprecated interface Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\AdvancedUserInterface\\:
since Symfony 4\\.1$#
"""
count: 1
path: src/Bundle/ChillMainBundle/Entity/User.php
- -
message: """ message: """
#^Return type of method Chill\\\\MainBundle\\\\Entity\\\\User\\:\\:getRoles\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\: #^Return type of method Chill\\\\MainBundle\\\\Entity\\\\User\\:\\:getRoles\\(\\) has typehint with deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\:
@ -329,22 +313,6 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillPersonBundle/Actions/ActionEvent.php path: src/Bundle/ChillPersonBundle/Actions/ActionEvent.php
-
message: """
#^Call to deprecated method getCurrentAccompanyingPeriod\\(\\) of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\:
since 1\\.1 use `getOpenedAccompanyingPeriod instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: """
#^Instantiation of deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
"""
count: 1
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
- -
message: """ message: """
#^Class Chill\\\\PersonBundle\\\\Controller\\\\AccompanyingCourseController extends deprecated class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller\\: #^Class Chill\\\\PersonBundle\\\\Controller\\\\AccompanyingCourseController extends deprecated class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller\\:
@ -541,11 +509,3 @@ parameters:
count: 3 count: 3
path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
-
message: """
#^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Role\\\\Role\\:
since Symfony 4\\.3, to be removed in 5\\.0\\. Use strings as roles instead\\.$#
"""
count: 1
path: src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php

View File

@ -100,11 +100,6 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php 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\\.$#" message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1 count: 1
@ -315,11 +310,6 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php 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\\.$#" message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1 count: 1
@ -345,11 +335,6 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillPersonBundle/Search/PersonSearch.php 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\\.$#" message: "#^Method Chill\\\\ReportBundle\\\\DataFixtures\\\\ORM\\\\LoadReports\\:\\:getRandomChoice\\(\\) should return array\\<string\\>\\|string but return statement is missing\\.$#"
count: 1 count: 1
@ -395,16 +380,6 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php 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\\.$#" message: "#^Method Chill\\\\ThirdPartyBundle\\\\Search\\\\ThirdPartySearch\\:\\:renderResult\\(\\) should return string but return statement is missing\\.$#"
count: 1 count: 1

View File

@ -1,7 +1,9 @@
parameters: parameters:
level: 1 level: 5
paths: paths:
- src/ - src/
tmpDir: .cache/
reportUnmatchedIgnoredErrors: false
excludePaths: excludePaths:
- .php_cs* - .php_cs*
- docs/ - docs/
@ -24,4 +26,8 @@ includes:
- phpstan-critical.neon - phpstan-critical.neon
- phpstan-deprecations.neon - phpstan-deprecations.neon
- phpstan-types.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

@ -12,6 +12,7 @@
<directory name="src"/> <directory name="src"/>
<ignoreFiles> <ignoreFiles>
<directory name="./tests/"/> <directory name="./tests/"/>
<directory name="./node_modules/"/>
</ignoreFiles> </ignoreFiles>
</projectFiles> </projectFiles>
@ -25,4 +26,22 @@
</UndefinedDocblockClass> </UndefinedDocblockClass>
</issueHandlers> </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> </psalm>

25
rector.php Normal file
View File

@ -0,0 +1,25 @@
<?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);
// define sets of rules
// $rectorConfig->sets([
// LevelSetList::UP_TO_PHP_74
// ]);
};

View File

@ -195,7 +195,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
* @Groups({"docgen:read"}) * @Groups({"docgen:read"})
*/ */
private User $user; private ?User $user;
/** /**
* @ORM\ManyToMany(targetEntity="Chill\MainBundle\Entity\User") * @ORM\ManyToMany(targetEntity="Chill\MainBundle\Entity\User")
@ -257,12 +257,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
/** /**
* Add a social issue. * 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: * are kept) is processed by an entity listener:
* *
* @see{\Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodSocialIssueConsistencyEntityListener} * @see{\Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodSocialIssueConsistencyEntityListener}
*
* @return $this
*/ */
public function addSocialIssue(SocialIssue $socialIssue): self public function addSocialIssue(SocialIssue $socialIssue): self
{ {
@ -270,6 +268,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
$this->socialIssues[] = $socialIssue; $this->socialIssues[] = $socialIssue;
} }
if ($this->getAccompanyingPeriod() !== null) {
$this->getAccompanyingPeriod()->addSocialIssue($socialIssue);
}
return $this; return $this;
} }
@ -492,7 +494,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this->activityType; return $this->activityType;
} }
public function getUser(): User public function getUser(): ?User
{ {
return $this->user; return $this->user;
} }
@ -550,6 +552,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
{ {
$this->accompanyingPeriod = $accompanyingPeriod; $this->accompanyingPeriod = $accompanyingPeriod;
foreach ($this->getSocialIssues() as $issue) {
$this->accompanyingPeriod->addSocialIssue($issue);
}
return $this; return $this;
} }
@ -675,14 +681,14 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this; return $this;
} }
public function setUser(UserInterface $user): self public function setUser(?User $user): self
{ {
$this->user = $user; $this->user = $user;
return $this; return $this;
} }
public function setUsers(?Collection $users): self public function setUsers(Collection $users): self
{ {
$this->users = $users; $this->users = $users;

View File

@ -380,6 +380,7 @@ class ActivityType
throw new InvalidArgumentException('Field "' . $field . '" not found'); throw new InvalidArgumentException('Field "' . $field . '" not found');
} }
/** @phpstan-ignore-next-line */
return $this->{$property}; return $this->{$property};
} }
@ -538,6 +539,7 @@ class ActivityType
throw new InvalidArgumentException('Field "' . $field . '" not found'); throw new InvalidArgumentException('Field "' . $field . '" not found');
} }
/** @phpstan-ignore-next-line */
return self::FIELD_REQUIRED === $this->{$property}; return self::FIELD_REQUIRED === $this->{$property};
} }
@ -549,6 +551,7 @@ class ActivityType
throw new InvalidArgumentException('Field "' . $field . '" not found'); throw new InvalidArgumentException('Field "' . $field . '" not found');
} }
/** @phpstan-ignore-next-line */
return self::FIELD_INVISIBLE !== $this->{$property}; return self::FIELD_INVISIBLE !== $this->{$property};
} }

View File

@ -58,7 +58,8 @@ class DateAggregator implements AggregatorInterface
break; break;
case 'year': case 'year':
$fmt = 'YYYY'; $order = 'DESC'; $fmt = 'YYYY';
$order = 'DESC';
break; // order DESC does not works ! break; // order DESC does not works !

View File

@ -20,13 +20,6 @@ use Symfony\Component\Form\FormBuilderInterface;
class LocationFilter implements FilterInterface class LocationFilter implements FilterInterface
{ {
private TranslatableStringHelper $translatableStringHelper;
public function __construct(TranslatableStringHelper $translatableStringHelper)
{
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole(): ?string public function addRole(): ?string
{ {
return null; return null;
@ -50,7 +43,7 @@ class LocationFilter implements FilterInterface
{ {
$builder->add('accepted_location', PickUserLocationType::class, [ $builder->add('accepted_location', PickUserLocationType::class, [
'multiple' => true, 'multiple' => true,
'label' => 'pick location' 'label' => 'pick location',
]); ]);
} }

View File

@ -225,6 +225,7 @@ class ActivityType extends AbstractType
$builder->add('user', PickUserDynamicType::class, [ $builder->add('user', PickUserDynamicType::class, [
'label' => $activityType->getLabel('user'), 'label' => $activityType->getLabel('user'),
'required' => $activityType->isRequired('user'), 'required' => $activityType->isRequired('user'),
'multiple' => false,
]); ]);
} }

View File

@ -18,6 +18,9 @@ use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\Security;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
/**
* @implements LocalMenuBuilderInterface<array{accompanyingCourse: AccompanyingPeriod}>
*/
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
{ {
protected Security $security; protected Security $security;

View File

@ -15,6 +15,9 @@ use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Knp\Menu\MenuItem; use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\Security;
/**
* @implements LocalMenuBuilderInterface<array>
*/
final class AdminMenuBuilder implements LocalMenuBuilderInterface final class AdminMenuBuilder implements LocalMenuBuilderInterface
{ {
private Security $security; private Security $security;

View File

@ -13,11 +13,15 @@ namespace Chill\ActivityBundle\Menu;
use Chill\ActivityBundle\Security\Authorization\ActivityVoter; use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
use Chill\MainBundle\Routing\LocalMenuBuilderInterface; use Chill\MainBundle\Routing\LocalMenuBuilderInterface;
use Chill\PersonBundle\Entity\Person;
use Knp\Menu\MenuItem; use Knp\Menu\MenuItem;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
class PersonMenuBuilder implements LocalMenuBuilderInterface /**
* @implements LocalMenuBuilderInterface<array{person: Person}>
*/
final class PersonMenuBuilder implements LocalMenuBuilderInterface
{ {
/** /**
* @var AuthorizationCheckerInterface * @var AuthorizationCheckerInterface
@ -44,7 +48,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) { if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) {
$menu->addChild( $menu->addChild(
$this->translator->trans('Activity list'), $this->translator->trans('Activities'),
[ [
'route' => 'chill_activity_activity_list', 'route' => 'chill_activity_activity_list',
'routeParameters' => ['person_id' => $person->getId()], 'routeParameters' => ['person_id' => $person->getId()],

View File

@ -225,10 +225,9 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
$personToCenter = $metadataPerson->getAssociationMapping('center')['joinColumns'][0]['name']; $personToCenter = $metadataPerson->getAssociationMapping('center')['joinColumns'][0]['name'];
// acls: // acls:
$role = new Role(ActivityVoter::SEE);
$reachableCenters = $this->authorizationHelper->getReachableCenters( $reachableCenters = $this->authorizationHelper->getReachableCenters(
$this->tokenStorage->getToken()->getUser(), $this->tokenStorage->getToken()->getUser(),
$role ActivityVoter::SEE
); );
if (count($reachableCenters) === 0) { if (count($reachableCenters) === 0) {
@ -239,7 +238,7 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
if ('person' === $context) { if ('person' === $context) {
// we start with activities having the person_id linked to person // we start with activities having the person_id linked to person
$where .= sprintf('%s = ? AND ', $activityToPerson); $where .= sprintf('%s = ? AND ', $activityToPerson);
$parameters[] = $person->getId(); $parameters[] = $args['context']->getId();
} }
// we add acl (reachable center and scopes) // we add acl (reachable center and scopes)
@ -252,7 +251,7 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
continue; continue;
} }
// we get all the reachable scopes for this center // we get all the reachable scopes for this center
$reachableScopes = $this->authorizationHelper->getReachableScopes($this->tokenStorage->getToken()->getUser(), $role, $center); $reachableScopes = $this->authorizationHelper->getReachableScopes($this->tokenStorage->getToken()->getUser(), ActivityVoter::SEE, $center);
// we get the ids for those scopes // we get the ids for those scopes
$reachablesScopesId = array_map( $reachablesScopesId = array_map(
static function (Scope $scope) { static function (Scope $scope) {

View File

@ -88,3 +88,11 @@ div.flex-bloc.concerned-groups {
font-size: 120%; font-size: 120%;
} }
} }
/// DOCUMENT LIST IN ACTIVITY ITEM
li.document-list-item {
display: flex;
width: 100%;
justify-content: space-between;
margin-bottom: 0.3rem;
}

View File

@ -63,12 +63,12 @@
</div> </div>
{% endif %} {% endif %}
{% if activity.user and t.userVisible %} {% if activity.user is not null and t.userVisible %}
<div class="wl-row"> <div class="wl-row">
<div class="wl-col title"><h3>{{ 'Referrer'|trans }}</h3></div> <div class="wl-col title"><h3>{{ 'Referrer'|trans }}</h3></div>
<div class="wl-col list"> <div class="wl-col list">
<p class="wl-item"> <p class="wl-item">
{{ activity.user|chill_entity_render_box }} <span class="badge-user">{{ activity.user|chill_entity_render_box }}</span>
</p> </p>
</div> </div>
</div> </div>
@ -137,19 +137,42 @@
{{ activity.comment|chill_entity_render_box({ {{ activity.comment|chill_entity_render_box({
'disable_markdown': false, 'disable_markdown': false,
'limit_lines': 3, 'limit_lines': 3,
'metadata': false 'metadata': false,
}) }} }) }}
</div> </div>
</div> </div>
{% endif %} {% endif %}
{# Only if ACL SEE_DETAILS AND/OR only on template SHOW ?? {% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) and activity.privateComment.hasCommentForUser(app.user) %}
durationTime <div class="wl-row">
travelTime <div class="wl-col title">
comment <h3>{{ 'Private comment'|trans }}</h3>
documents </div>
attendee <div class="wl-col list">
#} <section class="chill-entity entity-comment-embeddable">
<blockquote class="chill-user-quote private-quote">
{{ activity.privateComment.comments[app.user.id]|chill_markdown_to_html }}
</blockquote>
</section>
</div>
</div>
{% endif %}
{% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) and activity.documents|length > 0 %}
<div class="wl-row">
<div class="wl-col title">
<h3>{{ 'Documents'|trans }}</h3>
</div>
<div class="wl-col list">
<ul>
{% for d in activity.documents %}
<li class="document-list-item">{{ d.title|chill_print_or_message('document.Any title') }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_ACTIVITY_UPDATE', activity), {small: true}) }}</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
</div> </div>
</div> </div>

View File

@ -5,7 +5,7 @@
Maybe should we think about abstracting this file a bit more ? Moving it to PersonBundle ? Maybe should we think about abstracting this file a bit more ? Moving it to PersonBundle ?
#} #}
{% if context == 'calendar_accompanyingCourse' %} {% if context == 'calendar_accompanyingCourse' or context == 'calendar_person' %}
{% import "@ChillCalendar/_invite.html.twig" as invite %} {% import "@ChillCalendar/_invite.html.twig" as invite %}
{% endif %} {% endif %}

View File

@ -8,11 +8,13 @@
{% block js %} {% block js %}
{{ parent() }} {{ parent() }}
{{ encore_entry_script_tags('mod_notification_toggle_read_status') }} {{ encore_entry_script_tags('mod_notification_toggle_read_status') }}
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block css %} {% block css %}
{{ parent() }} {{ parent() }}
{{ encore_entry_link_tags('mod_notification_toggle_read_status') }} {{ encore_entry_link_tags('mod_notification_toggle_read_status') }}
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -23,11 +23,13 @@
{% block js %} {% block js %}
{{ parent() }} {{ parent() }}
{{ encore_entry_script_tags('mod_notification_toggle_read_status') }} {{ encore_entry_script_tags('mod_notification_toggle_read_status') }}
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block css %} {% block css %}
{{ parent() }} {{ parent() }}
{{ encore_entry_link_tags('mod_notification_toggle_read_status') }} {{ encore_entry_link_tags('mod_notification_toggle_read_status') }}
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -41,7 +41,7 @@
{% if activity.user and t.userVisible %} {% if activity.user and t.userVisible %}
<li> <li>
<span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span> <span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span>
<b>{{ activity.user|chill_entity_render_box}}</b> <span class="badge-user">{{ activity.user|chill_entity_render_box }}</span>
</li> </li>
{% endif %} {% endif %}

View File

@ -34,8 +34,12 @@
<div class="item-row separator"> <div class="item-row separator">
<dl class="chill_view_data"> <dl class="chill_view_data">
{%- if entity.user is not null %}
<dt class="inline">{{ 'Referrer'|trans|capitalize }}</dt> <dt class="inline">{{ 'Referrer'|trans|capitalize }}</dt>
<dd>{{ entity.user|chill_entity_render_box }}</dd> <dd>
<span class="badge-user">{{ entity.user|chill_entity_render_box }}</span>
</dd>
{% endif %}
{%- if entity.scope -%} {%- if entity.scope -%}
<dt class="inline">{{ 'Scope'|trans }}</dt> <dt class="inline">{{ 'Scope'|trans }}</dt>
@ -168,7 +172,7 @@
{% if entity.documents|length > 0 %} {% if entity.documents|length > 0 %}
<ul> <ul>
{% for d in entity.documents %} {% for d in entity.documents %}
<li>{{ d.title }} {{ d|chill_document_button_group() }}</li> <li class="document-list-item">{{ d.title|chill_print_or_message('document.Any title') }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_ACTIVITY_UPDATE', entity), {small: true}) }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}

View File

@ -32,6 +32,9 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
/**
* @implements DocGeneratorContextWithPublicFormInterface<Activity>
*/
class ActivityContext implements class ActivityContext implements
DocGeneratorContextWithAdminFormInterface, DocGeneratorContextWithAdminFormInterface,
DocGeneratorContextWithPublicFormInterface DocGeneratorContextWithPublicFormInterface
@ -144,6 +147,32 @@ class ActivityContext implements
} }
} }
public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$denormalized = [];
foreach (['mainPerson', 'person1', 'person2'] as $k) {
if (null !== ($id = ($data[$k] ?? null))) {
$denormalized[$k] = $this->personRepository->find($id);
} else {
$denormalized[$k] = null;
}
}
return $denormalized;
}
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$normalized = [];
foreach (['mainPerson', 'person1', 'person2'] as $k) {
$normalized[$k] = null === $data[$k] ? null : $data[$k]->getId();
}
return $normalized;
}
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array
{ {
if (!$entity instanceof Activity) { if (!$entity instanceof Activity) {
@ -152,7 +181,7 @@ class ActivityContext implements
$options = $template->getOptions(); $options = $template->getOptions();
$data = []; $data = [];
$data = array_merge($data, $this->baseContextData->getData()); $data = array_merge($data, $this->baseContextData->getData($contextGenerationData['creator'] ?? null));
$data['activity'] = $this->normalizer->normalize($entity, 'docgen', ['docgen:expects' => Activity::class, 'groups' => 'docgen:read']); $data['activity'] = $this->normalizer->normalize($entity, 'docgen', ['docgen:expects' => Activity::class, 'groups' => 'docgen:read']);
$data['course'] = $this->normalizer->normalize($entity->getAccompanyingPeriod(), 'docgen', ['docgen:expects' => AccompanyingPeriod::class, 'groups' => 'docgen:read']); $data['course'] = $this->normalizer->normalize($entity->getAccompanyingPeriod(), 'docgen', ['docgen:expects' => AccompanyingPeriod::class, 'groups' => 'docgen:read']);
@ -211,35 +240,6 @@ class ActivityContext implements
return $options['mainPerson'] || $options['person1'] || $options['person2']; return $options['mainPerson'] || $options['person1'] || $options['person2'];
} }
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$normalized = [];
foreach (['mainPerson', 'person1', 'person2'] as $k) {
$normalized[$k] = null === $data[$k] ? null : $data[$k]->getId();
}
return $normalized;
}
public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$denormalized = [];
foreach (['mainPerson', 'person1', 'person2'] as $k) {
if (null !== ($id = ($data[$k] ?? null))) {
$denormalized[$k] = $this->personRepository->find($id);
} else {
$denormalized[$k] = null;
}
}
return $denormalized;
}
/**
* @param Activity $entity
*/
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
{ {
$storedObject->setTitle($this->translatableStringHelper->localize($template->getName())); $storedObject->setTitle($this->translatableStringHelper->localize($template->getName()));

View File

@ -34,10 +34,16 @@ use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Repository\ThirdPartyRepository; use Chill\ThirdPartyBundle\Repository\ThirdPartyRepository;
use DateTime; use DateTime;
use libphonenumber\PhoneNumber; use libphonenumber\PhoneNumber;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use function in_array;
/**
* @implements DocGeneratorContextWithPublicFormInterface<AccompanyingPeriod>
* @implements DocGeneratorContextWithAdminFormInterface<AccompanyingPeriod>
*/
class ListActivitiesByAccompanyingPeriodContext implements class ListActivitiesByAccompanyingPeriodContext implements
DocGeneratorContextWithAdminFormInterface, DocGeneratorContextWithAdminFormInterface,
DocGeneratorContextWithPublicFormInterface DocGeneratorContextWithPublicFormInterface
@ -69,7 +75,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
SocialIssueRepository $socialIssueRepository, SocialIssueRepository $socialIssueRepository,
ThirdPartyRepository $thirdPartyRepository, ThirdPartyRepository $thirdPartyRepository,
TranslatableStringHelperInterface $translatableStringHelper, TranslatableStringHelperInterface $translatableStringHelper,
UserRepository $userRepository UserRepository $userRepository,
) { ) {
$this->accompanyingPeriodContext = $accompanyingPeriodContext; $this->accompanyingPeriodContext = $accompanyingPeriodContext;
$this->activityACLAwareRepository = $activityACLAwareRepository; $this->activityACLAwareRepository = $activityACLAwareRepository;
@ -100,14 +106,86 @@ class ListActivitiesByAccompanyingPeriodContext implements
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void
{ {
$this->accompanyingPeriodContext->buildPublicForm($builder, $template, $entity); $this->accompanyingPeriodContext->buildPublicForm($builder, $template, $entity);
$builder
->add('myActivitiesOnly', CheckboxType::class, [
'required' => false,
'label' => 'docgen.myActivitiesOnly',
])
->add('myWorksOnly', CheckboxType::class, [
'required' => false,
'label' => 'docgen.myWorksOnly',
]);
} }
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$denormalized = $this->accompanyingPeriodContext->contextGenerationDataDenormalize($template, $entity, $data);
foreach (['myActivitiesOnly', 'myWorksOnly'] as $k) {
$denormalized[$k] = $data[$k];
}
return $denormalized;
}
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
$normalized = $this->accompanyingPeriodContext->contextGenerationDataNormalize($template, $entity, $data);
foreach (['myActivitiesOnly', 'myWorksOnly'] as $k) {
$normalized[$k] = $data[$k] ?? false;
}
return $normalized;
}
private function filterActivitiesByUser(array $activities, User $user): array
{
return array_filter(
$activities,
function ($activity) use ($user) {
$activityUsernames = array_map(static function ($user) {
return $user['username'];
}, $activity['users'] ?? []);
return in_array($user->getUsername(), $activityUsernames, true);
}
);
}
private function filterWorksByUser(array $works, User $user): array
{
return array_filter(
$works,
function ($work) use ($user) {
$workUsernames = array_map(static function ($user) {
return $user['username'];
}, $work['referrers'] ?? []);
return in_array($user->getUsername(), $workUsernames, true);
}
);
}
public function getData(DocGeneratorTemplate $template, object $entity, array $contextGenerationData = []): array
{ {
$data = $this->accompanyingPeriodContext->getData($template, $entity, $contextGenerationData); $data = $this->accompanyingPeriodContext->getData($template, $entity, $contextGenerationData);
$data['activities'] = $this->getActivitiesSimplified($entity); $activities = $this->getActivitiesSimplified($entity);
$myActivitiesOnly = $contextGenerationData['myActivitiesOnly'];
if ($myActivitiesOnly && isset($contextGenerationData['creator'])) {
$activities = $this->filterActivitiesByUser($activities, $contextGenerationData['creator']);
}
$data['activities'] = $activities;
$myWorksOnly = $contextGenerationData['myWorksOnly'];
if ($myWorksOnly && isset($contextGenerationData['creator'])) {
$data['course']['works'] = $this->filterWorksByUser($data['course']['works'], $contextGenerationData['creator']);
}
return $data; return $data;
} }
@ -143,17 +221,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool
{ {
return $this->accompanyingPeriodContext->hasPublicForm($template, $entity); return true;
}
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
return $this->accompanyingPeriodContext->contextGenerationDataNormalize($template, $entity, $data);
}
public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array
{
return $this->accompanyingPeriodContext->contextGenerationDataDenormalize($template, $entity, $data);
} }
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void

View File

@ -13,13 +13,18 @@ namespace Chill\ActivityBundle\Templating\Entity;
use Chill\ActivityBundle\Entity\ActivityReason; use Chill\ActivityBundle\Entity\ActivityReason;
use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender; use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender;
use Chill\MainBundle\Templating\Entity\BoxUtilsChillEntityRenderTrait;
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\MainBundle\Templating\TranslatableStringHelper;
/** /**
* Render activity reason. * Render activity reason.
*
* @implements ChillEntityRenderInterface<ActivityReason>
*/ */
class ActivityReasonRender extends AbstractChillEntityRender class ActivityReasonRender implements ChillEntityRenderInterface
{ {
use BoxUtilsChillEntityRenderTrait;
/** /**
* @var TranslatableStringHelper * @var TranslatableStringHelper
*/ */
@ -51,9 +56,6 @@ class ActivityReasonRender extends AbstractChillEntityRender
$this->getDefaultClosingBox(); $this->getDefaultClosingBox();
} }
/**
* @param ActivityReason $entity
*/
public function renderString($entity, array $options): string public function renderString($entity, array $options): string
{ {
$category = ''; $category = '';

View File

@ -121,14 +121,14 @@ final class ActivityControllerTest extends WebTestCase
$client->getResponse()->getStatusCode(), $client->getResponse()->getStatusCode(),
'Unexpected HTTP status code for GET /activity/' 'Unexpected HTTP status code for GET /activity/'
); );
$crawler = $client->click($crawler->selectLink('Ajouter une nouvelle activité') $crawler = $client->click($crawler->selectLink('Ajouter un nouvel échange')
->link()); ->link());
$reason1 = $this->getRandomActivityReason(); $reason1 = $this->getRandomActivityReason();
$reason2 = $this->getRandomActivityReason([$reason1->getId()]); $reason2 = $this->getRandomActivityReason([$reason1->getId()]);
// Fill in the form and submit it // Fill in the form and submit it
$form = $crawler->selectButton('Ajouter une nouvelle activité')->form([ $form = $crawler->selectButton('Ajouter un nouvel échange')->form([
'chill_activitybundle_activity' => [ 'chill_activitybundle_activity' => [
'date' => '15-01-2015', 'date' => '15-01-2015',
'durationTime' => 600, 'durationTime' => 600,
@ -152,9 +152,9 @@ final class ActivityControllerTest extends WebTestCase
); );
// Edit the entity // Edit the entity
$crawler = $client->click($crawler->selectLink("Modifier l'activité")->link()); $crawler = $client->click($crawler->selectLink("Modifier l'échange")->link());
$form = $crawler->selectButton("Sauver l'activité")->form([ $form = $crawler->selectButton("Sauver l'échange")->form([
'chill_activitybundle_activity' => [ 'chill_activitybundle_activity' => [
'date' => '25-01-2015', 'date' => '25-01-2015',
// 'remark' => 'Foo' // 'remark' => 'Foo'

View File

@ -1,41 +1,41 @@
#general #general
Show the activity: Voir l'activité Show the activity: Voir l'échange
Edit the activity: Modifier l'activité Edit the activity: Modifier l'échange
Activity: Activité Activity: Échange
Duration time: Durée Duration time: Durée
Duration Time: Durée Duration Time: Durée
durationTime: durée durationTime: durée
Travel time: Durée de déplacement Travel time: Durée de déplacement
Attendee: Présence de la personne Attendee: Présence de l'usager
attendee: présence de la personne attendee: présence de l'usager
list_reasons: liste des sujets list_reasons: liste des sujets
user_username: nom de l'utilisateur user_username: nom de l'utilisateur
circle_name: nom du cercle circle_name: nom du cercle
Remark: Commentaire Remark: Commentaire
No comments: Aucun commentaire No comments: Aucun commentaire
Add a new activity: Ajouter une nouvelle activité Add a new activity: Ajouter une nouvel échange
Activity list: Liste des activités Activity list: Liste des échanges
present: présent present: présent
not present: absent not present: absent
Delete: Supprimer Delete: Supprimer
Update: Mettre à jour Update: Mettre à jour
Update activity: Modifier l'activité Update activity: Modifier l'échange
Scope: Cercle Scope: Cercle
Activity data: Données de l'activité Activity data: Données de l'échange
Activity location: Localisation de l'activité Activity location: Localisation de l'échange
No reason associated: Aucun sujet No reason associated: Aucun sujet
No social issues associated: Aucune problématique sociale No social issues associated: Aucune problématique sociale
No social actions associated: Aucune action d'accompagnement No social actions associated: Aucune action d'accompagnement
There isn't any activities.: Aucune activité enregistrée. There isn't any activities.: Aucun échange enregistré.
type_name: type de l'activité type_name: type de l'échange
person_firstname: prénom person_firstname: prénom
person_lastname: nom de famille person_lastname: nom de famille
person_id: identifiant de la personne person_id: identifiant de l'usager
Type: Type Type: Type
Invisible: Invisible Invisible: Invisible
Optional: Optionnel Optional: Optionnel
Required: Obligatoire Required: Obligatoire
Persons: Personnes Persons: Usagers
Users: Utilisateurs Users: Utilisateurs
Emergency: Urgent Emergency: Urgent
Sent received: Entrant / Sortant Sent received: Entrant / Sortant
@ -50,10 +50,10 @@ received: Reçu
#forms #forms
Activity creation: Nouvelle activité Activity creation: Nouvel échange
Create: Créer Create: Créer
Back to the list: Retour à la liste Back to the list: Retour à la liste
Save activity: Sauver l'activité Save activity: Sauver l'échange
Reset form: Remise à zéro du formulaire Reset form: Remise à zéro du formulaire
Choose the duration: Choisir la durée Choose the duration: Choisir la durée
Choose a type: Choisir un type Choose a type: Choisir un type
@ -90,40 +90,40 @@ activity:
No documents: Aucun document No documents: Aucun document
#timeline #timeline
'%user% has done an %activity_type%': '%user% a effectué une activité de type "%activity_type%"' '%user% has done an %activity_type%': '%user% a effectué un échange de type "%activity_type%"'
#controller #controller
'Success : activity created!': L'activité a été créée. 'Success : activity created!': L'échange a été créé.
'The form is not valid. The activity has not been created !': Le formulaire est invalide. L'activité n'a pas été créée. 'The form is not valid. The activity has not been created !': Le formulaire est invalide. L'échange n'a pas été créé.
'Success : activity updated!': L'activité a été mise à jour. 'Success : activity updated!': L'échange a été mis à jour.
'The form is not valid. The activity has not been updated !': Le formulaire est invalide. L'activité n'a pas été mise à jour. 'The form is not valid. The activity has not been updated !': Le formulaire est invalide. L'échange n'a pas été mise à jour.
# ROLES # ROLES
CHILL_ACTIVITY_CREATE: Créer une activité CHILL_ACTIVITY_CREATE: Créer un échange
CHILL_ACTIVITY_UPDATE: Modifier une activité CHILL_ACTIVITY_UPDATE: Modifier un échange
CHILL_ACTIVITY_SEE: Voir une activité CHILL_ACTIVITY_SEE: Voir un échange
CHILL_ACTIVITY_SEE_DETAILS: Voir le détail des activités CHILL_ACTIVITY_SEE_DETAILS: Voir le détail des échanges
CHILL_ACTIVITY_DELETE: Supprimer une activité CHILL_ACTIVITY_DELETE: Supprimer un échange
CHILL_ACTIVITY_STATS: Statistique des activités CHILL_ACTIVITY_STATS: Statistique des échanges
CHILL_ACTIVITY_LIST: Liste des activités CHILL_ACTIVITY_LIST: Liste des échanges
# admin # admin
Activities: Activités Activities: Échanges
Activity configuration: Configuration des activités Activity configuration: Configuration des échanges
Activity configuration menu: Configuration des activités Activity configuration menu: Configuration des échanges
Activity types: Types d'activité Activity types: Types d'échange
Activity type configuration: Configuration des categories d'activités Activity type configuration: Configuration des catégories d'échanges
Activity Reasons: Sujets d'une activité Activity Reasons: Sujets d'un échange
Activity Reasons Category: Catégories de sujet d'activités Activity Reasons Category: Catégories de sujet d'échanges
Activity Types Categories: Catégories des types d'activité Activity Types Categories: Catégories des types d'échange
Activity Presences: Presences aux activités Activity Presences: Presences aux échanges
Associated activity reason category is inactive: La catégorie de sujet attachée est inactive Associated activity reason category is inactive: La catégorie de sujet attachée est inactive
# Crud # Crud
crud: crud:
activity_type: activity_type:
title_new: Nouveau type d'activité title_new: Nouveau type d'échange
title_edit: Edition d'un type d'activité title_edit: Edition d'un type d'activité
activity_type_category: activity_type_category:
title_new: Nouvelle catégorie de type d'activité title_new: Nouvelle catégorie de type d'activité
@ -159,8 +159,8 @@ Create a new activity presence: Créer une nouvelle "Présence aux activités"
# activity type type admin # activity type type admin
ActivityType list: Types d'activités ActivityType list: Types d'activités
Create a new activity type: Créer un nouveau type d'activité Create a new activity type: Créer un nouveau type d'activité
Persons visible: Visibilité du champ Personnes Persons visible: Visibilité du champ Usagers
Persons label: Libellé du champ Personnes Persons label: Libellé du champ Usagers
User visible: Visibilité du champ Utilisateur User visible: Visibilité du champ Utilisateur
User label: Libellé du champ Utilisateur User label: Libellé du champ Utilisateur
Date visible: Visibilité du champ Date Date visible: Visibilité du champ Date
@ -183,8 +183,8 @@ Private comment visible: Visibilité du champ Commentaire Privé
Private comment label: Libellé du champ Commentaire Privé Private comment label: Libellé du champ Commentaire Privé
Emergency visible: Visibilité du champ Urgent Emergency visible: Visibilité du champ Urgent
Emergency label: Libellé du champ Urgent Emergency label: Libellé du champ Urgent
Accompanying period visible: Visibilité du champ Période d'accompagnement Accompanying period visible: Visibilité du champ parcours d'accompagnement
Accompanying period label: Libellé du champ Période d'accompagnement Accompanying period label: Libellé du champ parcours d'accompagnement
Social issues visible: Visibilité du champ Problématiques sociales Social issues visible: Visibilité du champ Problématiques sociales
Social issues label: Libellé du champ Problématiques sociales Social issues label: Libellé du champ Problématiques sociales
Social actions visible: Visibilité du champ Action sociale Social actions visible: Visibilité du champ Action sociale
@ -206,10 +206,10 @@ Are you sure you want to remove the activity about "%name%" ?: Êtes-vous sûr d
The activity has been successfully removed.: L'activité a été supprimée. The activity has been successfully removed.: L'activité a été supprimée.
# exports # exports
Exports of activities linked to a person: Exports des activités liées à une personne Exports of activities linked to a person: Exports des activités liées à un usager
Number of activities linked to a person: Nombre d'activités liées à une personne Number of activities linked to a person: Nombre d'activités liées à un usager
Count activities linked to a person: Nombre d'activités Count activities linked to a person: Nombre d'activités
Count activities linked to a person by various parameters.: Compte le nombre d'activités enregistrées et liées à une personne en fonction de différents paramètres. Count activities linked to a person by various parameters.: Compte le nombre d'activités enregistrées et liées à un usager en fonction de différents paramètres.
Sum activity linked to a person duration: Durée des activités Sum activity linked to a person duration: Durée des activités
Sum activities linked to a person duration: Durée des activités liés à un usager Sum activities linked to a person duration: Durée des activités liés à un usager
Sum activities linked to a person duration by various parameters.: Additionne la durée des activités en fonction de différents paramètres. Sum activities linked to a person duration by various parameters.: Additionne la durée des activités en fonction de différents paramètres.
@ -244,10 +244,10 @@ Activities before this date: Activités avant cette date
"Filtered by date of activity: only between %date_from% and %date_to%": "Filtré par date de l'activité: uniquement entre %date_from% et %date_to%" "Filtered by date of activity: only between %date_from% and %date_to%": "Filtré par date de l'activité: uniquement entre %date_from% et %date_to%"
This date should be after the date given in "Implied in an activity after this date" field: Cette date devrait être postérieure à la date donnée dans le champ "activités après cette date" This date should be after the date given in "Implied in an activity after this date" field: Cette date devrait être postérieure à la date donnée dans le champ "activités après cette date"
Filtered by person having an activity in a period: Uniquement les personnes ayant eu une activité dans la période donnée Filtered by person having an activity in a period: Uniquement les usagers ayant eu une activité dans la période donnée
Implied in an activity after this date: Impliqué dans une activité après cette date Implied in an activity after this date: Impliqué dans une activité après cette date
Implied in an activity before this date: Impliqué dans une activité avant cette date Implied in an activity before this date: Impliqué dans une activité avant cette date
Filtered by person having an activity between %date_from% and %date_to% with reasons %reasons_name%: Filtré par personnes associées à une activité entre %date_from% et %date_to% avec les sujets %reasons_name% Filtered by person having an activity between %date_from% and %date_to% with reasons %reasons_name%: Filtré par usager associées à une activité entre %date_from% et %date_to% avec les sujets %reasons_name%
Activity reasons for those activities: Sujets de ces activités Activity reasons for those activities: Sujets de ces activités
Filter by activity type: Filtrer les activités par type Filter by activity type: Filtrer les activités par type
@ -326,9 +326,11 @@ This is the minimal activity data: Activité n°
docgen: docgen:
Activity basic: Echange Activity basic: Echange
A basic context for activity: Contexte pour les activités A basic context for activity: Contexte pour les échanges
Accompanying period with a list of activities: Parcours d'accompagnement avec liste des activités Accompanying period with a list of activities: Parcours d'accompagnement avec liste des échanges
Accompanying period with a list of activities description: Ce contexte reprend les informations du parcours, et tous les activités pour un parcours. Les activités ne sont pas filtrés. Accompanying period with a list of activities description: Ce contexte reprend les informations du parcours, et tous les échanges pour un parcours. Les échanges ne sont pas filtrés.
myActivitiesOnly: Prendre en compte uniquement les échanges dans lesquels je suis intervenu
myWorksOnly: Prendre en compte uniquement les actions d'accompagnement dont je suis référent
export: export:
list: list:
@ -336,8 +338,8 @@ export:
users name: Nom des utilisateurs users name: Nom des utilisateurs
users ids: Identifiant des utilisateurs users ids: Identifiant des utilisateurs
third parties ids: Identifiant des tiers third parties ids: Identifiant des tiers
persons ids: Identifiant des personnes persons ids: Identifiant des usagers
persons name: Nom des personnes persons name: Nom des usagers
thirds parties: Tiers thirds parties: Tiers
date: Date de l'activité date: Date de l'activité
locationName: Localisation locationName: Localisation

View File

@ -47,10 +47,10 @@ Reasons: Onderwerpen
#forms #forms
Activity creation: Nouvelle activité Activity creation: Nouvel échange
Create: Créer Create: Créer
Back to the list: Retour à la liste Back to the list: Retour à la liste
Save activity: Sauver l'activité Save activity: Sauver l'échange
Reset form: Remise à zéro du formulaire Reset form: Remise à zéro du formulaire
Choose the duration: Choisir la durée Choose the duration: Choisir la durée
Choose a type: Choisir un type Choose a type: Choisir un type
@ -79,43 +79,43 @@ activity:
No documents: Aucun document No documents: Aucun document
#timeline #timeline
'%user% has done an %activity_type%': '%user% a effectué une activité de type "%activity_type%"' '%user% has done an %activity_type%': '%user% a effectué un échange de type "%activity_type%"'
#controller #controller
'Success : activity created!': L'activité a été créée. 'Success : activity created!': L'échange a été créé.
'The form is not valid. The activity has not been created !': Le formulaire est invalide. L'activité n'a pas été créée. 'The form is not valid. The activity has not been created !': Le formulaire est invalide. L'échange n'a pas été créé.
'Success : activity updated!': L'activité a été mise à jour. 'Success : activity updated!': L'échange a été mis à jour.
'The form is not valid. The activity has not been updated !': Le formulaire est invalide. L'activité n'a pas été mise à jour. 'The form is not valid. The activity has not been updated !': Le formulaire est invalide. L'échange n'a pas été mis à jour.
# ROLES # ROLES
CHILL_ACTIVITY_CREATE: Créer une activité CHILL_ACTIVITY_CREATE: Créer un échange
CHILL_ACTIVITY_UPDATE: Modifier une activité CHILL_ACTIVITY_UPDATE: Modifier un échange
CHILL_ACTIVITY_SEE: Voir une activité CHILL_ACTIVITY_SEE: Voir un échange
CHILL_ACTIVITY_SEE_DETAILS: Voir le détail des activités CHILL_ACTIVITY_SEE_DETAILS: Voir le détail des échanges
CHILL_ACTIVITY_DELETE: Supprimer une activité CHILL_ACTIVITY_DELETE: Supprimer un échange
CHILL_ACTIVITY_STATS: Statistique des activités CHILL_ACTIVITY_STATS: Statistique des échanges
CHILL_ACTIVITY_LIST: Liste des activités CHILL_ACTIVITY_LIST: Liste des échanges
# admin # admin
Activities: Activités Activities: Échanges
Activity configuration: Configuration des activités Activity configuration: Configuration des échanges
Activity configuration menu: Configuration des activités Activity configuration menu: Configuration des échanges
Activity types: Types d'activité Activity types: Types d'échange
Activity type configuration: Configuration des categories d'activités Activity type configuration: Configuration des categories d'échanges
Activity Reasons: Sujets d'une activité Activity Reasons: Sujets d'un échange
Activity Reasons Category: Catégories de sujet d'activités Activity Reasons Category: Catégories de sujet d'échanges
Activity Types Categories: Catégories des types d'activité Activity Types Categories: Catégories des types d'échanges
Activity Presences: Presences des activités Activity Presences: Presences des échanges
# Crud # Crud
crud: crud:
activity_type: activity_type:
title_new: Nouveau type d'activité title_new: Nouveau type d'échange
title_edit: Edition d'un type d'activité title_edit: Edition d'un type d'échange
activity_type_category: activity_type_category:
title_new: Nouvelle catégorie de type d'activité title_new: Nouvelle catégorie de type d'échange
title_edit: Edition d'une catégorie de type d'activité title_edit: Edition d'une catégorie de type d'échange
# activity reason admin # activity reason admin
ActivityReason list: Liste des sujets ActivityReason list: Liste des sujets
@ -124,7 +124,7 @@ Active: Actif
Category: Catégorie Category: Catégorie
ActivityReason creation: Nouveau sujet ActivityReason creation: Nouveau sujet
ActivityReason edit: Modification d'un sujet ActivityReason edit: Modification d'un sujet
ActivityReason: Sujet d'activité ActivityReason: Sujet d'échange
The entity is inactive and won't be proposed: Le sujet est inactif et ne sera pas proposé The entity is inactive and won't be proposed: Le sujet est inactif et ne sera pas proposé
The entity is active and will be proposed: Le sujet est actif et sera proposé The entity is active and will be proposed: Le sujet est actif et sera proposé
@ -133,13 +133,13 @@ ActivityReasonCategory list: Catégories de sujets
Create a new activity category reason: Créer une nouvelle catégorie Create a new activity category reason: Créer une nouvelle catégorie
ActivityReasonCategory creation: Nouvelle catégorie de sujet ActivityReasonCategory creation: Nouvelle catégorie de sujet
ActivityReasonCategory edit: Modification d'une catégorie de sujet ActivityReasonCategory edit: Modification d'une catégorie de sujet
ActivityReasonCategory: Catégorie de sujet d'activité ActivityReasonCategory: Catégorie de sujet d'échange
ActivityReasonCategory is active and will be proposed: La catégorie est active et sera proposée ActivityReasonCategory is active and will be proposed: La catégorie est active et sera proposée
ActivityReasonCategory is inactive and won't be proposed: La catégorie est inactive et ne sera pas proposée ActivityReasonCategory is inactive and won't be proposed: La catégorie est inactive et ne sera pas proposée
# activity type type admin # activity type type admin
ActivityType list: Types d'activités ActivityType list: Types d'échanges
Create a new activity type: Créer un nouveau type d'activité Create a new activity type: Créer un nouveau type d'échange
Persons visible: Visibilité du champ Personnes Persons visible: Visibilité du champ Personnes
Persons label: Libellé du champ Personnes Persons label: Libellé du champ Personnes
User visible: Visibilité du champ Utilisateur User visible: Visibilité du champ Utilisateur
@ -177,20 +177,20 @@ Documents label: Libellé du champ Documents
# activity type category admin # activity type category admin
ActivityTypeCategory list: Liste des catégories des types d'activité ActivityTypeCategory list: Liste des catégories des types d'activité
Create a new activity type category: Créer une nouvelle catégorie de type d'activité Create a new activity type category: Créer une nouvelle catégorie de type d'échange
# activity delete # activity delete
Remove activity: Supprimer une activité Remove activity: Supprimer un échange
Are you sure you want to remove the activity about "%name%" ?: Êtes-vous sûr de vouloir supprimer une activité qui concerne "%name%" ? Are you sure you want to remove the activity about "%name%" ?: Êtes-vous sûr de vouloir supprimer un échange qui concerne "%name%" ?
The activity has been successfully removed.: L'activité a été supprimée. The activity has been successfully removed.: L'échange a été supprimée.
# exports # exports
Count activities: Nombre d'activités Count activities: Nombre d'échanges
Count activities by various parameters.: Compte le nombre d'activités enregistrées en fonction de différents paramètres. Count activities by various parameters.: Compte le nombre d'échanges enregistrées en fonction de différents paramètres.
Sum activity duration: Total de la durée des activités Sum activity duration: Total de la durée des échanges
Sum activities duration by various parameters.: Additionne la durée des activités en fonction de différents paramètres. Sum activities duration by various parameters.: Additionne la durée des échanges en fonction de différents paramètres.
List activities: Liste les activités List activities: Liste les échanges
Number of activities: Nombre d'activités Number of activities: Nombre d'échanges
#filters #filters
Filter by reason: Filtrer par sujet d'activité Filter by reason: Filtrer par sujet d'activité

View File

@ -1,22 +1,22 @@
The reasons's level should not be empty: Le niveau du sujet ne peut pas être vide The reasons's level should not be empty: Le niveau du sujet ne peut pas être vide
At least one reason must be choosen: Au moins un sujet doit être choisi At least one reason must be choosen: Au moins un sujet doit être choisi
For this type of activity, you must add at least one person: Pour ce type d'activité, vous devez ajouter au moins un usager For this type of activity, you must add at least one person: Pour ce type d'échange, vous devez ajouter au moins un usager
For this type of activity, you must add at least one user: Pour ce type d'activité, vous devez ajouter au moins un utilisateur For this type of activity, you must add at least one user: Pour ce type d'échange, vous devez ajouter au moins un utilisateur
For this type of activity, you must add at least one third party: Pour ce type d'activité, vous devez ajouter au moins un tiers For this type of activity, you must add at least one third party: Pour ce type d'échange, vous devez ajouter au moins un tiers
For this type of activity, user is required: Pour ce type d'activité, l'utilisateur est requis For this type of activity, user is required: Pour ce type d'échange, l'utilisateur est requis
For this type of activity, date is required: Pour ce type d'activité, la date est requise For this type of activity, date is required: Pour ce type d'échange, la date est requise
For this type of activity, location is required: Pour ce type d'activité, la localisation est requise For this type of activity, location is required: Pour ce type d'échange, la localisation est requise
For this type of activity, attendee is required: Pour ce type d'activité, le champ "Présence de la personne" est requis For this type of activity, attendee is required: Pour ce type d'échange, le champ "Présence de l'usager" est requis
For this type of activity, duration time is required: Pour ce type d'activité, la durée est requise For this type of activity, duration time is required: Pour ce type d'échange, la durée est requise
For this type of activity, travel time is required: Pour ce type d'activité, la durée du trajet est requise For this type of activity, travel time is required: Pour ce type d'échange, la durée du trajet est requise
For this type of activity, reasons is required: Pour ce type d'activité, le champ "sujet" est requis For this type of activity, reasons is required: Pour ce type d'échange, le champ "sujet" est requis
For this type of activity, comment is required: Pour ce type d'activité, un commentaire est requis For this type of activity, comment is required: Pour ce type d'échange, un commentaire est requis
For this type of activity, sent/received is required: Pour ce type d'activité, le champ Entrant/Sortant est requis For this type of activity, sent/received is required: Pour ce type d'échange, le champ Entrant/Sortant est requis
For this type of activity, document is required: Pour ce type d'activité, un document est requis For this type of activity, document is required: Pour ce type d'échange, un document est requis
For this type of activity, emergency is required: Pour ce type d'activité, le champ "Urgent" est requis For this type of activity, emergency is required: Pour ce type d'échange, le champ "Urgent" est requis
For this type of activity, accompanying period is required: Pour ce type d'activité, le parcours d'accompagnement est requis For this type of activity, accompanying period is required: Pour ce type d'échange, le parcours d'accompagnement est requis
For this type of activity, you must add at least one social issue: Pour ce type d'activité, vous devez ajouter au moins une problématique sociale For this type of activity, you must add at least one social issue: Pour ce type d'échange, vous devez ajouter au moins une problématique sociale
For this type of activity, you must add at least one social action: Pour ce type d'activité, vous devez indiquer au moins une action sociale For this type of activity, you must add at least one social action: Pour ce type d'échange, vous devez indiquer au moins une action sociale
# admin # admin
This parameter must be equal to social issue parameter: Ce paramètre doit être égal au paramètre "Visibilité du champs Problématiques sociales" This parameter must be equal to social issue parameter: Ce paramètre doit être égal au paramètre "Visibilité du champs Problématiques sociales"

View File

@ -1,10 +1,18 @@
<?php <?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\AsideActivityBundle\Export\Export; namespace Chill\AsideActivityBundle\Export\Export;
use Chill\AsideActivityBundle\Entity\AsideActivity; use Chill\AsideActivityBundle\Entity\AsideActivity;
use Chill\AsideActivityBundle\Export\Declarations; use Chill\AsideActivityBundle\Export\Declarations;
use Chill\AsideActivityBundle\Form\AsideActivityCategoryType;
use Chill\AsideActivityBundle\Repository\AsideActivityCategoryRepository; use Chill\AsideActivityBundle\Repository\AsideActivityCategoryRepository;
use Chill\AsideActivityBundle\Security\AsideActivityVoter; use Chill\AsideActivityBundle\Security\AsideActivityVoter;
use Chill\AsideActivityBundle\Templating\Entity\CategoryRender; use Chill\AsideActivityBundle\Templating\Entity\CategoryRender;
@ -16,32 +24,32 @@ use Chill\MainBundle\Export\Helper\UserHelper;
use Chill\MainBundle\Export\ListInterface; use Chill\MainBundle\Export\ListInterface;
use Chill\MainBundle\Repository\CenterRepositoryInterface; use Chill\MainBundle\Repository\CenterRepositoryInterface;
use Chill\MainBundle\Repository\ScopeRepositoryInterface; use Chill\MainBundle\Repository\ScopeRepositoryInterface;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Closure; use DateTimeInterface;
use Doctrine\ORM\AbstractQuery; use Doctrine\ORM\AbstractQuery;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use LogicException;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
final class ListAsideActivity implements ListInterface, GroupedExportInterface final class ListAsideActivity implements ListInterface, GroupedExportInterface
{ {
private EntityManagerInterface $em;
private UserHelper $userHelper;
private DateTimeHelper $dateTimeHelper;
private ScopeRepositoryInterface $scopeRepository;
private CenterRepositoryInterface $centerRepository;
private AsideActivityCategoryRepository $asideActivityCategoryRepository; private AsideActivityCategoryRepository $asideActivityCategoryRepository;
private CategoryRender $categoryRender; private CategoryRender $categoryRender;
private CenterRepositoryInterface $centerRepository;
private DateTimeHelper $dateTimeHelper;
private EntityManagerInterface $em;
private ScopeRepositoryInterface $scopeRepository;
private TranslatableStringHelperInterface $translatableStringHelper; private TranslatableStringHelperInterface $translatableStringHelper;
private UserHelper $userHelper;
public function __construct( public function __construct(
EntityManagerInterface $em, EntityManagerInterface $em,
DateTimeHelper $dateTimeHelper, DateTimeHelper $dateTimeHelper,
@ -76,11 +84,6 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
return 'export.aside_activity.List of aside activities'; return 'export.aside_activity.List of aside activities';
} }
public function getTitle()
{
return 'export.aside_activity.List of aside activities';
}
public function getGroup(): string public function getGroup(): string
{ {
return 'export.Exports of aside activities'; return 'export.Exports of aside activities';
@ -91,15 +94,16 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
switch ($key) { switch ($key) {
case 'id': case 'id':
case 'note': case 'note':
return function ($value) use ($key) { return static function ($value) use ($key) {
if ('_header' === $value) { if ('_header' === $value) {
return 'export.aside_activity.' . $key; return 'export.aside_activity.' . $key;
} }
return $value ?? ''; return $value ?? '';
}; };
case 'duration': case 'duration':
return function ($value) use ($key) { return static function ($value) use ($key) {
if ('_header' === $value) { if ('_header' === $value) {
return 'export.aside_activity.' . $key; return 'export.aside_activity.' . $key;
} }
@ -108,7 +112,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
return ''; return '';
} }
if ($value instanceof \DateTimeInterface) { if ($value instanceof DateTimeInterface) {
return $value->format('H:i:s'); return $value->format('H:i:s');
} }
@ -156,8 +160,8 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
return 'export.aside_activity.main_center'; return 'export.aside_activity.main_center';
} }
/** @var Center $c */
if (null === $value || '' === $value || null === $c = $this->centerRepository->find($value)) { if (null === $value || '' === $value || null === $c = $this->centerRepository->find($value)) {
/** @var Center $c */
return ''; return '';
} }
@ -165,7 +169,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
}; };
default: default:
throw new \LogicException('this key is not supported : ' . $key); throw new LogicException('this key is not supported : ' . $key);
} }
} }
@ -182,19 +186,20 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
'aside_activity_type', 'aside_activity_type',
'date', 'date',
'duration', 'duration',
'note' 'note',
]; ];
} }
/**
* @param QueryBuilder $query
* @param array $data
*/
public function getResult($query, $data): array public function getResult($query, $data): array
{ {
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_ARRAY); return $query->getQuery()->getResult(AbstractQuery::HYDRATE_ARRAY);
} }
public function getTitle()
{
return 'export.aside_activity.List of aside activities';
}
public function getType(): string public function getType(): string
{ {
return Declarations::ASIDE_ACTIVITY_TYPE; return Declarations::ASIDE_ACTIVITY_TYPE;
@ -204,8 +209,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
{ {
$qb = $this->em->createQueryBuilder() $qb = $this->em->createQueryBuilder()
->from(AsideActivity::class, 'aside') ->from(AsideActivity::class, 'aside')
->leftJoin('aside.agent', 'agent') ->leftJoin('aside.agent', 'agent');
;
$qb $qb
->addSelect('aside.id AS id') ->addSelect('aside.id AS id')
@ -218,8 +222,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
->addSelect('IDENTITY(aside.type) AS aside_activity_type') ->addSelect('IDENTITY(aside.type) AS aside_activity_type')
->addSelect('aside.date') ->addSelect('aside.date')
->addSelect('aside.duration') ->addSelect('aside.duration')
->addSelect('aside.note') ->addSelect('aside.note');
;
return $qb; return $qb;
} }

View File

@ -17,7 +17,6 @@ use Chill\MainBundle\Form\Type\Export\FilterType;
use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Form\Type\PickRollingDateType;
use Chill\MainBundle\Service\RollingDate\RollingDate; use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface;
use Doctrine\ORM\Query\Expr\Andx;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormError;

View File

@ -15,7 +15,6 @@ use Chill\AsideActivityBundle\Export\Declarations;
use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Form\Type\PickUserDynamicType;
use Chill\MainBundle\Templating\Entity\UserRender; use Chill\MainBundle\Templating\Entity\UserRender;
use Doctrine\ORM\Query\Expr\Andx;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;

View File

@ -28,22 +28,17 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents; use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use function in_array; use function in_array;
final class AsideActivityFormType extends AbstractType final class AsideActivityFormType extends AbstractType
{ {
private TokenStorageInterface $storage;
private array $timeChoices; private array $timeChoices;
public function __construct( public function __construct(
ParameterBagInterface $parameterBag, ParameterBagInterface $parameterBag,
TokenStorageInterface $storage
) { ) {
$this->timeChoices = $parameterBag->get('chill_aside_activity.form.time_duration'); $this->timeChoices = $parameterBag->get('chill_aside_activity.form.time_duration');
$this->storage = $storage;
} }
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)

View File

@ -44,17 +44,6 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
'order' => 11, 'order' => 11,
'icons' => ['plus'], 'icons' => ['plus'],
]); ]);
$menu->addChild($this->translator->trans('Phonecall'), [
'route' => 'chill_crud_aside_activity_new',
'routeParameters' => [
'type' => 1,
'duration' => 900,
],
])
->setExtras([
'order' => 12,
'icons' => ['plus'],
]);
} }
} }

View File

@ -16,6 +16,9 @@ use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\MainBundle\Templating\TranslatableStringHelper;
use Symfony\Component\Templating\EngineInterface; use Symfony\Component\Templating\EngineInterface;
/**
* @implements ChillEntityRenderInterface<AsideActivityCategory>
*/
final class CategoryRender implements ChillEntityRenderInterface final class CategoryRender implements ChillEntityRenderInterface
{ {
public const DEFAULT_ARGS = [ public const DEFAULT_ARGS = [
@ -45,9 +48,6 @@ final class CategoryRender implements ChillEntityRenderInterface
return $parents; return $parents;
} }
/**
* @param AsideActivityCategory $asideActivityCategory
*/
public function renderBox($asideActivityCategory, array $options): string public function renderBox($asideActivityCategory, array $options): string
{ {
$options = array_merge(self::DEFAULT_ARGS, $options); $options = array_merge(self::DEFAULT_ARGS, $options);
@ -63,9 +63,6 @@ final class CategoryRender implements ChillEntityRenderInterface
); );
} }
/**
* @param AsideActivityCategory $asideActivityCategory
*/
public function renderString($asideActivityCategory, array $options): string public function renderString($asideActivityCategory, array $options): string
{ {
$options = array_merge(self::DEFAULT_ARGS, $options); $options = array_merge(self::DEFAULT_ARGS, $options);
@ -84,9 +81,6 @@ final class CategoryRender implements ChillEntityRenderInterface
return implode($options[self::SEPERATOR_KEY], $titles); return implode($options[self::SEPERATOR_KEY], $titles);
} }
/**
* @param AsideActivityCategory $asideActivityCategory
*/
public function supports($asideActivityCategory, array $options): bool public function supports($asideActivityCategory, array $options): bool
{ {
return $asideActivityCategory instanceof AsideActivityCategory; return $asideActivityCategory instanceof AsideActivityCategory;

View File

@ -21,7 +21,7 @@ Type: Type
Invisible: Invisible Invisible: Invisible
Optional: Optionnel Optional: Optionnel
Required: Obligatoire Required: Obligatoire
Persons: Personnes Persons: Usagers
Users: Utilisateurs Users: Utilisateurs
Emergency: Urgent Emergency: Urgent
by: "Par " by: "Par "
@ -50,7 +50,7 @@ For agent: Pour l'utilisateur
date: Date date: Date
Duration: Durée Duration: Durée
Note: Note Note: Note
Choose the agent for whom this activity is created: Choisissez l'agent pour qui l'activité est créée Choose the agent for whom this activity is created: Choisissez l'agent pour qui l'échange est créé
Choose the activity category: Choisir la catégorie Choose the activity category: Choisir la catégorie
#Duration #Duration

View File

@ -11,12 +11,13 @@ declare(strict_types=1);
namespace Chill\BudgetBundle\Calculator; namespace Chill\BudgetBundle\Calculator;
use Chill\BudgetBundle\Entity\AbstractElement; use Chill\BudgetBundle\Entity\Charge;
use Chill\BudgetBundle\Entity\Resource;
interface CalculatorInterface interface CalculatorInterface
{ {
/** /**
* @param AbstractElement[] $elements * @param array<Charge|Resource> $elements
*/ */
public function calculate(array $elements): ?CalculatorResult; public function calculate(array $elements): ?CalculatorResult;

View File

@ -12,6 +12,8 @@ declare(strict_types=1);
namespace Chill\BudgetBundle\Calculator; namespace Chill\BudgetBundle\Calculator;
use Chill\BudgetBundle\Entity\AbstractElement; use Chill\BudgetBundle\Entity\AbstractElement;
use Chill\BudgetBundle\Entity\Charge;
use Chill\BudgetBundle\Entity\Resource;
use OutOfBoundsException; use OutOfBoundsException;
use function array_key_exists; use function array_key_exists;
@ -21,23 +23,26 @@ use function implode;
class CalculatorManager class CalculatorManager
{ {
/** /**
* @var CalculatorInterface[] * @var array<string, CalculatorInterface>
*/ */
protected $calculators = []; private array $calculators = [];
protected $defaultCalculator = []; /**
* @var string[]
*/
private array $defaultCalculator = [];
public function addCalculator(CalculatorInterface $calculator, bool $default) public function addCalculator(CalculatorInterface $calculator, bool $default)
{ {
$this->calculators[$calculator::getAlias()] = $calculator; $this->calculators[$calculator->getAlias()] = $calculator;
if ($default) { if ($default) {
$this->defaultCalculator[] = $calculator::getAlias(); $this->defaultCalculator[] = $calculator->getAlias();
} }
} }
/** /**
* @param AbstractElement[] $elements * @param array<Resource|Charge> $elements
* *
* @return CalculatorResult[] * @return CalculatorResult[]
*/ */
@ -46,23 +51,17 @@ class CalculatorManager
$results = []; $results = [];
foreach ($this->defaultCalculator as $alias) { foreach ($this->defaultCalculator as $alias) {
$calculator = $this->calculators[$alias]; $result = $this->getCalculator($alias)->calculate($elements);
$result = $calculator->calculate($elements);
if (null !== $result) { if (null !== $result) {
$results[$calculator::getAlias()] = $result; $results[$alias] = $result;
} }
} }
return $results; return $results;
} }
/** public function getCalculator(string $alias): CalculatorInterface
* @param string $alias
*
* @return CalculatorInterface
*/
public function getCalculator($alias)
{ {
if (false === array_key_exists($alias, $this->calculators)) { if (false === array_key_exists($alias, $this->calculators)) {
throw new OutOfBoundsException("The calculator with alias '{$alias}' does " throw new OutOfBoundsException("The calculator with alias '{$alias}' does "

View File

@ -14,6 +14,8 @@ namespace Chill\BudgetBundle\Controller;
use Chill\BudgetBundle\Calculator\CalculatorManager; use Chill\BudgetBundle\Calculator\CalculatorManager;
use Chill\BudgetBundle\Entity\Charge; use Chill\BudgetBundle\Entity\Charge;
use Chill\BudgetBundle\Entity\Resource; use Chill\BudgetBundle\Entity\Resource;
use Chill\BudgetBundle\Repository\ChargeRepository;
use Chill\BudgetBundle\Repository\ResourceRepository;
use Chill\BudgetBundle\Security\Authorization\BudgetElementVoter; use Chill\BudgetBundle\Security\Authorization\BudgetElementVoter;
use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
@ -29,24 +31,20 @@ use function count;
class ElementController extends AbstractController class ElementController extends AbstractController
{ {
protected CalculatorManager $calculator; private CalculatorManager $calculator;
protected LoggerInterface $chillMainLogger; private ResourceRepository $resourceRepository;
protected EntityManagerInterface $em; private ChargeRepository $chargeRepository;
protected TranslatorInterface $translator;
public function __construct( public function __construct(
EntityManagerInterface $em, CalculatorManager $calculator,
TranslatorInterface $translator, ResourceRepository $resourceRepository,
LoggerInterface $chillMainLogger, ChargeRepository $chargeRepository,
CalculatorManager $calculator
) { ) {
$this->em = $em;
$this->translator = $translator;
$this->chillMainLogger = $chillMainLogger;
$this->calculator = $calculator; $this->calculator = $calculator;
$this->resourceRepository = $resourceRepository;
$this->chargeRepository = $chargeRepository;
} }
/** /**
@ -59,24 +57,10 @@ class ElementController extends AbstractController
{ {
$this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $person); $this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $person);
$charges = $this->em $charges = $this->chargeRepository->findAllByEntity($person);
->getRepository(Charge::class) $resources = $this->resourceRepository->findAllByEntity($person);
->findByPerson($person);
$ressources = $this->em $elements = array_merge($charges, $resources);
->getRepository(Resource::class)
->findByPerson($person);
$now = new DateTime('now');
$actualCharges = $this->em
->getRepository(Charge::class)
->findByEntityAndDate($person, $now);
$actualResources = $this->em
->getRepository(Resource::class)
->findByEntityAndDate($person, $now);
$elements = array_merge($actualCharges, $actualResources);
if (count($elements) > 0) { if (count($elements) > 0) {
$results = $this->calculator->calculateDefault($elements); $results = $this->calculator->calculateDefault($elements);
@ -85,7 +69,7 @@ class ElementController extends AbstractController
return $this->render('ChillBudgetBundle:Person:index.html.twig', [ return $this->render('ChillBudgetBundle:Person:index.html.twig', [
'person' => $person, 'person' => $person,
'charges' => $charges, 'charges' => $charges,
'resources' => $ressources, 'resources' => $resources,
'results' => $results ?? [], 'results' => $results ?? [],
]); ]);
} }
@ -100,60 +84,19 @@ class ElementController extends AbstractController
{ {
$this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $household); $this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $household);
$charges = $this->em $charges = $this->chargeRepository->findAllByEntity($household);
->getRepository(Charge::class) $resources = $this->resourceRepository->findAllByEntity($household);
->findByHousehold($household);
$ressources = $this->em $elements = array_merge($charges, $resources);
->getRepository(Resource::class)
->findByHousehold($household);
$now = new DateTime('now');
$actualCharges = $this->em
->getRepository(Charge::class)
->findByEntityAndDate($household, $now);
$actualResources = $this->em
->getRepository(Resource::class)
->findByEntityAndDate($household, $now);
$elements = array_merge($actualCharges, $actualResources);
if (count($elements) > 0) { if (count($elements) > 0) {
$results = $this->calculator->calculateDefault($elements); $results = $this->calculator->calculateDefault($elements);
} }
// quick solution to calculate the sum, difference and amount from
// controller. This should be done from the calculators
// TODO replace this by calculators
$wholeCharges = $actualCharges;
$wholeResources = $actualResources;
foreach ($household->getCurrentPersons() as $person) {
$wholeCharges = array_merge(
$wholeCharges,
$this->em
->getRepository(Charge::class)
->findByEntityAndDate($person, $now)
);
$wholeResources = array_merge(
$wholeResources,
$this->em
->getRepository(Resource::class)
->findByEntityAndDate($person, $now)
);
}
return $this->render('ChillBudgetBundle:Household:index.html.twig', [ return $this->render('ChillBudgetBundle:Household:index.html.twig', [
'household' => $household, 'household' => $household,
'charges' => $charges, 'charges' => $charges,
'resources' => $ressources, 'resources' => $resources,
'wholeResources' => array_filter($wholeResources, static function (Resource $r) use ($now) {
return $r->getStartDate() <= $now && ($r->getEndDate() === null || $r->getEndDate() >= $now);
}),
'wholeCharges' => array_filter($wholeCharges, static function (Charge $c) use ($now) {
return $c->getStartDate() <= $now && ($c->getEndDate() === null || $c->getEndDate() >= $now);
}),
'results' => $results ?? [], 'results' => $results ?? [],
]); ]);
} }

View File

@ -30,7 +30,7 @@ class ChargeKindType extends AbstractType
]) ])
->add('kind', TextType::class, [ ->add('kind', TextType::class, [
'label' => 'budget.admin.form.Charge_kind_key', 'label' => 'budget.admin.form.Charge_kind_key',
'help' => 'budget.admin.form.This kind must contains only alphabeticals characters, and dashes. This string is in use during document generation. Changes may have side effect on document' 'help' => 'budget.admin.form.This kind must contains only alphabeticals characters, and dashes. This string is in use during document generation. Changes may have side effect on document',
]) ])
->add('ordering', NumberType::class) ->add('ordering', NumberType::class)
->add('isActive', CheckboxType::class, [ ->add('isActive', CheckboxType::class, [

View File

@ -30,7 +30,7 @@ class ResourceKindType extends AbstractType
]) ])
->add('kind', TextType::class, [ ->add('kind', TextType::class, [
'label' => 'budget.admin.form.Resource_kind_key', 'label' => 'budget.admin.form.Resource_kind_key',
'help' => 'budget.admin.form.This kind must contains only alphabeticals characters, and dashes. This string is in use during document generation. Changes may have side effect on document' 'help' => 'budget.admin.form.This kind must contains only alphabeticals characters, and dashes. This string is in use during document generation. Changes may have side effect on document',
]) ])
->add('ordering', NumberType::class) ->add('ordering', NumberType::class)
->add('isActive', CheckboxType::class, [ ->add('isActive', CheckboxType::class, [

View File

@ -30,7 +30,7 @@ final class ChargeKindRepository implements ChargeKindRepositoryInterface
} }
/** /**
* @return ChargeType[] * @return array<ChargeKind>
*/ */
public function findAll(): array public function findAll(): array
{ {
@ -38,7 +38,7 @@ final class ChargeKindRepository implements ChargeKindRepositoryInterface
} }
/** /**
* @return ChargeType[] * @return array<ChargeKind>
*/ */
public function findAllActive(): array public function findAllActive(): array
{ {
@ -49,12 +49,11 @@ final class ChargeKindRepository implements ChargeKindRepositoryInterface
->where($qb->expr()->eq('c.isActive', 'true')) ->where($qb->expr()->eq('c.isActive', 'true'))
->orderBy('c.ordering', 'ASC') ->orderBy('c.ordering', 'ASC')
->getQuery() ->getQuery()
->getResult() ->getResult();
;
} }
/** /**
* @return ChargeType[] * @return array<ChargeKind>
*/ */
public function findAllByType(string $type): array public function findAllByType(string $type): array
{ {
@ -65,7 +64,7 @@ final class ChargeKindRepository implements ChargeKindRepositoryInterface
* @param mixed|null $limit * @param mixed|null $limit
* @param mixed|null $offset * @param mixed|null $offset
* *
* @return ChargeType[] * @return array<ChargeKind>
*/ */
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
{ {

View File

@ -19,31 +19,31 @@ interface ChargeKindRepositoryInterface extends ObjectRepository
public function find($id): ?ChargeKind; public function find($id): ?ChargeKind;
/** /**
* @return ChargeType[] * @return array<ChargeKind>
*/ */
public function findAll(): array; public function findAll(): array;
/** /**
* @return ChargeType[] * @return array<ChargeKind>
*/ */
public function findAllActive(): array; public function findAllActive(): array;
public function findOneByKind(string $kind): ?ChargeKind;
/** /**
* @return ChargeType[] * @return array<ChargeKind>
*/ */
public function findAllByType(string $type): array; public function findAllByType(string $type): array;
/** /**
* @param mixed|null $limit * @param int|null $limit
* @param mixed|null $offset * @param int|null $offset
* *
* @return ChargeType[] * @return array<ChargeKind>
*/ */
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
public function findOneBy(array $criteria): ?ChargeKind; public function findOneBy(array $criteria): ?ChargeKind;
public function findOneByKind(string $kind): ?ChargeKind;
public function getClassName(): string; public function getClassName(): string;
} }

View File

@ -11,9 +11,12 @@ declare(strict_types=1);
namespace Chill\BudgetBundle\Repository; namespace Chill\BudgetBundle\Repository;
use Chill\BudgetBundle\Entity\Charge;
use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use DateTime; use DateTime;
use Doctrine\ORM\EntityRepository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/** /**
* ChargeRepository. * ChargeRepository.
@ -21,24 +24,44 @@ use Doctrine\ORM\EntityRepository;
* This class was generated by the Doctrine ORM. Add your own custom * This class was generated by the Doctrine ORM. Add your own custom
* repository methods below. * repository methods below.
*/ */
class ChargeRepository extends EntityRepository class ChargeRepository extends ServiceEntityRepository
{ {
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Charge::class);
}
/**
* @return Charge[]
*/
public function findAllByEntity(Person|Household $entity): array
{
$qb = $this->createQueryBuilder('c');
$property = $entity instanceof Person ? 'person' : 'household';
$qb->where("c.{$property} = :entity")
->setParameter('entity', $entity);
return $qb->getQuery()->getResult();
}
public function findByEntityAndDate($entity, DateTime $date, $sort = null) public function findByEntityAndDate($entity, DateTime $date, $sort = null)
{ {
$qb = $this->createQueryBuilder('c'); $qb = $this->createQueryBuilder('c');
$entityStr = $entity instanceof Person ? 'person' : 'household'; $entityStr = $entity instanceof Person ? 'person' : 'household';
$qb->where("c.{$entityStr} = :{$entityStr}") $qb->where("c.{$entityStr} = :entity")
->andWhere('c.startDate < :date') ->andWhere('c.startDate <= :date')
->andWhere('c.startDate < :date OR c.startDate IS NULL'); ->andWhere('c.endDate > :date OR c.endDate IS NULL');
if (null !== $sort) { if (null !== $sort) {
$qb->orderBy($sort); $qb->orderBy($sort);
} }
$qb->setParameters([ $qb->setParameters([
$entityStr => $entity, 'entity' => $entity,
'date' => $date, 'date' => $date,
]); ]);

View File

@ -30,7 +30,7 @@ final class ResourceKindRepository implements ResourceKindRepositoryInterface
} }
/** /**
* @return ResourceType[] * @return list<ResourceKind>
*/ */
public function findAll(): array public function findAll(): array
{ {
@ -38,7 +38,7 @@ final class ResourceKindRepository implements ResourceKindRepositoryInterface
} }
/** /**
* @return ResourceType[] * @return list<ResourceKind>
*/ */
public function findAllActive(): array public function findAllActive(): array
{ {
@ -49,12 +49,16 @@ final class ResourceKindRepository implements ResourceKindRepositoryInterface
->where($qb->expr()->eq('r.isActive', 'true')) ->where($qb->expr()->eq('r.isActive', 'true'))
->orderBy('r.ordering', 'ASC') ->orderBy('r.ordering', 'ASC')
->getQuery() ->getQuery()
->getResult() ->getResult();
; }
public function findOneByKind(string $kind): ?ResourceKind
{
return $this->repository->findOneBy(['kind' => $kind]) ;
} }
/** /**
* @return ResourceType[] * @return list<ResourceKind>
*/ */
public function findAllByType(string $type): array public function findAllByType(string $type): array
{ {
@ -65,7 +69,7 @@ final class ResourceKindRepository implements ResourceKindRepositoryInterface
* @param mixed|null $limit * @param mixed|null $limit
* @param mixed|null $offset * @param mixed|null $offset
* *
* @return ResourceType[] * @return list<ResourceKind>
*/ */
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
{ {
@ -77,11 +81,6 @@ final class ResourceKindRepository implements ResourceKindRepositoryInterface
return $this->repository->findOneBy($criteria); return $this->repository->findOneBy($criteria);
} }
public function findOneByKind(string $kind): ?ResourceKind
{
return $this->repository->findOneBy(['kind' => $kind]);
}
public function getClassName(): string public function getClassName(): string
{ {
return ResourceKind::class; return ResourceKind::class;

View File

@ -19,25 +19,25 @@ interface ResourceKindRepositoryInterface extends ObjectRepository
public function find($id): ?ResourceKind; public function find($id): ?ResourceKind;
/** /**
* @return ResourceType[] * @return list<ResourceKind>
*/ */
public function findAll(): array; public function findAll(): array;
/** /**
* @return ResourceType[] * @return list<ResourceKind>
*/ */
public function findAllActive(): array; public function findAllActive(): array;
/** /**
* @return ResourceType[] * @return list<ResourceKind>
*/ */
public function findAllByType(string $type): array; public function findAllByType(string $type): array;
/** /**
* @param mixed|null $limit * @param int|null $limit
* @param mixed|null $offset * @param int|null $offset
* *
* @return ResourceType[] * @return list<ResourceKind>
*/ */
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;

View File

@ -11,9 +11,13 @@ declare(strict_types=1);
namespace Chill\BudgetBundle\Repository; namespace Chill\BudgetBundle\Repository;
use Chill\BudgetBundle\Entity\Resource;
use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use DateTime; use DateTime;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\EntityRepository; use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/** /**
* ResourceRepository. * ResourceRepository.
@ -21,28 +25,45 @@ use Doctrine\ORM\EntityRepository;
* This class was generated by the Doctrine ORM. Add your own custom * This class was generated by the Doctrine ORM. Add your own custom
* repository methods below. * repository methods below.
*/ */
class ResourceRepository extends EntityRepository class ResourceRepository extends ServiceEntityRepository
{ {
public function findByEntityAndDate($entity, DateTime $date, $sort = null) public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Resource::class);
}
/**
* @return Resource[]
*/
public function findAllByEntity(Person|Household $entity): array
{
$qb = $this->createQueryBuilder('r');
$property = $entity instanceof Person ? 'person' : 'household';
$qb->where("r.{$property} = :entity")
->setParameter('entity', $entity);
return $qb->getQuery()->getResult();
}
public function findByEntityAndDate(Person|Household $entity, DateTime $date, $sort = null)
{ {
$qb = $this->createQueryBuilder('c'); $qb = $this->createQueryBuilder('c');
$entityStr = $entity instanceof Person ? 'person' : 'household'; $entityStr = $entity instanceof Person ? 'person' : 'household';
$qb->where("c.{$entityStr} = :{$entityStr}") $qb->where("c.{$entityStr} = :entity")
// TODO: in controller, the budget and charges asked are also for future and actual ->andWhere('c.startDate <= :date')
//->andWhere('c.startDate < :date') ->andWhere('c.endDate > :date OR c.endDate IS NULL');
// TODO: there is a misconception here, the end date must be lower or null. startDate are never null
//->andWhere('c.startDate < :date OR c.startDate IS NULL');
;
if (null !== $sort) { if (null !== $sort) {
$qb->orderBy($sort); $qb->orderBy($sort);
} }
$qb->setParameters([ $qb->setParameters([
$entityStr => $entity, 'entity' => $entity,
//'date' => $date, 'date' => $date,
]); ]);
return $qb->getQuery()->getResult(); return $qb->getQuery()->getResult();

View File

@ -13,9 +13,7 @@ namespace Chill\BudgetBundle\Service\Summary;
use Chill\BudgetBundle\Entity\ChargeKind; use Chill\BudgetBundle\Entity\ChargeKind;
use Chill\BudgetBundle\Entity\ResourceKind; use Chill\BudgetBundle\Entity\ResourceKind;
use Chill\BudgetBundle\Repository\ChargeKindRepository;
use Chill\BudgetBundle\Repository\ChargeKindRepositoryInterface; use Chill\BudgetBundle\Repository\ChargeKindRepositoryInterface;
use Chill\BudgetBundle\Repository\ResourceKindRepository;
use Chill\BudgetBundle\Repository\ResourceKindRepositoryInterface; use Chill\BudgetBundle\Repository\ResourceKindRepositoryInterface;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Household\Household;

View File

@ -17,6 +17,9 @@ use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Symfony\Component\Templating\EngineInterface; use Symfony\Component\Templating\EngineInterface;
/**
* @implements ChillEntityRenderInterface<ResourceKind|ChargeKind>
*/
final class BudgetElementTypeRender implements ChillEntityRenderInterface final class BudgetElementTypeRender implements ChillEntityRenderInterface
{ {
private EngineInterface $engine; private EngineInterface $engine;

View File

@ -20,12 +20,15 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Household\HouseholdMember; use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use DateTimeImmutable;
use Doctrine\ORM\AbstractQuery; use Doctrine\ORM\AbstractQuery;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query; use Doctrine\ORM\Query;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Prophecy\Argument; use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\PhpUnit\ProphecyTrait;
use ReflectionClass;
use RuntimeException;
/** /**
* @internal * @internal
@ -47,10 +50,9 @@ final class SummaryBudgetTest extends TestCase
], ],
]); ]);
$queryCharges->setParameters(Argument::type('array')) $queryCharges->setParameters(Argument::type('array'))
->will(function ($args, $query) { ->will(static function ($args, $query) {
return $query; return $query;
}) });
;
$queryResources = $this->prophesize(AbstractQuery::class); $queryResources = $this->prophesize(AbstractQuery::class);
$queryResources->getResult()->willReturn([ $queryResources->getResult()->willReturn([
@ -61,23 +63,23 @@ final class SummaryBudgetTest extends TestCase
], ],
]); ]);
$queryResources->setParameters(Argument::type('array')) $queryResources->setParameters(Argument::type('array'))
->will(function ($args, $query) { ->will(static function ($args, $query) {
return $query; return $query;
}) });
;
$em = $this->prophesize(EntityManagerInterface::class); $em = $this->prophesize(EntityManagerInterface::class);
$em->createNativeQuery(Argument::type('string'), Argument::type(Query\ResultSetMapping::class)) $em->createNativeQuery(Argument::type('string'), Argument::type(Query\ResultSetMapping::class))
->will(function ($args) use ($queryResources, $queryCharges) { ->will(static function ($args) use ($queryResources, $queryCharges) {
if (false !== strpos($args[0], 'chill_budget.resource')) { if (false !== strpos($args[0], 'chill_budget.resource')) {
return $queryResources->reveal(); return $queryResources->reveal();
} }
if (false !== strpos($args[0], 'chill_budget.charge')) { if (false !== strpos($args[0], 'chill_budget.charge')) {
return $queryCharges->reveal(); return $queryCharges->reveal();
} }
throw new \RuntimeException('this query does not have a stub counterpart: '.$args[0]);
}) throw new RuntimeException('this query does not have a stub counterpart: ' . $args[0]);
; });
$chargeRepository = $this->prophesize(ChargeKindRepositoryInterface::class); $chargeRepository = $this->prophesize(ChargeKindRepositoryInterface::class);
$chargeRepository->findAll()->willReturn([ $chargeRepository->findAll()->willReturn([
@ -98,24 +100,23 @@ final class SummaryBudgetTest extends TestCase
$resourceRepository->findOneByKind('misc')->willReturn($misc); $resourceRepository->findOneByKind('misc')->willReturn($misc);
$translatableStringHelper = $this->prophesize(TranslatableStringHelperInterface::class); $translatableStringHelper = $this->prophesize(TranslatableStringHelperInterface::class);
$translatableStringHelper->localize(Argument::type('array'))->will(function ($arg) { $translatableStringHelper->localize(Argument::type('array'))->will(static function ($arg) {
return $arg[0]['fr']; return $arg[0]['fr'];
}); });
$person = new Person(); $person = new Person();
$personReflection = new \ReflectionClass($person); $personReflection = new ReflectionClass($person);
$personIdReflection = $personReflection->getProperty('id'); $personIdReflection = $personReflection->getProperty('id');
$personIdReflection->setAccessible(true); $personIdReflection->setAccessible(true);
$personIdReflection->setValue($person, 1); $personIdReflection->setValue($person, 1);
$household = new Household(); $household = new Household();
$householdReflection = new \ReflectionClass($household); $householdReflection = new ReflectionClass($household);
$householdId = $householdReflection->getProperty('id'); $householdId = $householdReflection->getProperty('id');
$householdId->setAccessible(true); $householdId->setAccessible(true);
$householdId->setValue($household, 1); $householdId->setValue($household, 1);
$householdMember = (new HouseholdMember())->setPerson($person) $householdMember = (new HouseholdMember())->setPerson($person)
->setStartDate(new \DateTimeImmutable('1 month ago')) ->setStartDate(new DateTimeImmutable('1 month ago'));
;
$household->addMember($householdMember); $household->addMember($householdMember);
$summaryBudget = new SummaryBudget( $summaryBudget = new SummaryBudget(

View File

@ -2,6 +2,13 @@
declare(strict_types=1); 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\Migrations\Budget; namespace Chill\Migrations\Budget;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
@ -9,6 +16,12 @@ use Doctrine\Migrations\AbstractMigration;
final class Version20230209161546 extends AbstractMigration final class Version20230209161546 extends AbstractMigration
{ {
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX resource_kind_unique_type_idx');
$this->addSql('DROP INDEX charge_kind_unique_type_idx');
}
public function getDescription(): string public function getDescription(): string
{ {
return 'Budget: add unique constraint on kind for charge_kind and resource_kind'; return 'Budget: add unique constraint on kind for charge_kind and resource_kind';
@ -21,10 +34,4 @@ final class Version20230209161546 extends AbstractMigration
$this->addSql('CREATE UNIQUE INDEX resource_kind_unique_type_idx ON chill_budget.resource_type (kind);'); $this->addSql('CREATE UNIQUE INDEX resource_kind_unique_type_idx ON chill_budget.resource_type (kind);');
$this->addSql('CREATE UNIQUE INDEX charge_kind_unique_type_idx ON chill_budget.charge_type (kind);'); $this->addSql('CREATE UNIQUE INDEX charge_kind_unique_type_idx ON chill_budget.charge_type (kind);');
} }
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX resource_kind_unique_type_idx');
$this->addSql('DROP INDEX charge_kind_unique_type_idx');
}
} }

View File

@ -0,0 +1,56 @@
<?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\Migrations\Budget;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230328155010 extends AbstractMigration
{
public function getDescription(): string
{
return 'budget elements: restore the previous type to resource/charge kind if applicable';
}
public function up(Schema $schema): void
{
$this->addSql(<<<'SQL'
WITH type_to_id AS (
SELECT DISTINCT charge.charge_id AS id, charge.type
FROM chill_budget.charge
WHERE type <> ''
)
UPDATE chill_budget.charge_type
SET kind = type_to_id.type
FROM type_to_id
WHERE type_to_id.type <> '' AND type_to_id.id = charge_type.id
SQL);
$this->addSql(<<<'SQL'
WITH type_to_id AS (
SELECT DISTINCT resource.resource_id AS id, resource.type
FROM chill_budget. resource
WHERE type <> ''
)
UPDATE chill_budget.resource_type
SET kind = type_to_id.type
FROM type_to_id
WHERE type_to_id.type <> '' AND type_to_id.id = resource_type.id
SQL);
}
public function down(Schema $schema): void
{
$this->addSql("UPDATE chill_budget.resource_type SET kind=md5(random()::text) WHERE kind = ''");
$this->addSql("UPDATE chill_budget.charge_type SET kind=md5(random()::text) WHERE kind = ''");
}
}

View File

@ -29,7 +29,7 @@ End of validity period: Fin de la période de validité
Total: Total Total: Total
Create new resource: Créer une nouvelle ressource Create new resource: Créer une nouvelle ressource
Create new charge: Créer une nouvelle charge Create new charge: Créer une nouvelle charge
See person: Voir personne See person: Voir usagers
There isn't any element recorded: Aucun élément enregistré There isn't any element recorded: Aucun élément enregistré
No resources registered: Aucune ressource enregistrée No resources registered: Aucune ressource enregistrée

View File

@ -2,8 +2,8 @@ Budget: Budget
Resource: Inkomsten Resource: Inkomsten
Charge: Onkosten Charge: Onkosten
Budget for %name%: Budget van %name% Budget for %name%: Budget van %name%
Budget for household %household%: Budget van gezin Budget for household %household%: Budget van huishouden
Current budget household members: Actuele budget van gezinsleden Current budget household members: Actuele budget van leden huishouden
Show budget of %name%: Toon budget van %name% Show budget of %name%: Toon budget van %name%
See complete budget: Toon volledige budget See complete budget: Toon volledige budget
Hide budget: Verbergen Hide budget: Verbergen

View File

@ -207,6 +207,7 @@ class CalendarController extends AbstractController
'entityClassName' => Calendar::class, 'entityClassName' => Calendar::class,
'entityId' => $entity->getId(), 'entityId' => $entity->getId(),
'template' => $template->getId(), 'template' => $template->getId(),
'returnPath' => $request->getRequestUri(),
]); ]);
} }
} }
@ -377,7 +378,9 @@ class CalendarController extends AbstractController
$this->addFlash('success', $this->translator->trans('Success : calendar item created!')); $this->addFlash('success', $this->translator->trans('Success : calendar item created!'));
if ($form->get('save_and_upload_doc')->isClicked()) { if ($form->get('save_and_upload_doc')->isClicked()) {
return $this->redirectToRoute('chill_calendar_calendardoc_new', ['id' => $entity->getId()]); return $this->redirectToRoute('chill_calendar_calendardoc_new', [
'id' => $entity->getId()
]);
} }
foreach ($templates as $template) { foreach ($templates as $template) {
@ -386,6 +389,7 @@ class CalendarController extends AbstractController
'entityClassName' => Calendar::class, 'entityClassName' => Calendar::class,
'entityId' => $entity->getId(), 'entityId' => $entity->getId(),
'template' => $template->getId(), 'template' => $template->getId(),
'returnPath' => $this->generateUrl('chill_calendar_calendar_edit', ['id' => $entity->getId()]),
]); ]);
} }
} }
@ -526,14 +530,20 @@ class CalendarController extends AbstractController
'comment' => $calendar->getComment()->getComment(), 'comment' => $calendar->getComment()->getComment(),
]; ];
return $this->redirectToRoute( $routeParams = [
'chill_activity_activity_new',
[
'accompanying_period_id' => $calendar->getAccompanyingPeriod()->getId(),
'activityData' => $activityData, 'activityData' => $activityData,
'returnPath' => $request->query->get('returnPath', null), 'returnPath' => $request->query->get('returnPath', null),
] ];
);
if ($calendar->getContext() === 'accompanying_period') {
$routeParams['accompanying_period_id'] = $calendar->getAccompanyingPeriod()->getId();
} elseif ($calendar->getContext() === 'person') {
$routeParams['person_id'] = $calendar->getPerson()->getId();
} else {
throw new RuntimeException('context not found for this calendar');
}
return $this->redirectToRoute('chill_activity_activity_new', $routeParams);
} }
private function buildListFilterOrder(): FilterOrderHelper private function buildListFilterOrder(): FilterOrderHelper
@ -544,21 +554,6 @@ class CalendarController extends AbstractController
return $filterOrder->build(); return $filterOrder->build();
} }
private function buildParamsToUrl(?User $user, ?AccompanyingPeriod $accompanyingPeriod): array
{
$params = [];
if (null !== $user) {
$params['user_id'] = $user->getId();
}
if (null !== $accompanyingPeriod) {
$params['id'] = $accompanyingPeriod->getId();
}
return $params;
}
/** /**
* Creates a form to delete a Calendar entity by id. * Creates a form to delete a Calendar entity by id.
*/ */

View File

@ -145,6 +145,9 @@ class CalendarDocController
$returnParams = ['id' => $calendarDoc->getCalendar()->getPerson()->getId()]; $returnParams = ['id' => $calendarDoc->getCalendar()->getPerson()->getId()];
break; break;
default:
throw new \LogicException(sprintf("This context '%s' is not supported", $calendarDoc->getCalendar()->getContext()));
} }
$form = $this->formFactory->createBuilder() $form = $this->formFactory->createBuilder()

View File

@ -29,6 +29,7 @@ use DateTimeImmutable;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria; use Doctrine\Common\Collections\Criteria;
use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use LogicException; use LogicException;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
@ -92,6 +93,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
/** /**
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod", inversedBy="calendars") * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod", inversedBy="calendars")
* @Serializer\Groups({"calendar:read", "read"})
*/ */
private ?AccompanyingPeriod $accompanyingPeriod = null; private ?AccompanyingPeriod $accompanyingPeriod = null;
@ -507,12 +509,14 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
} }
/** /**
* @return Collection|User[] * @return ReadableCollection<(int|string), User>
* @Serializer\Groups({"calendar:read", "read"}) * @Serializer\Groups({"calendar:read", "read"})
*/ */
public function getUsers(): Collection public function getUsers(): ReadableCollection
{ {
return $this->getInvites()->map(static function (Invite $i) { return $i->getUser(); }); return $this->getInvites()->map(static function (Invite $i) {
return $i->getUser();
});
} }
public function hasCalendarRange(): bool public function hasCalendarRange(): bool
@ -597,7 +601,9 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
} }
$invite = $this->invites $invite = $this->invites
->filter(static function (Invite $invite) use ($user) { return $invite->getUser() === $user; }) ->filter(static function (Invite $invite) use ($user) {
return $invite->getUser() === $user;
})
->first(); ->first();
$this->removeInvite($invite); $this->removeInvite($invite);

View File

@ -44,14 +44,7 @@ class UrgencyAggregator implements AggregatorInterface
public function alterQuery(QueryBuilder $qb, $data) public function alterQuery(QueryBuilder $qb, $data)
{ {
$qb->addSelect('cal.urgent AS urgency_aggregator'); $qb->addSelect('cal.urgent AS urgency_aggregator');
$groupBy = $qb->getDQLPart('groupBy');
if (!empty($groupBy)) {
$qb->addGroupBy('urgency_aggregator'); $qb->addGroupBy('urgency_aggregator');
} else {
$qb->groupBy('urgency_aggregator');
}
} }
public function applyOn(): string public function applyOn(): string

View File

@ -52,7 +52,7 @@ class CountCalendars implements ExportInterface, GroupedExportInterface
return 'Exports of calendar'; return 'Exports of calendar';
} }
public function getLabels($key, array $values, $data): Closure public function getLabels($key, array $values, $data)
{ {
if ('export_result' !== $key) { if ('export_result' !== $key) {
throw new LogicException("the key {$key} is not used by this export"); throw new LogicException("the key {$key} is not used by this export");

View File

@ -49,23 +49,11 @@ class CalendarRangeFilter implements FilterInterface
public function alterQuery(QueryBuilder $qb, $data) public function alterQuery(QueryBuilder $qb, $data)
{ {
$where = $qb->getDQLPart('where'); if (null !== $data['hasCalendarRange']) {
$qb->andWhere($qb->expr()->isNotNull('cal.calendarRange'));
dump($data);
if ($data['hasCalendarRange']) {
$clause = $qb->expr()->isNotNull('cal.calendarRange');
} else { } else {
$clause = $qb->expr()->isNull('cal.calendarRange'); $qb->andWhere($qb->expr()->isNull('cal.calendarRange'));
} }
if ($where instanceof Andx) {
$where->add($clause);
} else {
$where = $qb->expr()->andX($clause);
}
$qb->add('where', $where);
} }
public function applyOn(): string public function applyOn(): string
@ -87,6 +75,8 @@ class CalendarRangeFilter implements FilterInterface
public function describeAction($data, $format = 'string'): array public function describeAction($data, $format = 'string'): array
{ {
$choice = '';
foreach (self::CHOICES as $k => $v) { foreach (self::CHOICES as $k => $v) {
if ($v === $data['hasCalendarRange']) { if ($v === $data['hasCalendarRange']) {
$choice = $k; $choice = $k;

View File

@ -26,9 +26,6 @@ class CalendarDocEditType extends AbstractType
->add('title', TextType::class, [ ->add('title', TextType::class, [
'label' => 'chill_calendar.Document title', 'label' => 'chill_calendar.Document title',
'required' => true, 'required' => true,
])
->add('doc', StoredObjectType::class, [
'label' => 'chill_calendar.Document object',
]); ]);
} }

View File

@ -22,6 +22,9 @@ use Chill\CalendarBundle\Entity\Calendar;
use Chill\CalendarBundle\Messenger\Message\CalendarMessage; use Chill\CalendarBundle\Messenger\Message\CalendarMessage;
use Chill\CalendarBundle\Messenger\Message\CalendarRemovedMessage; use Chill\CalendarBundle\Messenger\Message\CalendarRemovedMessage;
use Doctrine\ORM\Event\LifecycleEventArgs; use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PostPersistEventArgs;
use Doctrine\ORM\Event\PostRemoveEventArgs;
use Doctrine\ORM\Event\PostUpdateEventArgs;
use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\Security;
@ -37,7 +40,7 @@ class CalendarEntityListener
$this->security = $security; $this->security = $security;
} }
public function postPersist(Calendar $calendar, LifecycleEventArgs $args): void public function postPersist(Calendar $calendar, PostPersistEventArgs $args): void
{ {
if (!$calendar->preventEnqueueChanges) { if (!$calendar->preventEnqueueChanges) {
$this->messageBus->dispatch( $this->messageBus->dispatch(
@ -50,7 +53,7 @@ class CalendarEntityListener
} }
} }
public function postRemove(Calendar $calendar, LifecycleEventArgs $args): void public function postRemove(Calendar $calendar, PostRemoveEventArgs $args): void
{ {
if (!$calendar->preventEnqueueChanges) { if (!$calendar->preventEnqueueChanges) {
$this->messageBus->dispatch( $this->messageBus->dispatch(
@ -62,7 +65,7 @@ class CalendarEntityListener
} }
} }
public function postUpdate(Calendar $calendar, LifecycleEventArgs $args): void public function postUpdate(Calendar $calendar, PostUpdateEventArgs $args): void
{ {
if (!$calendar->preventEnqueueChanges) { if (!$calendar->preventEnqueueChanges) {
$this->messageBus->dispatch( $this->messageBus->dispatch(

View File

@ -22,6 +22,9 @@ use Chill\CalendarBundle\Entity\CalendarRange;
use Chill\CalendarBundle\Messenger\Message\CalendarRangeMessage; use Chill\CalendarBundle\Messenger\Message\CalendarRangeMessage;
use Chill\CalendarBundle\Messenger\Message\CalendarRangeRemovedMessage; use Chill\CalendarBundle\Messenger\Message\CalendarRangeRemovedMessage;
use Doctrine\ORM\Event\LifecycleEventArgs; use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PostPersistEventArgs;
use Doctrine\ORM\Event\PostRemoveEventArgs;
use Doctrine\ORM\Event\PostUpdateEventArgs;
use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\Security;
@ -37,7 +40,7 @@ class CalendarRangeEntityListener
$this->security = $security; $this->security = $security;
} }
public function postPersist(CalendarRange $calendarRange, LifecycleEventArgs $eventArgs): void public function postPersist(CalendarRange $calendarRange, PostPersistEventArgs $eventArgs): void
{ {
if (!$calendarRange->preventEnqueueChanges) { if (!$calendarRange->preventEnqueueChanges) {
$this->messageBus->dispatch( $this->messageBus->dispatch(
@ -50,7 +53,7 @@ class CalendarRangeEntityListener
} }
} }
public function postRemove(CalendarRange $calendarRange, LifecycleEventArgs $eventArgs): void public function postRemove(CalendarRange $calendarRange, PostRemoveEventArgs $eventArgs): void
{ {
if (!$calendarRange->preventEnqueueChanges) { if (!$calendarRange->preventEnqueueChanges) {
$this->messageBus->dispatch( $this->messageBus->dispatch(
@ -62,7 +65,7 @@ class CalendarRangeEntityListener
} }
} }
public function postUpdate(CalendarRange $calendarRange, LifecycleEventArgs $eventArgs): void public function postUpdate(CalendarRange $calendarRange, PostUpdateEventArgs $eventArgs): void
{ {
if (!$calendarRange->preventEnqueueChanges) { if (!$calendarRange->preventEnqueueChanges) {
$this->messageBus->dispatch( $this->messageBus->dispatch(

View File

@ -89,10 +89,14 @@ class CalendarToRemoteHandler implements MessageHandlerInterface
$newInvites = array_filter( $newInvites = array_filter(
array_map( array_map(
function ($id) { return $this->inviteRepository->find($id); }, function ($id) {
return $this->inviteRepository->find($id);
},
$calendarMessage->getNewInvitesIds(), $calendarMessage->getNewInvitesIds(),
), ),
static function (?Invite $invite) { return null !== $invite; } static function (?Invite $invite) {
return null !== $invite;
}
); );
$this->calendarConnector->syncCalendar( $this->calendarConnector->syncCalendar(

View File

@ -22,6 +22,7 @@ use Chill\MainBundle\Entity\User;
use DateTimeImmutable; use DateTimeImmutable;
use LogicException; use LogicException;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\HttpClientInterface;
use function array_key_exists; use function array_key_exists;
@ -74,9 +75,18 @@ class MapCalendarToUser
public function getDefaultUserCalendar(string $idOrUserPrincipalName): ?array public function getDefaultUserCalendar(string $idOrUserPrincipalName): ?array
{ {
try {
$value = $this->machineHttpClient->request('GET', "users/{$idOrUserPrincipalName}/calendars", [ $value = $this->machineHttpClient->request('GET', "users/{$idOrUserPrincipalName}/calendars", [
'query' => ['$filter' => 'isDefaultCalendar eq true'], 'query' => ['$filter' => 'isDefaultCalendar eq true'],
])->toArray()['value']; ])->toArray()['value'];
} catch (ClientExceptionInterface $e) {
$this->logger->error('[MapCalendarToUser] Error while listing calendars for a user', [
'http_status_code' => $e->getResponse()->getStatusCode(),
'id_user' => $idOrUserPrincipalName,
]);
return null;
}
return $value[0] ?? null; return $value[0] ?? null;
} }

View File

@ -110,11 +110,11 @@ class CalendarSyncer
$endDate = RemoteEventConverter::convertStringDateWithoutTimezone($new['end']['dateTime']); $endDate = RemoteEventConverter::convertStringDateWithoutTimezone($new['end']['dateTime']);
if ($startDate->getTimestamp() !== $calendar->getStartDate()->getTimestamp()) { if ($startDate->getTimestamp() !== $calendar->getStartDate()->getTimestamp()) {
$calendar->setStartDate($startDate)->setStatus(Calendar::STATUS_MOVED); $calendar->setStartDate($startDate);
} }
if ($endDate->getTimestamp() !== $calendar->getEndDate()->getTimestamp()) { if ($endDate->getTimestamp() !== $calendar->getEndDate()->getTimestamp()) {
$calendar->setEndDate($endDate)->setStatus(Calendar::STATUS_MOVED); $calendar->setEndDate($endDate);
} }
$calendar $calendar

View File

@ -34,6 +34,7 @@ use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
@ -64,6 +65,8 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
private OnBehalfOfUserHttpClient $userHttpClient; private OnBehalfOfUserHttpClient $userHttpClient;
private Security $security;
public function __construct( public function __construct(
CalendarRepository $calendarRepository, CalendarRepository $calendarRepository,
CalendarRangeRepository $calendarRangeRepository, CalendarRangeRepository $calendarRangeRepository,
@ -74,7 +77,8 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
OnBehalfOfUserHttpClient $userHttpClient, OnBehalfOfUserHttpClient $userHttpClient,
RemoteEventConverter $remoteEventConverter, RemoteEventConverter $remoteEventConverter,
TranslatorInterface $translator, TranslatorInterface $translator,
UrlGeneratorInterface $urlGenerator UrlGeneratorInterface $urlGenerator,
Security $security
) { ) {
$this->calendarRepository = $calendarRepository; $this->calendarRepository = $calendarRepository;
$this->calendarRangeRepository = $calendarRangeRepository; $this->calendarRangeRepository = $calendarRangeRepository;
@ -86,6 +90,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
$this->translator = $translator; $this->translator = $translator;
$this->urlGenerator = $urlGenerator; $this->urlGenerator = $urlGenerator;
$this->userHttpClient = $userHttpClient; $this->userHttpClient = $userHttpClient;
$this->security = $security;
} }
public function countEventsForUser(User $user, DateTimeImmutable $startDate, DateTimeImmutable $endDate): int public function countEventsForUser(User $user, DateTimeImmutable $startDate, DateTimeImmutable $endDate): int
@ -133,6 +138,24 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
public function isReady(): bool public function isReady(): bool
{ {
$user = $this->security->getUser();
if (!$user instanceof User) {
// this is not a user from chill. This is not the role of this class to
// restrict access, so we will just say that we do not have to do anything more
// here...
return true;
}
if (null === $this->mapCalendarToUser->getUserId($user)) {
// this user is not mapped with remote calendar. The user will have to wait for
// the next calendar subscription iteration
$this->logger->debug('mark user ready for msgraph calendar as he does not have any mapping', [
'userId' => $user->getId(),
]);
return true;
}
return $this->tokenStorage->hasToken(); return $this->tokenStorage->hasToken();
} }
@ -167,7 +190,9 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
] ]
)->toArray(); )->toArray();
$ids = array_map(static function ($item) { return $item['id']; }, $bareEvents['value']); $ids = array_map(static function ($item) {
return $item['id'];
}, $bareEvents['value']);
$existingIdsInRange = $this->calendarRangeRepository->findRemoteIdsPresent($ids); $existingIdsInRange = $this->calendarRangeRepository->findRemoteIdsPresent($ids);
$existingIdsInCalendar = $this->calendarRepository->findRemoteIdsPresent($ids); $existingIdsInCalendar = $this->calendarRepository->findRemoteIdsPresent($ids);

View File

@ -1,4 +1,4 @@
import {EventInput} from '@fullcalendar/vue3'; import {EventInput} from '@fullcalendar/core';
import {DateTime, Location, User, UserAssociatedInterface} from '../../../ChillMainBundle/Resources/public/types' ; import {DateTime, Location, User, UserAssociatedInterface} from '../../../ChillMainBundle/Resources/public/types' ;
import {Person} from "../../../ChillPersonBundle/Resources/public/types"; import {Person} from "../../../ChillPersonBundle/Resources/public/types";

View File

@ -15,6 +15,7 @@
:picked="null !== this.$store.getters.getMainUser ? [this.$store.getters.getMainUser] : []" :picked="null !== this.$store.getters.getMainUser ? [this.$store.getters.getMainUser] : []"
:removableIfSet="false" :removableIfSet="false"
:displayPicked="false" :displayPicked="false"
:suggested="this.suggestedUsers"
@addNewEntity="setMainUser" @addNewEntity="setMainUser"
></pick-entity> ></pick-entity>
</div> </div>
@ -116,7 +117,6 @@
<script> <script>
import ConcernedGroups from 'ChillActivityAssets/vuejs/Activity/components/ConcernedGroups.vue'; import ConcernedGroups from 'ChillActivityAssets/vuejs/Activity/components/ConcernedGroups.vue';
import Location from 'ChillActivityAssets/vuejs/Activity/components/Location.vue'; import Location from 'ChillActivityAssets/vuejs/Activity/components/Location.vue';
import '@fullcalendar/core/vdom'; // solves problem with Vite
import frLocale from '@fullcalendar/core/locales/fr'; import frLocale from '@fullcalendar/core/locales/fr';
import FullCalendar from '@fullcalendar/vue3'; import FullCalendar from '@fullcalendar/vue3';
import dayGridPlugin from '@fullcalendar/daygrid'; import dayGridPlugin from '@fullcalendar/daygrid';
@ -144,6 +144,7 @@ export default {
slotMinTime: '09:00:00', slotMinTime: '09:00:00',
slotMaxTime: '18:00:00', slotMaxTime: '18:00:00',
hideWeekEnds: true, hideWeekEnds: true,
previousUser: [],
} }
}, },
computed: { computed: {
@ -189,11 +190,23 @@ export default {
users.push(this.$store.getters.getUserDataById(id).user); users.push(this.$store.getters.getUserDataById(id).user);
} }
return users; return users;
},
suggestedUsers() {
const suggested = [];
this.$data.previousUser.forEach(u => {
if (u.id !== this.$store.getters.getMainUser.id) {
suggested.push(u)
} }
});
return suggested;
},
}, },
methods: { methods: {
setMainUser(user) { setMainUser({entity}) {
console.log('setMainUser APP', user); const user = entity;
console.log('setMainUser APP', entity);
if (user.id !== this.$store.getters.getMainUser && ( if (user.id !== this.$store.getters.getMainUser && (
this.$store.state.activity.calendarRange !== null this.$store.state.activity.calendarRange !== null
@ -206,6 +219,14 @@ export default {
} }
} }
// add the previous user, if any, in the previous user list (in use for suggestion)
if (null !== this.$store.getters.getMainUser) {
const suggestedUids = new Set(this.$data.previousUser.map(u => u.id));
if (!suggestedUids.has(this.$store.getters.getMainUser.id)){
this.$data.previousUser.push(this.$store.getters.getMainUser);
}
}
this.$store.dispatch('setMainUser', user); this.$store.dispatch('setMainUser', user);
this.$store.commit('showUserOnCalendar', {user, ranges: true, remotes: true}); this.$store.commit('showUserOnCalendar', {user, ranges: true, remotes: true});
}, },

View File

@ -202,6 +202,8 @@ export default {
return dispatch('associateCalendarToRange', { range: null }).then(() => { return dispatch('associateCalendarToRange', { range: null }).then(() => {
commit('setMainUser', mainUser); commit('setMainUser', mainUser);
return dispatch('fetchCalendarEvents');
}); });
}, },

View File

@ -3,7 +3,7 @@ import {ISOToDatetime} from '../../../../../../ChillMainBundle/Resources/public/
import {DateTime, User} from '../../../../../../ChillMainBundle/Resources/public/types'; import {DateTime, User} from '../../../../../../ChillMainBundle/Resources/public/types';
import {CalendarLight, CalendarRange, CalendarRemote} from '../../../types'; import {CalendarLight, CalendarRange, CalendarRemote} from '../../../types';
import type {EventInputCalendarRange} from '../../../types'; import type {EventInputCalendarRange} from '../../../types';
import {EventInput} from '@fullcalendar/vue3'; import {EventInput} from '@fullcalendar/core';
export interface UserData { export interface UserData {
user: User, user: User,
@ -54,7 +54,7 @@ export const mapEntity = (entity: EventInput): EventInput => {
export const createUserData = (user: User, colorIndex: number): UserData => { export const createUserData = (user: User, colorIndex: number): UserData => {
const colorId = colorIndex % COLORS.length; const colorId = colorIndex % COLORS.length;
console.log('colorId', colorId);
return { return {
user: user, user: user,
calendarRanges: [], calendarRanges: [],

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="row"> <div class="row">
<div class="col-sm"> <div class="col-sm">
<label class="form-label">Lieu des plages de disponibilités créées</label> <label class="form-label">{{ $t('created_availabilities') }}</label>
<vue-multiselect <vue-multiselect
v-model="pickedLocation" v-model="pickedLocation"
:options="locations" :options="locations"
@ -116,13 +116,11 @@
import type { import type {
CalendarOptions, CalendarOptions,
DatesSetArg, DatesSetArg,
EventInput, EventInput
EventInstance } from '@fullcalendar/core';
} from '@fullcalendar/vue3';
import {reactive, computed, ref} from "vue"; import {reactive, computed, ref} from "vue";
import {useStore} from "vuex"; import {useStore} from "vuex";
import {key} from './store'; import {key} from './store';
import '@fullcalendar/core/vdom'; // solves problem with Vite
import FullCalendar from '@fullcalendar/vue3'; import FullCalendar from '@fullcalendar/vue3';
import frLocale from '@fullcalendar/core/locales/fr'; import frLocale from '@fullcalendar/core/locales/fr';
import interactionPlugin, {DropArg, EventResizeDoneArg} from "@fullcalendar/interaction"; import interactionPlugin, {DropArg, EventResizeDoneArg} from "@fullcalendar/interaction";

View File

@ -26,7 +26,7 @@
<script setup lang="ts"> <script setup lang="ts">
import Modal from "../../../../../../ChillMainBundle/Resources/public/vuejs/_components/Modal.vue"; import Modal from "../../../../../../ChillMainBundle/Resources/public/vuejs/_components/Modal.vue";
import {computed, ref} from "vue"; import {computed, ref} from "vue";
import {EventApi} from "@fullcalendar/vue3"; import {EventApi} from "@fullcalendar/core";
import {useStore} from "vuex"; import {useStore} from "vuex";
import {key} from "../store"; import {key} from "../store";
import {Location} from "../../../../../../ChillMainBundle/Resources/public/types"; import {Location} from "../../../../../../ChillMainBundle/Resources/public/types";

View File

@ -1,5 +1,6 @@
const appMessages = { const appMessages = {
fr: { fr: {
created_availabilities: "Lieu des plages de disponibilités créées",
edit_your_calendar_range: "Planifiez vos plages de disponibilités", edit_your_calendar_range: "Planifiez vos plages de disponibilités",
show_my_calendar: "Afficher mon calendrier", show_my_calendar: "Afficher mon calendrier",
show_weekends: "Afficher les week-ends", show_weekends: "Afficher les week-ends",

View File

@ -2,7 +2,7 @@ import {State} from './../index';
import {ActionContext, Module} from 'vuex'; import {ActionContext, Module} from 'vuex';
import {CalendarLight} from '../../../../types'; import {CalendarLight} from '../../../../types';
import {fetchCalendarLocalForUser} from '../../../Calendar/api'; import {fetchCalendarLocalForUser} from '../../../Calendar/api';
import {EventInput} from '@fullcalendar/vue3'; import {EventInput} from '@fullcalendar/core';
import {localsToFullCalendarEvent} from "../../../Calendar/store/utils"; import {localsToFullCalendarEvent} from "../../../Calendar/store/utils";
import {TransportExceptionInterface} from "../../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods"; import {TransportExceptionInterface} from "../../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods";
import {COLORS} from "../../../Calendar/const"; import {COLORS} from "../../../Calendar/const";

View File

@ -4,7 +4,7 @@ import {CalendarRange, CalendarRangeCreate, CalendarRangeEdit, isEventInputCalen
import {Location} from "../../../../../../../ChillMainBundle/Resources/public/types"; import {Location} from "../../../../../../../ChillMainBundle/Resources/public/types";
import {fetchCalendarRangeForUser} from '../../../Calendar/api'; import {fetchCalendarRangeForUser} from '../../../Calendar/api';
import {calendarRangeToFullCalendarEvent} from '../../../Calendar/store/utils'; import {calendarRangeToFullCalendarEvent} from '../../../Calendar/store/utils';
import {EventInput} from '@fullcalendar/vue3'; import {EventInput} from '@fullcalendar/core';
import {makeFetch} from "../../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods"; import {makeFetch} from "../../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods";
import { import {
datetimeToISO, datetimeToISO,

View File

@ -2,7 +2,7 @@ import {State} from './../index';
import {ActionContext, Module} from 'vuex'; import {ActionContext, Module} from 'vuex';
import {CalendarRemote} from '../../../../types'; import {CalendarRemote} from '../../../../types';
import {fetchCalendarRemoteForUser} from '../../../Calendar/api'; import {fetchCalendarRemoteForUser} from '../../../Calendar/api';
import {EventInput, EventSource} from '@fullcalendar/vue3'; import {EventInput} from '@fullcalendar/core';
import {remoteToFullCalendarEvent} from "../../../Calendar/store/utils"; import {remoteToFullCalendarEvent} from "../../../Calendar/store/utils";
import {TransportExceptionInterface} from "../../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods"; import {TransportExceptionInterface} from "../../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods";
import {COLORS} from "../../../Calendar/const"; import {COLORS} from "../../../Calendar/const";

View File

@ -20,15 +20,24 @@
<div class="row"> <div class="row">
<div class="col text-start"> <div class="col text-start">
{{ d.storedObject.title }} {{ d.storedObject.title }}
</div>
{% if d.dateTimeVersion < d.calendar.dateTimeVersion %} {% if d.dateTimeVersion < d.calendar.dateTimeVersion %}
<div class="col text-start">
<span class="badge bg-danger">{{ 'chill_calendar.Document outdated'|trans }}</span> <span class="badge bg-danger">{{ 'chill_calendar.Document outdated'|trans }}</span>
</div>
{% endif %} {% endif %}
</div>
<div class="col-md-auto text-center">
{{ mm.mimeIcon(d.storedObject.type) }}
</div>
<div class="col col-lg-4 text-end"> <div class="col col-lg-4 text-end">
<ul class="record_actions">
<li>
{{ d.storedObject|chill_document_button_group(d.storedObject.title, is_granted('CHILL_CALENDAR_DOC_EDIT', d), {'small': true}) }} {{ d.storedObject|chill_document_button_group(d.storedObject.title, is_granted('CHILL_CALENDAR_DOC_EDIT', d), {'small': true}) }}
</li>
<li>
<a href="{{ chill_path_add_return_path('chill_calendar_calendardoc_edit', {id: d.id}) }}" class="btn btn-sm btn-edit"></a>
</li>
<li>
<a href="{{ chill_path_add_return_path('chill_calendar_calendardoc_delete', {id: d.id}) }}" class="btn btn-sm btn-delete"></a>
</li>
</ul>
</div> </div>
</div> </div>
</li> </li>

View File

@ -110,7 +110,46 @@
</div> </div>
</div> </div>
<div class="item-row"> {% if calendar.activity is not null %}
<div class="item-row separator">
<div class="item-col">
<div class="wrap-list">
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Activity'|trans }}</h3></div>
<div class="wl-col list activity-linked">
<h2 class="badge-title">
<span class="title_label"></span>
<span class="title_action">
{{ calendar.activity.type.name | localize_translatable_string }}
{% if calendar.activity.emergency %}
<span class="badge bg-danger rounded-pill fs-6 float-end">{{ 'Emergency'|trans|upper }}</span>
{% endif %}
</span>
</h2>
<ul class="record_actions">
<li class="cancel">
<span class="createdBy">
{{ 'Created by'|trans }}
<b>{{ calendar.activity.createdBy|chill_entity_render_string }}</b>, {{ 'on'|trans }} {{ calendar.activity.createdAt|format_datetime('short', 'short') }}
</span>
</li>
{% if is_granted('CHILL_ACTIVITY_SEE', calendar.activity) %}
<li>
<a href="{{ chill_path_add_return_path('chill_activity_activity_show', {'id': calendar.activity.id}) }}" class="btn btn-sm btn-show" ></a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
</div>
</div>
{% endif %}
<div class="item-row separator">
<ul class="record_actions"> <ul class="record_actions">
{% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', calendar) %} {% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', calendar) %}
{% if templates|length == 0 %} {% if templates|length == 0 %}
@ -147,7 +186,12 @@
</li> </li>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if accompanyingCourse is defined and is_granted('CHILL_ACTIVITY_CREATE', accompanyingCourse) and calendar.activity is null %} {% if calendar.activity is null and (
(calendar.context == 'accompanying_period' and is_granted('CHILL_ACTIVITY_CREATE', calendar.accompanyingPeriod))
or
(calendar.context == 'person' and is_granted('CHILL_ACTIVITY_CREATE', calendar.person))
)
%}
<li> <li>
<a class="btn btn-create" <a class="btn btn-create"
href="{{ chill_path_add_return_path('chill_calendar_calendar_to_activity', { 'id': calendar.id }) }}"> href="{{ chill_path_add_return_path('chill_calendar_calendar_to_activity', { 'id': calendar.id }) }}">

View File

@ -9,13 +9,13 @@
{% block js %} {% block js %}
{{ parent() }} {{ parent() }}
{{ encore_entry_script_tags('mod_answer') }} {{ encore_entry_script_tags('mod_answer') }}
{{ encore_entry_script_tags('mod_async_upload') }} {{ encore_entry_script_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block css %} {% block css %}
{{ parent() }} {{ parent() }}
{{ encore_entry_link_tags('mod_answer') }} {{ encore_entry_link_tags('mod_answer') }}
{{ encore_entry_link_tags('mod_async_upload') }} {{ encore_entry_link_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -24,7 +24,6 @@
{{ form_start(form) }} {{ form_start(form) }}
{{ form_row(form.title) }} {{ form_row(form.title) }}
{{ form_row(form.doc) }}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">

View File

@ -23,7 +23,6 @@
{{ form_start(form) }} {{ form_start(form) }}
{{ form_row(form.title) }} {{ form_row(form.title) }}
{{ form_row(form.doc) }}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">

View File

@ -28,7 +28,7 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a class="btn btn-cancel" href="{{ chill_return_path_or('chill_calendar_calendar_list_by_accompanying_period', {'id': accompanyingCourse.id }) }}">{{ 'Cancel'|trans|chill_return_path_label }}</a> <a class="btn btn-cancel" href="{{ chill_return_path_or('chill_calendar_calendar_edit', {'id': calendar_doc.calendar.id }) }}">{{ 'Cancel'|trans|chill_return_path_label }}</a>
</li> </li>
<li> <li>

View File

@ -148,15 +148,13 @@ final class CalendarContext implements CalendarContextInterface
} }
/** /**
* @param array{mainPerson?: Person, thirdParty?: ThirdParty, title: string} $contextGenerationData
* @param mixed $entity
*/ */
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array public function getData(DocGeneratorTemplate $template, mixed $entity, array $contextGenerationData = []): array
{ {
$options = $this->getOptions($template); $options = $this->getOptions($template);
$data = array_merge( $data = array_merge(
$this->baseContextData->getData(), $this->baseContextData->getData($contextGenerationData['creator'] ?? null),
[ [
'calendar' => $this->normalizer->normalize($entity, 'docgen', ['docgen:expects' => Calendar::class, 'groups' => ['docgen:read']]), 'calendar' => $this->normalizer->normalize($entity, 'docgen', ['docgen:expects' => Calendar::class, 'groups' => ['docgen:read']]),
] ]
@ -272,9 +270,6 @@ final class CalendarContext implements CalendarContextInterface
return $denormalized; return $denormalized;
} }
/**
* param array{mainPerson?: Person, thirdParty?: ThirdParty, title: string} $contextGenerationData
*/
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
{ {
$options = $this->getOptions($template); $options = $this->getOptions($template);
@ -285,9 +280,6 @@ final class CalendarContext implements CalendarContextInterface
$this->entityManager->persist($doc); $this->entityManager->persist($doc);
} }
/**
* @return array{askMainPerson: bool, mainPersonLabel: ?string, askThirdParty: bool, thirdPartyLabel: ?string, trackDateTime: bool} $options
*/
private function getOptions(DocGeneratorTemplate $template): array private function getOptions(DocGeneratorTemplate $template): array
{ {
return $template->getOptions(); return $template->getOptions();

View File

@ -12,56 +12,17 @@ declare(strict_types=1);
namespace Chill\CalendarBundle\Service\DocGenerator; namespace Chill\CalendarBundle\Service\DocGenerator;
use Chill\CalendarBundle\Entity\Calendar; use Chill\CalendarBundle\Entity\Calendar;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextInterface;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithAdminFormInterface; use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithAdminFormInterface;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface; use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Chill\DocStoreBundle\Entity\StoredObject; use Chill\DocStoreBundle\Entity\StoredObject;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
/**
* @extends DocGeneratorContextWithPublicFormInterface<Calendar>
* @extends DocGeneratorContextWithAdminFormInterface<Calendar>
*/
interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface
{ {
public function adminFormReverseTransform(array $data): array;
public function adminFormTransform(array $data): array;
public function buildAdminForm(FormBuilderInterface $builder): void;
/**
* @param Calendar $entity
*/
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void;
/**
* @param Calendar $entity
*/
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array;
public function getDescription(): string;
public function getEntityClass(): string;
/**
* @param Calendar $entity
*/
public function getFormData(DocGeneratorTemplate $template, $entity): array;
public static function getKey(): string;
public function getName(): string;
public function hasAdminForm(): bool;
/**
* @param Calendar $entity
*/
public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool;
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array;
public function contextGenerationDataDenormalize(DocGeneratorTemplate $template, $entity, array $data): array;
/**
* @param Calendar $entity
*/
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void;
} }

View File

@ -114,8 +114,12 @@ final class CalendarTypeTest extends TypeTestCase
$this->assertEquals(8, $calendar->getCalendarRange()->getId()); $this->assertEquals(8, $calendar->getCalendarRange()->getId());
$this->assertEquals(9, $calendar->getLocation()->getId()); $this->assertEquals(9, $calendar->getLocation()->getId());
$this->assertEquals(true, $calendar->getSendSMS()); $this->assertEquals(true, $calendar->getSendSMS());
$this->assertContains(2, $calendar->getUsers()->map(static function (User $u) { return $u->getId(); })); $this->assertContains(2, $calendar->getUsers()->map(static function (User $u) {
$this->assertContains(3, $calendar->getUsers()->map(static function (User $u) { return $u->getId(); })); return $u->getId();
}));
$this->assertContains(3, $calendar->getUsers()->map(static function (User $u) {
return $u->getId();
}));
} }
protected function getExtensions() protected function getExtensions()
@ -147,7 +151,9 @@ final class CalendarTypeTest extends TypeTestCase
->will(static function ($args) { ->will(static function ($args) {
return implode( return implode(
',', ',',
array_map(static function ($p) { return $p->getId(); }, $args[0]) array_map(static function ($p) {
return $p->getId();
}, $args[0])
); );
}); });
$transformer->transform(Argument::exact(null)) $transformer->transform(Argument::exact(null))
@ -156,7 +162,9 @@ final class CalendarTypeTest extends TypeTestCase
->will(static function ($args) { ->will(static function ($args) {
return implode( return implode(
',', ',',
array_map(static function ($p) { return $p->getId(); }, $args[0]->toArray()) array_map(static function ($p) {
return $p->getId();
}, $args[0]->toArray())
); );
}); });
$transformer->reverseTransform(Argument::type('string')) $transformer->reverseTransform(Argument::type('string'))

View File

@ -205,7 +205,7 @@ final class CalendarContextTest extends TestCase
?NormalizerInterface $normalizer = null ?NormalizerInterface $normalizer = null
): CalendarContext { ): CalendarContext {
$baseContext = $this->prophesize(BaseContextData::class); $baseContext = $this->prophesize(BaseContextData::class);
$baseContext->getData()->willReturn(['base_context' => 'data']); $baseContext->getData(null)->willReturn(['base_context' => 'data']);
$personRender = $this->prophesize(PersonRender::class); $personRender = $this->prophesize(PersonRender::class);
$personRender->renderString(Argument::type(Person::class), [])->willReturn('person name'); $personRender->renderString(Argument::type(Person::class), [])->willReturn('person name');

View File

@ -132,8 +132,8 @@ docgen:
Base context for calendar: 'Rendez-vous: contexte de base' Base context for calendar: 'Rendez-vous: contexte de base'
A base context for generating document on calendar: Contexte pour générer des documents à partir des rendez-vous A base context for generating document on calendar: Contexte pour générer des documents à partir des rendez-vous
Track changes on datetime and warn user if date time is updated after the doc generation: Suivre les changements sur le document et prévenir les utilisateurs que la date et l'heure ont été modifiée après la génération du document Track changes on datetime and warn user if date time is updated after the doc generation: Suivre les changements sur le document et prévenir les utilisateurs que la date et l'heure ont été modifiée après la génération du document
Ask main person: Demander de choisir une personne parmi les participants aux rendez-vous Ask main person: Demander de choisir un usager parmi les participants aux rendez-vous
Main person label: Label pour choisir la personne Main person label: Label pour choisir l'usager
Ask third party: Demander de choisir un tiers parmi les participants aux rendez-vous Ask third party: Demander de choisir un tiers parmi les participants aux rendez-vous
Third party label: Label pour choisir le tiers Third party label: Label pour choisir le tiers
Destinee: Destinataire Destinee: Destinataire

View File

@ -1,5 +1,5 @@
calendar: calendar:
At least {{ limit }} person is required.: Au moins {{ limit }} personne doit être associée à ce rendez-vous At least {{ limit }} person is required.: Au moins {{ limit }} usager doit être associée à ce rendez-vous
An end date is required: Indiquez une date et heure de fin An end date is required: Indiquez une date et heure de fin
A start date is required: Indiquez une date et heure de début A start date is required: Indiquez une date et heure de début
A location is required: Indiquez un lieu A location is required: Indiquez un lieu

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