mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
merge add-module-emploi into testing
This commit is contained in:
commit
66570cd430
5
.changes/unreleased/Feature-20231212-154841.yaml
Normal file
5
.changes/unreleased/Feature-20231212-154841.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
kind: Feature
|
||||
body: '[DX] move async-upload-bundle features into chill-bundles'
|
||||
time: 2023-12-12T15:48:41.954970271+01:00
|
||||
custom:
|
||||
Issue: "221"
|
6
.changes/unreleased/Fixed-20240410-103736.yaml
Normal file
6
.changes/unreleased/Fixed-20240410-103736.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
kind: Fixed
|
||||
body: Fix resolving of centers for an household, which will fix in turn the access
|
||||
control
|
||||
time: 2024-04-10T10:37:36.462484988+02:00
|
||||
custom:
|
||||
Issue: ""
|
94
.env
Normal file
94
.env
Normal file
@ -0,0 +1,94 @@
|
||||
# * .env contains default values for the environment variables needed by the app
|
||||
# * .env.local uncommitted file with local overrides
|
||||
# * .env.$APP_ENV committed environment-specific defaults
|
||||
# * .env.$APP_ENV.local uncommitted environment-specific overrides
|
||||
#
|
||||
# Real environment variables win over .env files.
|
||||
#
|
||||
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
|
||||
# https://symfony.com/doc/current/configuration/secrets.html
|
||||
#
|
||||
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
|
||||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
||||
|
||||
## Locale
|
||||
LOCALE=fr
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
# this should be set in docker-compose.yml file
|
||||
APP_ENV=prod
|
||||
APP_SECRET=ChangeItf2b58287ef7f9976409d3f6c72529e99ChangeIt
|
||||
TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
||||
TRUSTED_HOSTS='^(localhost|example\.com|nginx)$'
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
## Wopi server for editing documents online
|
||||
WOPI_SERVER=http://collabora:9980
|
||||
|
||||
# must be manually set in .env.local
|
||||
# ADMIN_PASSWORD=
|
||||
|
||||
###> symfony/mailer ###
|
||||
# MAILER_DSN=null://null
|
||||
###< symfony/mailer ###
|
||||
|
||||
## Notifications
|
||||
NOTIFICATION_HOST=localhost:8001
|
||||
NOTIFICATION_FROM_EMAIL=admin@chill.social
|
||||
NOTIFICATION_FROM_NAME="Chill <admin@chill.social>"
|
||||
|
||||
## Pgadmin credential
|
||||
PGADMIN_DEFAULT_EMAIL=
|
||||
PGADMIN_DEFAULT_PASSWORD=
|
||||
|
||||
## OVH OpenStack Storage Container
|
||||
ASYNC_UPLOAD_TEMP_URL_KEY=
|
||||
ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
|
||||
ASYNC_UPLOAD_TEMP_URL_CONTAINER=
|
||||
|
||||
## Redis Cache
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
|
||||
|
||||
## Twilio
|
||||
TWILIO_SID=~
|
||||
TWILIO_SECRET=~
|
||||
DEFAULT_CARRIER_CODE=BE
|
||||
|
||||
ADD_ADDRESS_DEFAULT_COUNTRY=BE
|
||||
|
||||
ADD_ADDRESS_MAP_CENTER_X=50.8443
|
||||
ADD_ADDRESS_MAP_CENTER_Y=4.3523
|
||||
ADD_ADDRESS_MAP_CENTER_Z=15
|
||||
|
||||
SHORT_MESSAGE_DSN=null://null
|
||||
|
||||
## DOCKER IMAGES REGISTRY
|
||||
#IMAGE_PHP=
|
||||
#IMAGE_NGINX=
|
||||
|
||||
## DOCKER IMAGES TAG
|
||||
#VERSION=test
|
||||
#VERSION=prod
|
||||
|
||||
###> symfony/messenger ###
|
||||
# Choose one of the transports below
|
||||
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
|
||||
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
|
||||
MESSENGER_TRANSPORT_DSN=sync://
|
||||
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
||||
###< symfony/messenger ###
|
||||
|
||||
###> doctrine/doctrine-bundle ###
|
||||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
||||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
|
||||
#
|
||||
DATABASE_URL="postgresql://postgres:postgres@db:5432/postgres?serverVersion=14&charset=utf8"
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
###> lexik/jwt-authentication-bundle ###
|
||||
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
|
||||
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
|
||||
JWT_PASSPHRASE=2a30f6ba26521a2613821da35f28386e
|
||||
###< lexik/jwt-authentication-bundle ###
|
@ -4,6 +4,8 @@
|
||||
KERNEL_CLASS='App\Kernel'
|
||||
APP_SECRET='$ecretf0rt3st'
|
||||
|
||||
TRUSTED_HOSTS=
|
||||
|
||||
ADMIN_PASSWORD=password
|
||||
|
||||
LOCALE=fr
|
||||
|
@ -20,6 +20,7 @@ services:
|
||||
|
||||
# Set any variables we need
|
||||
variables:
|
||||
APP_ENV: test
|
||||
GIT_DEPTH: 1
|
||||
# Configure postgres environment variables (https://hub.docker.com/r/_/postgres/)
|
||||
POSTGRES_USER: postgres
|
||||
@ -35,7 +36,7 @@ variables:
|
||||
# force a timezone
|
||||
TZ: Europe/Brussels
|
||||
# avoid direct deprecations (using symfony phpunit bridge: https://symfony.com/doc/4.x/components/phpunit_bridge.html#internal-deprecations
|
||||
SYMFONY_DEPRECATIONS_HELPER: max[total]=99999999&max[self]=0&max[direct]=0&verbose=1
|
||||
SYMFONY_DEPRECATIONS_HELPER: max[total]=99999999&max[self]=0&max[direct]=45&verbose=0
|
||||
|
||||
stages:
|
||||
- Composer install
|
||||
@ -120,7 +121,7 @@ unit_tests:
|
||||
- php tests/console doctrine:migrations:migrate -n --env=test
|
||||
- php tests/console chill:db:sync-views --env=test
|
||||
- php -d memory_limit=2G tests/console cache:clear --env=test
|
||||
- php -d memory_limit=3G tests/console doctrine:fixtures:load -n
|
||||
- php -d memory_limit=3G tests/console doctrine:fixtures:load -n --env=test
|
||||
- php -d memory_limit=4G bin/phpunit --colors=never --exclude-group dbIntensive
|
||||
artifacts:
|
||||
expire_in: 1 day
|
||||
|
@ -112,6 +112,7 @@ $rules = array_merge(
|
||||
],
|
||||
'sort_algorithm' => 'alpha',
|
||||
],
|
||||
'single_line_empty_body' => true,
|
||||
],
|
||||
$rules,
|
||||
$riskyRules,
|
||||
|
117
MIGRATION.md
Normal file
117
MIGRATION.md
Normal file
@ -0,0 +1,117 @@
|
||||
|
||||
# Switch to symfony 5.0
|
||||
|
||||
- the tag `chill.role` is now renamed to `chill_main.provide_role`.
|
||||
|
||||
**Note**: It is not necessary to apply this tag on service definition: the tag is automatically applyied if the
|
||||
service implements `\Chill\MainBundle\Security\ProvideRoleInterface`.
|
||||
|
||||
- those annotation can be converted to attribute:
|
||||
|
||||
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\AccompanyingPeriodValidity`
|
||||
- `Chill\PersonBundle\Validator\Constraints\Household\HouseholdMembershipSequential`
|
||||
- `Chill\PersonBundle\Validator\Constraints\Household\MaxHolder`
|
||||
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ConfidentialCourseMustHaveReferrer`
|
||||
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\LocationValidity`
|
||||
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ParticipationOverlap`
|
||||
- `Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ResourceDuplicateCheck`
|
||||
- `Chill\PersonBundle\Validator\Constraints\Person\Birthdate`
|
||||
- `Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter`
|
||||
- `Chill\PersonBundle\Validator\Constraints\Relationship\RelationshipNoDuplicate`
|
||||
- `Chill\ActivityBundle\Validator\Constraints\ActivityValidity`
|
||||
- `Chill\DocStoreBundle\Validator\Constraints\AsyncFileExists`
|
||||
- `Chill\MainBundle\Validation\Constraint\PhonenumberConstraint`
|
||||
- `Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency`
|
||||
- `Chill\MainBundle\Workflow\Validator\EntityWorkflowCreation`
|
||||
|
||||
Here is the rector rule that can be used to switch attributes to annotations:
|
||||
|
||||
```php
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class, [
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\AccompanyingPeriodValidity'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Household\HouseholdMembershipSequential'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Household\MaxHolder'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ConfidentialCourseMustHaveReferrer'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\LocationValidity'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ParticipationOverlap'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ResourceDuplicateCheck'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Person\Birthdate'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Relationship\RelationshipNoDuplicate'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\ActivityBundle\Validator\Constraints\ActivityValidity'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\DocStoreBundle\Validator\Constraints\AsyncFileExists'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Validation\Constraint\PhonenumberConstraint'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Workflow\Validator\EntityWorkflowCreation'),
|
||||
]);
|
||||
```
|
||||
|
||||
- to keep cleaner definition in container's dependency injection and framework bundle, the definition of crud or api
|
||||
requires to define explicitly a controller.
|
||||
|
||||
Before:
|
||||
|
||||
```php
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'apis' => [
|
||||
[
|
||||
'class' => ThirdParty::class,
|
||||
'name' => 'thirdparty',
|
||||
'base_path' => '/api/1.0/thirdparty/thirdparty',
|
||||
'actions' => [
|
||||
'_entity' => [
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
Request::METHOD_POST => true,
|
||||
Request::METHOD_PUT => true,
|
||||
Request::METHOD_PATCH => true,
|
||||
],
|
||||
'roles' => [
|
||||
Request::METHOD_GET => ThirdPartyVoter::SHOW,
|
||||
Request::METHOD_HEAD => ThirdPartyVoter::SHOW,
|
||||
Request::METHOD_POST => ThirdPartyVoter::CREATE,
|
||||
Request::METHOD_PUT => ThirdPartyVoter::CREATE,
|
||||
Request::METHOD_PATCH => ThirdPartyVoter::CREATE,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
After:
|
||||
|
||||
```php
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'apis' => [
|
||||
[
|
||||
'class' => ThirdParty::class,
|
||||
'controller' => ThirdPartyApiController::class,
|
||||
'name' => 'thirdparty',
|
||||
'base_path' => '/api/1.0/thirdparty/thirdparty',
|
||||
'actions' => [
|
||||
'_entity' => [
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
Request::METHOD_POST => true,
|
||||
Request::METHOD_PUT => true,
|
||||
Request::METHOD_PATCH => true,
|
||||
],
|
||||
'roles' => [
|
||||
Request::METHOD_GET => ThirdPartyVoter::SHOW,
|
||||
Request::METHOD_HEAD => ThirdPartyVoter::SHOW,
|
||||
Request::METHOD_POST => ThirdPartyVoter::CREATE,
|
||||
Request::METHOD_PUT => ThirdPartyVoter::CREATE,
|
||||
Request::METHOD_PATCH => ThirdPartyVoter::CREATE,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
```
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
"ext-json": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-redis": "*",
|
||||
"champs-libres/async-uploader-bundle": "dev-sf4#d57134aee8e504a83c902ff0cf9f8d36ac418290",
|
||||
"champs-libres/wopi-bundle": "dev-master@dev",
|
||||
"champs-libres/wopi-lib": "dev-master@dev",
|
||||
"doctrine/doctrine-bundle": "^2.1",
|
||||
@ -34,27 +33,47 @@
|
||||
"ramsey/uuid-doctrine": "^1.7",
|
||||
"sensio/framework-extra-bundle": "^5.5",
|
||||
"spomky-labs/base64url": "^2.0",
|
||||
"symfony/browser-kit": "^4.4",
|
||||
"symfony/asset": "^5.4",
|
||||
"symfony/browser-kit": "^5.4",
|
||||
"symfony/cache": "^5.4",
|
||||
"symfony/clock": "^6.2",
|
||||
"symfony/css-selector": "^4.4",
|
||||
"symfony/expression-language": "^4.4",
|
||||
"symfony/form": "^4.4",
|
||||
"symfony/framework-bundle": "^4.4",
|
||||
"symfony/http-client": "^4.4 || ^5",
|
||||
"symfony/http-foundation": "^4.4",
|
||||
"symfony/intl": "^4.4",
|
||||
"symfony/config": "^5.4",
|
||||
"symfony/console": "^5.4",
|
||||
"symfony/css-selector": "^5.4",
|
||||
"symfony/dom-crawler": "^5.4",
|
||||
"symfony/error-handler": "^5.4",
|
||||
"symfony/event-dispatcher": "^5.4",
|
||||
"symfony/expression-language": "^5.4",
|
||||
"symfony/filesystem": "^5.4",
|
||||
"symfony/finder": "^5.4",
|
||||
"symfony/form": "^5.4",
|
||||
"symfony/framework-bundle": "^5.4",
|
||||
"symfony/http-client": "^5.4",
|
||||
"symfony/http-foundation": "^5.4",
|
||||
"symfony/intl": "^5.4",
|
||||
"symfony/mailer": "^5.4",
|
||||
"symfony/messenger": "^5.4",
|
||||
"symfony/mime": "^5.4",
|
||||
"symfony/monolog-bundle": "^3.5",
|
||||
"symfony/security-bundle": "^4.4",
|
||||
"symfony/serializer": "^5.3",
|
||||
"symfony/translation": "^4.4",
|
||||
"symfony/twig-bundle": "^4.4",
|
||||
"symfony/validator": "^4.4",
|
||||
"symfony/options-resolver": "^5.4",
|
||||
"symfony/process": "^5.4",
|
||||
"symfony/property-access": "^5.4",
|
||||
"symfony/property-info": "^5.4",
|
||||
"symfony/routing": "^5.4",
|
||||
"symfony/security-bundle": "^5.4",
|
||||
"symfony/security-core": "^5.4",
|
||||
"symfony/security-csrf": "^5.4",
|
||||
"symfony/security-guard": "^5.4",
|
||||
"symfony/security-http": "^5.4",
|
||||
"symfony/serializer": "^5.4",
|
||||
"symfony/string": "^5.4",
|
||||
"symfony/templating": "^5.4",
|
||||
"symfony/translation": "^5.4",
|
||||
"symfony/twig-bundle": "^5.4",
|
||||
"symfony/validator": "^5.4",
|
||||
"symfony/webpack-encore-bundle": "^1.11",
|
||||
"symfony/workflow": "^4.4",
|
||||
"symfony/yaml": "^4.4",
|
||||
"symfony/workflow": "^5.4",
|
||||
"symfony/yaml": "^5.4",
|
||||
"thenetworg/oauth2-azure": "^2.0",
|
||||
"twig/extra-bundle": "^3.0",
|
||||
"twig/intl-extra": "^3.0",
|
||||
@ -74,16 +93,14 @@
|
||||
"phpstan/phpstan-deprecation-rules": "^1.1",
|
||||
"phpstan/phpstan-strict-rules": "^1.0",
|
||||
"phpunit/phpunit": ">= 7.5",
|
||||
"psalm/plugin-phpunit": "^0.18.4",
|
||||
"psalm/plugin-symfony": "^4.0.2",
|
||||
"rector/rector": "^0.17.7",
|
||||
"symfony/debug-bundle": "^5.1",
|
||||
"symfony/dotenv": "^4.4",
|
||||
"rector/rector": "^1.0.0",
|
||||
"symfony/debug-bundle": "^5.4",
|
||||
"symfony/dotenv": "^5.4",
|
||||
"symfony/maker-bundle": "^1.20",
|
||||
"symfony/phpunit-bridge": "^4.4",
|
||||
"symfony/stopwatch": "^4.4",
|
||||
"symfony/var-dumper": "^4.4",
|
||||
"vimeo/psalm": "^4.30.0"
|
||||
"symfony/phpunit-bridge": "^5.4",
|
||||
"symfony/runtime": "^5.4",
|
||||
"symfony/stopwatch": "^5.4",
|
||||
"symfony/var-dumper": "^5.4"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/symfony": "*"
|
||||
@ -98,6 +115,8 @@
|
||||
"Chill\\DocGeneratorBundle\\": "src/Bundle/ChillDocGeneratorBundle",
|
||||
"Chill\\DocStoreBundle\\": "src/Bundle/ChillDocStoreBundle",
|
||||
"Chill\\EventBundle\\": "src/Bundle/ChillEventBundle",
|
||||
"Chill\\FranceTravailApiBundle\\": "src/Bundle/ChillFranceTravailApiBundle/src",
|
||||
"Chill\\JobBundle\\": "src/Bundle/ChillJobBundle/src",
|
||||
"Chill\\MainBundle\\": "src/Bundle/ChillMainBundle",
|
||||
"Chill\\PersonBundle\\": "src/Bundle/ChillPersonBundle",
|
||||
"Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle",
|
||||
|
@ -21,7 +21,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
// add specific role for this filter
|
||||
public function addRole()
|
||||
public function addRole(): ?string
|
||||
{
|
||||
// we do not need any new role for this filter, so we return null
|
||||
return null;
|
||||
|
@ -15,9 +15,12 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class example extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry)
|
||||
{
|
||||
}
|
||||
public function yourAction()
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
// first, get the number of total item are available
|
||||
$total = $em
|
||||
->createQuery('SELECT COUNT (item.id) FROM ChillMyBundle:Item item')
|
||||
|
@ -18,6 +18,9 @@ use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry)
|
||||
{
|
||||
}
|
||||
/**
|
||||
* @param int $id personId
|
||||
*
|
||||
@ -48,7 +51,7 @@ class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\
|
||||
);
|
||||
|
||||
// create a query which take circles into account
|
||||
$consultations = $this->getDoctrine()->getManager()
|
||||
$consultations = $this->managerRegistry->getManager()
|
||||
->createQuery('SELECT c FROM ChillHealthBundle:Consultation c '
|
||||
. 'WHERE c.patient = :person AND c.circle IN(:circles) '
|
||||
. 'ORDER BY c.date DESC')
|
||||
|
@ -14,12 +14,15 @@
|
||||
"@ckeditor/ckeditor5-vue": "^4.0.1",
|
||||
"@symfony/webpack-encore": "^4.1.0",
|
||||
"@tsconfig/node14": "^1.0.1",
|
||||
"@types/dompurify": "^3.0.5",
|
||||
"bindings": "^1.5.0",
|
||||
"bootstrap": "5.2.3",
|
||||
"chokidar": "^3.5.1",
|
||||
"dompurify": "^3.1.0",
|
||||
"fork-awesome": "^1.1.7",
|
||||
"jquery": "^3.6.0",
|
||||
"node-sass": "^8.0.0",
|
||||
"marked": "^12.0.1",
|
||||
"popper.js": "^1.16.1",
|
||||
"postcss-loader": "^7.0.2",
|
||||
"raw-loader": "^4.0.2",
|
||||
@ -46,7 +49,7 @@
|
||||
"es6-promise": "^4.2.8",
|
||||
"leaflet": "^1.7.1",
|
||||
"masonry-layout": "^4.2.2",
|
||||
"mime": "^3.0.0",
|
||||
"mime": "^4.0.0",
|
||||
"swagger-ui": "^4.15.5",
|
||||
"vis-network": "^9.1.0",
|
||||
"vue": "^3.2.37",
|
||||
|
58
phpstan-baseline-deprecations-doctrine-orm.neon
Normal file
58
phpstan-baseline-deprecations-doctrine-orm.neon
Normal file
@ -0,0 +1,58 @@
|
||||
# See https://github.com/doctrine/orm/issues/11313 for a follow-up
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: """
|
||||
#^Fetching deprecated class constant ASC of class Doctrine\\\\Common\\\\Collections\\\\Criteria\\:
|
||||
use Order\\:\\:Ascending instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching deprecated class constant ASC of class Doctrine\\\\Common\\\\Collections\\\\Criteria\\:
|
||||
use Order\\:\\:Ascending instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Entity/Notification.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching deprecated class constant DESC of class Doctrine\\\\Common\\\\Collections\\\\Criteria\\:
|
||||
use Order\\:\\:Descending instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching deprecated class constant DESC of class Doctrine\\\\Common\\\\Collections\\\\Criteria\\:
|
||||
use Order\\:\\:Descending instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching deprecated class constant DESC of class Doctrine\\\\Common\\\\Collections\\\\Criteria\\:
|
||||
use Order\\:\\:Descending instead$#
|
||||
"""
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Entity/Household/Household.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching deprecated class constant DESC of class Doctrine\\\\Common\\\\Collections\\\\Criteria\\:
|
||||
use Order\\:\\:Descending instead$#
|
||||
"""
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Entity/Person.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching deprecated class constant DESC of class Doctrine\\\\Common\\\\Collections\\\\Criteria\\:
|
||||
use Order\\:\\:Descending instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
|
@ -100,11 +100,6 @@ parameters:
|
||||
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
|
||||
@ -165,11 +160,6 @@ parameters:
|
||||
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
|
||||
|
@ -5,6 +5,26 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php
|
||||
|
||||
-
|
||||
message: "#^Property Chill\\\\CustomFieldsBundle\\\\Entity\\\\CustomField\\:\\:\\$required \\(false\\) does not accept bool\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\DocStoreBundle\\\\Entity\\\\Document\\:\\:setUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\DocStoreBundle\\\\Entity\\\\Document\\:\\:setUser\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User\\|null, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface\\|null given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
|
||||
|
||||
-
|
||||
message: "#^Variable \\$participation might not be defined\\.$#"
|
||||
count: 3
|
||||
@ -15,6 +35,106 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Comparison operation \"\\>\" between \\(bool\\|int\\|Redis\\) and 0 results in an error\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/ApiWrapper.php
|
||||
|
||||
-
|
||||
message: "#^Variable \\$response might not be defined\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/ApiWrapper.php
|
||||
|
||||
-
|
||||
message: "#^Function GuzzleHttp\\\\Psr7\\\\get not found\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php
|
||||
|
||||
-
|
||||
message: "#^Function GuzzleHttp\\\\Psr7\\\\str not found\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$seconds of function sleep expects int, string given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php
|
||||
|
||||
-
|
||||
message: "#^Unreachable statement \\- code above always terminates\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Controller/CSPersonController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$interval of method DateTimeImmutable\\:\\:add\\(\\) expects DateInterval, string\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Entity/Immersion.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$object of static method DateTimeImmutable\\:\\:createFromMutable\\(\\) expects DateTime, DateTimeInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Entity/Immersion.php
|
||||
|
||||
-
|
||||
message: "#^Property Chill\\\\JobBundle\\\\Entity\\\\Rome\\\\Metier\\:\\:\\$appellations is never read, only written\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php
|
||||
|
||||
-
|
||||
message: "#^Method Chill\\\\JobBundle\\\\Export\\\\ListCSPerson\\:\\:splitArrayToColumns\\(\\) never returns Closure so it can be removed from the return type\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php
|
||||
|
||||
-
|
||||
message: "#^Variable \\$f might not be defined\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php
|
||||
|
||||
-
|
||||
message: "#^Method Chill\\\\JobBundle\\\\Export\\\\ListFrein\\:\\:splitArrayToColumns\\(\\) never returns Closure so it can be removed from the return type\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Export/ListFrein.php
|
||||
|
||||
-
|
||||
message: "#^Method Chill\\\\JobBundle\\\\Export\\\\ListProjetProfessionnel\\:\\:splitArrayToColumns\\(\\) never returns Closure so it can be removed from the return type\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php
|
||||
|
||||
-
|
||||
message: "#^Property Chill\\\\JobBundle\\\\Form\\\\ChoiceLoader\\\\RomeAppellationChoiceLoader\\:\\:\\$appellationRepository \\(Chill\\\\JobBundle\\\\Repository\\\\Rome\\\\AppellationRepository\\) does not accept Doctrine\\\\ORM\\\\EntityRepository\\<Chill\\\\JobBundle\\\\Entity\\\\Rome\\\\Appellation\\>\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Result of && is always false\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Strict comparison using \\=\\=\\= between array\\{\\} and Symfony\\\\Component\\\\Validator\\\\ConstraintViolationListInterface will always evaluate to false\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Strict comparison using \\=\\=\\= between null and string will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Variable \\$metier might not be defined\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$interval of method DateTimeImmutable\\:\\:add\\(\\) expects DateInterval, string\\|null given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$object of static method DateTimeImmutable\\:\\:createFromMutable\\(\\) expects DateTime, DateTimeInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php
|
||||
|
||||
-
|
||||
message: "#^Cannot unset offset '_token' on array\\{formatter\\: mixed, export\\: mixed, centers\\: mixed, alias\\: string\\}\\.$#"
|
||||
count: 1
|
||||
@ -40,11 +160,31 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Repository/NotificationRepository.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$user of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:userHasAccessForCenter\\(\\) expects Chill\\\\MainBundle\\\\Entity\\\\User, Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php
|
||||
|
||||
-
|
||||
message: "#^Foreach overwrites \\$value with its value variable\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/PersonType.php
|
||||
|
||||
-
|
||||
message: "#^Foreach overwrites \\$value with its value variable\\.$#"
|
||||
count: 1
|
||||
|
153
phpstan-deprecations-sf54.neon
Normal file
153
phpstan-deprecations-sf54.neon
Normal file
@ -0,0 +1,153 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method get\\(\\) of class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController\\:
|
||||
since Symfony 5\\.4, use method or constructor injection in your controller instead$#
|
||||
"""
|
||||
count: 2
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method get\\(\\) of class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController\\:
|
||||
since Symfony 5\\.4, use method or constructor injection in your controller instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method get\\(\\) of class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController\\:
|
||||
since Symfony 5\\.4, use method or constructor injection in your controller instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method get\\(\\) of class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController\\:
|
||||
since Symfony 5\\.4, use method or constructor injection in your controller instead$#
|
||||
"""
|
||||
count: 3
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getUsername\\(\\) of class Chill\\\\MainBundle\\\\Entity\\\\User\\:
|
||||
since Symfony 5\\.3, use getUserIdentifier\\(\\) instead$#
|
||||
"""
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getUsername\\(\\) of class Chill\\\\MainBundle\\\\Entity\\\\User\\:
|
||||
since Symfony 5\\.3, use getUserIdentifier\\(\\) instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Encoder\\\\EncoderFactory\\:
|
||||
since Symfony 5\\.3, use \\{@link PasswordHasherFactory\\} instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method get\\(\\) of class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController\\:
|
||||
since Symfony 5\\.4, use method or constructor injection in your controller instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/MenuController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method get\\(\\) of class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController\\:
|
||||
since Symfony 5\\.4, use method or constructor injection in your controller instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/SearchController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getUsername\\(\\) of class Chill\\\\MainBundle\\\\Entity\\\\User\\:
|
||||
since Symfony 5\\.3, use getUserIdentifier\\(\\) instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Controller/UserController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Instantiation of deprecated class Symfony\\\\Component\\\\Security\\\\Core\\\\Encoder\\\\EncoderFactory\\:
|
||||
since Symfony 5\\.3, use \\{@link PasswordHasherFactory\\} instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getUsername\\(\\) of class Chill\\\\MainBundle\\\\Entity\\\\User\\:
|
||||
since Symfony 5\\.3, use getUserIdentifier\\(\\) instead$#
|
||||
"""
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getUsername\\(\\) of class Chill\\\\MainBundle\\\\Entity\\\\User\\:
|
||||
since Symfony 5\\.3, use getUserIdentifier\\(\\) instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getUsername\\(\\) of class Chill\\\\MainBundle\\\\Entity\\\\User\\:
|
||||
since Symfony 5\\.3, use getUserIdentifier\\(\\) instead$#
|
||||
"""
|
||||
count: 3
|
||||
path: src/Bundle/ChillMainBundle/Validation/Validator/UserUniqueEmailAndUsername.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getUsername\\(\\) of class Chill\\\\MainBundle\\\\Entity\\\\User\\:
|
||||
since Symfony 5\\.3, use getUserIdentifier\\(\\) instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method get\\(\\) of class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController\\:
|
||||
since Symfony 5\\.4, use method or constructor injection in your controller instead$#
|
||||
"""
|
||||
count: 13
|
||||
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method get\\(\\) of class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController\\:
|
||||
since Symfony 5\\.4, use method or constructor injection in your controller instead$#
|
||||
"""
|
||||
count: 4
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method get\\(\\) of class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController\\:
|
||||
since Symfony 5\\.4, use method or constructor injection in your controller instead$#
|
||||
"""
|
||||
count: 7
|
||||
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getUsername\\(\\) of class Chill\\\\MainBundle\\\\Entity\\\\User\\:
|
||||
since Symfony 5\\.3, use getUserIdentifier\\(\\) instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php
|
@ -1,36 +1,5 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
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: 2
|
||||
path: src/Bundle/ChillActivityBundle/Controller/ActivityController.php
|
||||
|
||||
-
|
||||
message: "#^Call to deprecated method setType\\(\\) of class Chill\\\\ActivityBundle\\\\Entity\\\\Activity\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/DataFixtures/ORM/LoadActivity.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Entity/ActivityReason.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching class constant class 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/Form/ActivityType.php
|
||||
|
||||
|
||||
-
|
||||
message: """
|
||||
@ -40,201 +9,10 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.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/Timeline/TimelineActivityProvider.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldChoice\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bridge\\\\Twig\\\\TwigEngine\\:
|
||||
since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php
|
||||
|
||||
-
|
||||
message: "#^Used function LogicException not found\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldDate\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\:
|
||||
since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$twigEngine of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldLongChoice\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bridge\\\\Twig\\\\TwigEngine\\:
|
||||
since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldNumber\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\:
|
||||
since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldText\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\:
|
||||
since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$templating of method Chill\\\\CustomFieldsBundle\\\\CustomFields\\\\CustomFieldTitle\\:\\:__construct\\(\\) has typehint with deprecated class Symfony\\\\Bundle\\\\TwigBundle\\\\TwigEngine\\:
|
||||
since version 4\\.3, to be removed in 5\\.0; use Twig instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.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: 6
|
||||
path: src/Bundle/ChillEventBundle/Controller/EventController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching class constant class 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/ChillEventBundle/Form/EventType.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching class constant class 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/ChillEventBundle/Form/Type/PickEventType.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/ChillFamilyMembersBundle/Security/Voter/FamilyMemberVoter.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$role of method Chill\\\\MainBundle\\\\CRUD\\\\Controller\\\\CRUDController\\:\\:getReachableCenters\\(\\) has typehint with 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/ChillMainBundle/CRUD/Controller/CRUDController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getLanguageBundle\\(\\) of class Symfony\\\\Component\\\\Intl\\\\Intl\\:
|
||||
since Symfony 4\\.3, to be removed in 5\\.0\\. Use \\{@see Languages\\} or \\{@see Scripts\\} instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getRegionBundle\\(\\) of class Symfony\\\\Component\\\\Intl\\\\Intl\\:
|
||||
since Symfony 4\\.3, to be removed in 5\\.0\\. Use \\{@see Countries\\} instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.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/ChillMainBundle/Controller/PermissionsGroupController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$role of anonymous function has typehint with 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/ChillMainBundle/Controller/PermissionsGroupController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getLanguageBundle\\(\\) of class Symfony\\\\Component\\\\Intl\\\\Intl\\:
|
||||
since Symfony 4\\.3, to be removed in 5\\.0\\. Use \\{@see Languages\\} or \\{@see Scripts\\} instead\\.$#
|
||||
"""
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Return type of method Chill\\\\MainBundle\\\\Entity\\\\User\\:\\:getRoles\\(\\) has typehint with 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/ChillMainBundle/Entity/User.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\MainBundle\\\\Form\\\\Event\\\\CustomizeFormEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
|
||||
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching class constant class 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/ChillMainBundle/Form/Type/ScopePickerType.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching class constant class 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/ChillMainBundle/Form/Type/UserPickerType.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillMainBundle/Repository/NotificationRepository.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$attribute of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:userHasAccess\\(\\) has typehint with 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/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
|
||||
path: src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php
|
||||
|
||||
-
|
||||
message: """
|
||||
@ -244,14 +22,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$role of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:\\:getReachableCircles\\(\\) has typehint with 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/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$centerResolverDispatcher of method Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\DefaultVoterHelper\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\:
|
||||
@ -276,14 +46,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperGenerator.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\MainBundle\\\\Security\\\\PasswordRecover\\\\PasswordRecoverEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
|
||||
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcher implements deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\:
|
||||
@ -292,35 +54,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\MainBundle\\\\Templating\\\\Events\\\\DelegatedBlockRenderingEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
|
||||
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\PersonBundle\\\\Actions\\\\ActionEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
|
||||
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Actions/ActionEvent.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\PersonBundle\\\\Controller\\\\AccompanyingCourseController extends deprecated class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller\\:
|
||||
since Symfony 4\\.2, use "Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController" instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Call to deprecated method getCurrentAccompanyingPeriod\\(\\) of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\:
|
||||
@ -329,56 +62,10 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\PersonBundle\\\\Controller\\\\PersonDuplicateController extends deprecated class Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller\\:
|
||||
since Symfony 4\\.2, use "Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController" instead\\.$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
|
||||
|
||||
-
|
||||
message: "#^Access to deprecated property \\$proxyAccompanyingPeriodOpenState of class Chill\\\\PersonBundle\\\\Entity\\\\Person\\.$#"
|
||||
count: 2
|
||||
path: src/Bundle/ChillPersonBundle/Entity/Person.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/ChillPersonBundle/Form/AccompanyingPeriodType.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Form/PersonType.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching class constant class 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/ChillPersonBundle/Form/Type/PickPersonType.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\PersonBundle\\\\Privacy\\\\AccompanyingPeriodPrivacyEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
|
||||
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\PersonBundle\\\\Privacy\\\\PrivacyEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
|
||||
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$centerResolverDispatcher of method Chill\\\\PersonBundle\\\\Repository\\\\AccompanyingPeriodACLAwareRepository\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\:
|
||||
@ -387,48 +74,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.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/ChillPersonBundle/Widget/PersonListWidget.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: 3
|
||||
path: src/Bundle/ChillReportBundle/Controller/ReportController.php
|
||||
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$role of method Chill\\\\ReportBundle\\\\Form\\\\ReportType\\:\\:appendScopeChoices\\(\\) has typehint with 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/ChillReportBundle/Form/ReportType.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/ChillReportBundle/Search/ReportSearch.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: 2
|
||||
path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$centerResolverDispatcher of method Chill\\\\TaskBundle\\\\Controller\\\\SingleTaskController\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\:
|
||||
@ -437,46 +82,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$role of method Chill\\\\TaskBundle\\\\Controller\\\\SingleTaskController\\:\\:setCreateForm\\(\\) has typehint with 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/ChillTaskBundle/Controller/SingleTaskController.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\TaskBundle\\\\Event\\\\TaskEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
|
||||
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Event/TaskEvent.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\TaskBundle\\\\Event\\\\UI\\\\UIEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
|
||||
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Event/UI/UIEvent.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: 4
|
||||
path: src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Fetching class constant class 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/ChillTaskBundle/Form/SingleTaskType.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Parameter \\$centerResolverDispatcher of method Chill\\\\TaskBundle\\\\Form\\\\SingleTaskType\\:\\:__construct\\(\\) has typehint with deprecated interface Chill\\\\MainBundle\\\\Security\\\\Resolver\\\\CenterResolverDispatcherInterface\\:
|
||||
@ -484,28 +89,3 @@ parameters:
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Form/SingleTaskType.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/ChillTaskBundle/Repository/SingleTaskRepository.php
|
||||
|
||||
-
|
||||
message: """
|
||||
#^Class Chill\\\\TaskBundle\\\\Security\\\\Authorization\\\\AuthorizationEvent extends deprecated class Symfony\\\\Component\\\\EventDispatcher\\\\Event\\:
|
||||
since Symfony 4\\.3, use "Symfony\\\\Contracts\\\\EventDispatcher\\\\Event" instead$#
|
||||
"""
|
||||
count: 1
|
||||
path: src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.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: 3
|
||||
path: src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
|
||||
|
||||
|
@ -31,4 +31,5 @@ includes:
|
||||
- phpstan-baseline-level-3.neon
|
||||
- phpstan-baseline-level-4.neon
|
||||
- phpstan-baseline-level-5.neon
|
||||
|
||||
- phpstan-deprecations-sf54.neon
|
||||
- phpstan-baseline-deprecations-doctrine-orm.neon
|
||||
|
@ -1,29 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
|
||||
bootstrap="tests/app/vendor/autoload.php"
|
||||
cacheResultFile=".cache/phpunit/test-results-rector"
|
||||
executionOrder="depends,defects"
|
||||
forceCoversAnnotation="true"
|
||||
beStrictAboutCoversAnnotation="true"
|
||||
beStrictAboutOutputDuringTests="true"
|
||||
beStrictAboutTodoAnnotatedTests="true"
|
||||
convertDeprecationsToExceptions="true"
|
||||
failOnRisky="true"
|
||||
failOnWarning="true"
|
||||
verbose="true"
|
||||
colors="true"
|
||||
>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" executionOrder="depends,defects" beStrictAboutOutputDuringTests="true" failOnRisky="true" failOnWarning="true" colors="true" cacheDirectory="var/cache/phpunit.rector.cache" requireCoverageMetadata="true" beStrictAboutCoverageMetadata="true">
|
||||
<testsuites>
|
||||
<testsuite name="default">
|
||||
<directory>utils/rector/tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<coverage cacheDirectory=".cache/phpunit/code-coverage-rector"
|
||||
processUncoveredFiles="true">
|
||||
<source>
|
||||
<include>
|
||||
<directory suffix=".php">utils/rector/src</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
</source>
|
||||
</phpunit>
|
||||
|
@ -1,20 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="tests/bootstrap.php">
|
||||
<php>
|
||||
<ini name="error_reporting" value="-1" />
|
||||
<server name="APP_ENV" value="test" force="true" />
|
||||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0&max[indirect]=999999" />
|
||||
<server name="SHELL_VERBOSITY" value="-1" />
|
||||
<env name="KERNEL_CLASS" value="\App\Kernel" />
|
||||
<ini name="error_reporting" value="-1"/>
|
||||
<server name="APP_ENV" value="test" force="true"/>
|
||||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=93&max[indirect]=999999"/>
|
||||
<server name="SHELL_VERBOSITY" value="-1"/>
|
||||
<env name="KERNEL_CLASS" value="\App\Kernel"/>
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<!--
|
||||
<testsuite name="ActivityBundle">
|
||||
@ -73,11 +66,6 @@
|
||||
<directory suffix="Test.php">src/Bundle/ChillWopiBundle/tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<listeners>
|
||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||
</listeners>
|
||||
|
||||
<!-- Run `composer require symfony/panther` before enabling this extension -->
|
||||
<!--
|
||||
<extensions>
|
||||
|
51
rector.php
51
rector.php
@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
|
||||
use Rector\Set\ValueObject\LevelSetList;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
@ -19,7 +20,7 @@ return static function (RectorConfig $rectorConfig): void {
|
||||
__DIR__ . '/src',
|
||||
]);
|
||||
|
||||
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/testsApp_KernelDevDebugContainer.xml');
|
||||
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/test/App_KernelTestDebugContainer.xml ');
|
||||
$rectorConfig->symfonyContainerPhp(__DIR__ . '/tests/symfony-container.php');
|
||||
|
||||
//$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
|
||||
@ -27,29 +28,63 @@ return static function (RectorConfig $rectorConfig): void {
|
||||
|
||||
// register a single rule
|
||||
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
|
||||
$rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector::class);
|
||||
$rectorConfig->rule(Rector\TypeDeclaration\Rector\Class_\MergeDateTimePropertyTypeDeclarationRector::class);
|
||||
$rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationBasedOnParentClassMethodRector::class);
|
||||
|
||||
// part of the symfony 54 rules
|
||||
$rectorConfig->rule(\Rector\Symfony\Symfony53\Rector\StaticPropertyFetch\KernelTestCaseContainerPropertyDeprecationRector::class);
|
||||
$rectorConfig->rule(\Rector\Symfony\Symfony60\Rector\MethodCall\GetHelperControllerToServiceRector::class);
|
||||
$rectorConfig->disableParallel();
|
||||
|
||||
//define sets of rules
|
||||
$rectorConfig->sets([
|
||||
LevelSetList::UP_TO_PHP_82,
|
||||
\Rector\Symfony\Set\SymfonyLevelSetList::UP_TO_SYMFONY_44,
|
||||
\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_82,
|
||||
\Rector\Symfony\Set\SymfonyLevelSetList::UP_TO_SYMFONY_54,
|
||||
\Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
|
||||
\Rector\PHPUnit\Set\PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
|
||||
\Rector\Doctrine\Set\DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
|
||||
]);
|
||||
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class, [
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Symfony\Component\Serializer\Annotation\Context'),
|
||||
]);
|
||||
|
||||
// migrate for phpunit
|
||||
$rectorConfig->rules([
|
||||
\Rector\PHPUnit\PHPUnit100\Rector\Class_\StaticDataProviderClassMethodRector::class,
|
||||
\Rector\PHPUnit\PHPUnit100\Rector\Class_\PublicDataProviderClassMethodRector::class
|
||||
]);
|
||||
|
||||
// some routes are added twice if it remains activated
|
||||
// $rectorConfig->rule(\Rector\Symfony\Configs\Rector\ClassMethod\AddRouteAnnotationRector::class);
|
||||
|
||||
// chill rules
|
||||
//$rectorConfig->rule(\Chill\Utils\Rector\Rector\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector::class);
|
||||
$rectorConfig->rules([
|
||||
\Chill\Utils\Rector\Rector\ChillBundleMakeDataProviderStaticForAbstractExportTestRector::class,
|
||||
]);
|
||||
|
||||
// skip some path...
|
||||
$rectorConfig->skip([
|
||||
// we need to discuss this: are we going to have FALSE in tests instead of an error ?
|
||||
\Rector\Php71\Rector\FuncCall\CountOnNullRector::class,
|
||||
|
||||
// we must adapt service definition
|
||||
\Rector\Symfony\Symfony28\Rector\MethodCall\GetToConstructorInjectionRector::class,
|
||||
\Rector\Symfony\Symfony34\Rector\Closure\ContainerGetNameToTypeInTestsRector::class,
|
||||
]);
|
||||
|
||||
$rectorConfig->ruleWithConfiguration(AnnotationToAttributeRector::class, [
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\AccompanyingPeriodValidity'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Household\HouseholdMembershipSequential'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Household\MaxHolder'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ConfidentialCourseMustHaveReferrer'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\LocationValidity'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ParticipationOverlap'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ResourceDuplicateCheck'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Person\Birthdate'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\PersonBundle\Validator\Constraints\Relationship\RelationshipNoDuplicate'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\ActivityBundle\Validator\Constraints\ActivityValidity'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\DocStoreBundle\Validator\Constraints\AsyncFileExists'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Validation\Constraint\PhonenumberConstraint'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency'),
|
||||
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Workflow\Validator\EntityWorkflowCreation'),
|
||||
]);
|
||||
};
|
||||
|
@ -13,6 +13,4 @@ namespace Chill\ActivityBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class ChillActivityBundle extends Bundle
|
||||
{
|
||||
}
|
||||
class ChillActivityBundle extends Bundle {}
|
||||
|
@ -24,6 +24,7 @@ use Chill\MainBundle\Entity\UserJob;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Repository\LocationRepository;
|
||||
use Chill\MainBundle\Repository\UserRepositoryInterface;
|
||||
use Chill\MainBundle\Security\ChillSecurity;
|
||||
use Chill\MainBundle\Security\Resolver\CenterResolverManagerInterface;
|
||||
use Chill\MainBundle\Templating\Listing\FilterOrderHelper;
|
||||
use Chill\MainBundle\Templating\Listing\FilterOrderHelperFactoryInterface;
|
||||
@ -67,14 +68,13 @@ final class ActivityController extends AbstractController
|
||||
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly PaginatorFactory $paginatorFactory,
|
||||
) {
|
||||
}
|
||||
private readonly ChillSecurity $security
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Deletes a Activity entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/activity/{id}/delete", name="chill_activity_activity_delete", methods={"GET", "POST", "DELETE"})
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/{id}/delete', name: 'chill_activity_activity_delete', methods: ['GET', 'POST', 'DELETE'])]
|
||||
public function deleteAction(Request $request, mixed $id)
|
||||
{
|
||||
$view = null;
|
||||
@ -142,9 +142,8 @@ final class ActivityController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to edit an existing Activity entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/activity/{id}/edit", name="chill_activity_activity_edit", methods={"GET", "POST", "PUT"})
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/{id}/edit', name: 'chill_activity_activity_edit', methods: ['GET', 'POST', 'PUT'])]
|
||||
public function editAction(int $id, Request $request): Response
|
||||
{
|
||||
$view = null;
|
||||
@ -237,9 +236,8 @@ final class ActivityController extends AbstractController
|
||||
|
||||
/**
|
||||
* Lists all Activity entities.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/activity/", name="chill_activity_activity_list")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/', name: 'chill_activity_activity_list')]
|
||||
public function listAction(Request $request): Response
|
||||
{
|
||||
$view = null;
|
||||
@ -343,9 +341,7 @@ final class ActivityController extends AbstractController
|
||||
return $filterBuilder->build();
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/activity/new", name="chill_activity_activity_new", methods={"POST", "GET"})
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/new', name: 'chill_activity_activity_new', methods: ['POST', 'GET'])]
|
||||
public function newAction(Request $request): Response
|
||||
{
|
||||
$view = null;
|
||||
@ -385,7 +381,7 @@ final class ActivityController extends AbstractController
|
||||
}
|
||||
|
||||
$entity = new Activity();
|
||||
$entity->setUser($this->getUser());
|
||||
$entity->setUser($this->security->getUser());
|
||||
|
||||
if ($person instanceof Person) {
|
||||
$entity->setPerson($person);
|
||||
@ -400,7 +396,7 @@ final class ActivityController extends AbstractController
|
||||
$entity->setDate(new \DateTime('now'));
|
||||
|
||||
if ($request->query->has('activityData')) {
|
||||
$activityData = $request->query->get('activityData');
|
||||
$activityData = $request->query->all('activityData');
|
||||
|
||||
if (\array_key_exists('durationTime', $activityData) && $activityType->getDurationTimeVisible() > 0) {
|
||||
$durationTimeInMinutes = $activityData['durationTime'];
|
||||
@ -453,7 +449,7 @@ final class ActivityController extends AbstractController
|
||||
if (\array_key_exists('comment', $activityData) && $activityType->getCommentVisible() > 0) {
|
||||
$comment = new CommentEmbeddable();
|
||||
$comment->setComment($activityData['comment']);
|
||||
$comment->setUserId($this->getUser()->getid());
|
||||
$comment->setUserId($this->security->getUser()->getId());
|
||||
$comment->setDate(new \DateTime('now'));
|
||||
$entity->setComment($comment);
|
||||
}
|
||||
@ -514,7 +510,7 @@ final class ActivityController extends AbstractController
|
||||
|
||||
$activity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
|
||||
|
||||
$defaultLocation = $this->getUser()->getCurrentLocation();
|
||||
$defaultLocation = $this->security->getUser()->getCurrentLocation();
|
||||
|
||||
return $this->render($view, [
|
||||
'person' => $person,
|
||||
@ -526,9 +522,7 @@ final class ActivityController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/activity/select-type", name="chill_activity_activity_select_type")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/select-type', name: 'chill_activity_activity_select_type')]
|
||||
public function selectTypeAction(Request $request): Response
|
||||
{
|
||||
$view = null;
|
||||
@ -569,13 +563,11 @@ final class ActivityController extends AbstractController
|
||||
'person' => $person,
|
||||
'accompanyingCourse' => $accompanyingPeriod,
|
||||
'data' => $data,
|
||||
'activityData' => $request->query->get('activityData', []),
|
||||
'activityData' => $request->query->all('activityData'),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/activity/{id}/show", name="chill_activity_activity_show")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/{id}/show', name: 'chill_activity_activity_show')]
|
||||
public function showAction(Request $request, int $id): Response
|
||||
{
|
||||
$entity = $this->activityRepository->find($id);
|
||||
|
@ -22,11 +22,12 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
*/
|
||||
class ActivityReasonCategoryController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
/**
|
||||
* Creates a new ActivityReasonCategory entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/create", name="chill_activity_activityreasoncategory_create", methods={"POST"})
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/create', name: 'chill_activity_activityreasoncategory_create', methods: ['POST'])]
|
||||
public function createAction(Request $request)
|
||||
{
|
||||
$entity = new ActivityReasonCategory();
|
||||
@ -34,7 +35,7 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
@ -49,12 +50,11 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to edit an existing ActivityReasonCategory entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/{id}/edit", name="chill_activity_activityreasoncategory_edit")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/edit', name: 'chill_activity_activityreasoncategory_edit')]
|
||||
public function editAction(mixed $id)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
|
||||
|
||||
@ -72,12 +72,11 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
|
||||
/**
|
||||
* Lists all ActivityReasonCategory entities.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/", name="chill_activity_activityreasoncategory")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/', name: 'chill_activity_activityreasoncategory')]
|
||||
public function indexAction()
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entities = $em->getRepository(ActivityReasonCategory::class)->findAll();
|
||||
|
||||
@ -88,9 +87,8 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to create a new ActivityReasonCategory entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/new", name="chill_activity_activityreasoncategory_new")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/new', name: 'chill_activity_activityreasoncategory_new')]
|
||||
public function newAction()
|
||||
{
|
||||
$entity = new ActivityReasonCategory();
|
||||
@ -104,12 +102,11 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
|
||||
/**
|
||||
* Finds and displays a ActivityReasonCategory entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/{id}/show", name="chill_activity_activityreasoncategory_show")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/show', name: 'chill_activity_activityreasoncategory_show')]
|
||||
public function showAction(mixed $id)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
|
||||
|
||||
@ -124,12 +121,11 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
|
||||
/**
|
||||
* Edits an existing ActivityReasonCategory entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/{id}/update", name="chill_activity_activityreasoncategory_update", methods={"POST", "PUT"})
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/update', name: 'chill_activity_activityreasoncategory_update', methods: ['POST', 'PUT'])]
|
||||
public function updateAction(Request $request, mixed $id)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(ActivityReasonCategory::class)->find($id);
|
||||
|
||||
|
@ -24,15 +24,12 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
*/
|
||||
class ActivityReasonController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly ActivityReasonRepository $activityReasonRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly ActivityReasonRepository $activityReasonRepository, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
/**
|
||||
* Creates a new ActivityReason entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/create", name="chill_activity_activityreason_create", methods={"POST"})
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/create', name: 'chill_activity_activityreason_create', methods: ['POST'])]
|
||||
public function createAction(Request $request)
|
||||
{
|
||||
$entity = new ActivityReason();
|
||||
@ -40,7 +37,7 @@ class ActivityReasonController extends AbstractController
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
@ -55,12 +52,11 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to edit an existing ActivityReason entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/{id}/edit", name="chill_activity_activityreason_edit")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/{id}/edit', name: 'chill_activity_activityreason_edit')]
|
||||
public function editAction(mixed $id)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||
|
||||
@ -78,12 +74,11 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
/**
|
||||
* Lists all ActivityReason entities.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/", name="chill_activity_activityreason")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/', name: 'chill_activity_activityreason')]
|
||||
public function indexAction()
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entities = $this->activityReasonRepository->findAll();
|
||||
|
||||
@ -94,9 +89,8 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to create a new ActivityReason entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/new", name="chill_activity_activityreason_new")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/new', name: 'chill_activity_activityreason_new')]
|
||||
public function newAction()
|
||||
{
|
||||
$entity = new ActivityReason();
|
||||
@ -110,12 +104,11 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
/**
|
||||
* Finds and displays a ActivityReason entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/{id}/show", name="chill_activity_activityreason_show")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/{id}/show', name: 'chill_activity_activityreason_show')]
|
||||
public function showAction(mixed $id)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||
|
||||
@ -130,12 +123,11 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
/**
|
||||
* Edits an existing ActivityReason entity.
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/{id}/update", name="chill_activity_activityreason_update", methods={"POST", "PUT"})
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/{id}/update', name: 'chill_activity_activityreason_update', methods: ['POST', 'PUT'])]
|
||||
public function updateAction(Request $request, mixed $id)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
$entity = $em->getRepository(ActivityReason::class)->find($id);
|
||||
|
||||
|
@ -18,18 +18,14 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
*/
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activity", name="chill_activity_admin_index")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activity', name: 'chill_activity_admin_index')]
|
||||
public function indexActivityAction()
|
||||
{
|
||||
return $this->render('@ChillActivity/Admin/layout_activity.html.twig');
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activity_redirect_to_main", name="chill_admin_aside_activity_redirect_to_admin_index", options={null})
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activity_redirect_to_main", name="chill_admin_activity_redirect_to_admin_index")
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activity_redirect_to_main', name: 'chill_admin_aside_activity_redirect_to_admin_index', options: [null])]
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activity_redirect_to_main', name: 'chill_admin_activity_redirect_to_admin_index')]
|
||||
public function redirectToAdminIndexAction()
|
||||
{
|
||||
return $this->redirectToRoute('chill_main_admin_central');
|
||||
|
@ -64,7 +64,7 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
|
||||
->setPerson($person)
|
||||
->setDate($this->faker->dateTimeThisYear())
|
||||
->setDurationTime($this->faker->dateTime(36000))
|
||||
->setType($this->getRandomActivityType())
|
||||
->setActivityType($this->getRandomActivityType())
|
||||
->setScope($this->getRandomScope());
|
||||
|
||||
// ->setAttendee($this->faker->boolean())
|
||||
|
@ -25,14 +25,12 @@ use Chill\MainBundle\Entity\HasScopesInterface;
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency;
|
||||
use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodLinkedWithSocialIssuesEntityInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
|
||||
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||
use DateTime;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@ -43,25 +41,12 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* Class Activity.
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="Chill\ActivityBundle\Repository\ActivityRepository")
|
||||
*
|
||||
* @ORM\Table(name="activity")
|
||||
*
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "activity": Activity::class
|
||||
* })
|
||||
*
|
||||
* @ActivityValidator\ActivityValidity
|
||||
*
|
||||
* TODO see if necessary
|
||||
* UserCircleConsistency(
|
||||
* "CHILL_ACTIVITY_SEE_DETAILS",
|
||||
* getUserFunction="getUser",
|
||||
* path="scope")
|
||||
*/
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['activity' => Activity::class])]
|
||||
#[ORM\Entity(repositoryClass: \Chill\ActivityBundle\Repository\ActivityRepository::class)]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
#[ORM\Table(name: 'activity')]
|
||||
#[ActivityValidator\ActivityValidity] // TODO see if necessary
|
||||
class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface, HasCentersInterface, HasScopesInterface, TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
use TrackCreationTrait;
|
||||
@ -72,176 +57,115 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
|
||||
final public const SENTRECEIVED_SENT = 'sent';
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod")
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class)]
|
||||
private ?AccompanyingPeriod $accompanyingPeriod = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityType")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @SerializedName("activityType")
|
||||
*
|
||||
* @ORM\JoinColumn(name="type_id")
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[SerializedName('activityType')]
|
||||
#[ORM\ManyToOne(targetEntity: ActivityType::class)]
|
||||
#[ORM\JoinColumn(name: 'type_id')]
|
||||
private ActivityType $activityType;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityPresence")
|
||||
*
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: ActivityPresence::class)]
|
||||
private ?ActivityPresence $attendee = null;
|
||||
|
||||
/**
|
||||
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\CommentEmbeddable", columnPrefix="comment_")
|
||||
*
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')]
|
||||
private CommentEmbeddable $comment;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
*
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]
|
||||
private \DateTime $date;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\DocStoreBundle\Entity\StoredObject", cascade={"persist"})
|
||||
*
|
||||
* @Assert\Valid(traverse=true)
|
||||
*
|
||||
* @var Collection<StoredObject>
|
||||
*/
|
||||
#[Assert\Valid(traverse: true)]
|
||||
#[ORM\ManyToMany(targetEntity: StoredObject::class, cascade: ['persist'])]
|
||||
private Collection $documents;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="time", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTime $durationTime = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default": false})
|
||||
*
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['default' => false])]
|
||||
private bool $emergency = false;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Location")
|
||||
*
|
||||
* @groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: Location::class)]
|
||||
private ?Location $location = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
private ?Person $person = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\Person")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @var Collection<Person>
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\ManyToMany(targetEntity: Person::class)]
|
||||
private Collection $persons;
|
||||
|
||||
/**
|
||||
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable", columnPrefix="privateComment_")
|
||||
*/
|
||||
#[ORM\Embedded(class: PrivateCommentEmbeddable::class, columnPrefix: 'privateComment_')]
|
||||
private PrivateCommentEmbeddable $privateComment;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\ActivityBundle\Entity\ActivityReason")
|
||||
*
|
||||
* @Groups({"docgen:read"})
|
||||
*
|
||||
* @var Collection<ActivityReason>
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\ManyToMany(targetEntity: ActivityReason::class)]
|
||||
private Collection $reasons;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
|
||||
*
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: Scope::class)]
|
||||
private ?Scope $scope = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", options={"default": ""})
|
||||
*
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, options: ['default' => ''])]
|
||||
private string $sentReceived = '';
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\SocialWork\SocialAction")
|
||||
*
|
||||
* @ORM\JoinTable(name="chill_activity_activity_chill_person_socialaction")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @var Collection<SocialAction>
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\ManyToMany(targetEntity: SocialAction::class)]
|
||||
#[ORM\JoinTable(name: 'chill_activity_activity_chill_person_socialaction')]
|
||||
private Collection $socialActions;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\SocialWork\SocialIssue")
|
||||
*
|
||||
* @ORM\JoinTable(name="chill_activity_activity_chill_person_socialissue")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @var Collection<SocialIssue>
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\ManyToMany(targetEntity: SocialIssue::class)]
|
||||
#[ORM\JoinTable(name: 'chill_activity_activity_chill_person_socialissue')]
|
||||
private Collection $socialIssues;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @var Collection<ThirdParty>
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\ManyToMany(targetEntity: ThirdParty::class)]
|
||||
private Collection $thirdParties;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="time", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTime $travelTime = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
|
||||
*
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: User::class)]
|
||||
private ?User $user = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\MainBundle\Entity\User")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @var Collection<User>
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\ManyToMany(targetEntity: User::class)]
|
||||
private Collection $users;
|
||||
|
||||
public function __construct()
|
||||
@ -385,9 +309,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
return $this->documents;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
public function getDurationMinute(): int
|
||||
{
|
||||
if (null === $this->durationTime) {
|
||||
@ -515,9 +437,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
return $this->travelTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
public function getTravelTimeMinute(): int
|
||||
{
|
||||
if (null === $this->travelTime) {
|
||||
|
@ -16,38 +16,24 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* Class ActivityPresence.
|
||||
*
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="activitytpresence")
|
||||
*
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
#[ORM\Table(name: 'activitytpresence')]
|
||||
class ActivityPresence
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['docgen:read'])]
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||
private array $name = [];
|
||||
|
||||
/**
|
||||
|
@ -15,39 +15,24 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class ActivityReason.
|
||||
*
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="activityreason")
|
||||
*
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
#[ORM\Table(name: 'activityreason')]
|
||||
class ActivityReason
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="Chill\ActivityBundle\Entity\ActivityReasonCategory",
|
||||
* inversedBy="reasons")
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: ActivityReasonCategory::class, inversedBy: 'reasons')]
|
||||
private ?ActivityReasonCategory $category = null;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||
private array $name;
|
||||
|
||||
/**
|
||||
@ -94,11 +79,9 @@ class ActivityReason
|
||||
/**
|
||||
* Set active.
|
||||
*
|
||||
* @param bool $active
|
||||
*
|
||||
* @return ActivityReason
|
||||
*/
|
||||
public function setActive($active)
|
||||
public function setActive(bool $active)
|
||||
{
|
||||
$this->active = $active;
|
||||
|
||||
@ -125,11 +108,9 @@ class ActivityReason
|
||||
/**
|
||||
* Set name.
|
||||
*
|
||||
* @param array $name
|
||||
*
|
||||
* @return ActivityReason
|
||||
*/
|
||||
public function setName($name)
|
||||
public function setName(array $name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
|
@ -17,45 +17,32 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class ActivityReasonCategory.
|
||||
*
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="activityreasoncategory")
|
||||
*
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
#[ORM\Table(name: 'activityreasoncategory')]
|
||||
class ActivityReasonCategory implements \Stringable
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="json")
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* Array of ActivityReason.
|
||||
*
|
||||
* @var Collection<ActivityReason>
|
||||
*
|
||||
* @ORM\OneToMany(
|
||||
* targetEntity="Chill\ActivityBundle\Entity\ActivityReason",
|
||||
* mappedBy="category")
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: ActivityReason::class, mappedBy: 'category')]
|
||||
private Collection $reasons;
|
||||
|
||||
/**
|
||||
|
@ -19,13 +19,10 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
/**
|
||||
* Class ActivityType.
|
||||
*
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="activitytype")
|
||||
*
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
#[ORM\Table(name: 'activitytype')]
|
||||
class ActivityType
|
||||
{
|
||||
final public const FIELD_INVISIBLE = 0;
|
||||
@ -36,258 +33,161 @@ class ActivityType
|
||||
|
||||
/**
|
||||
* @deprecated not in use
|
||||
*
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $accompanyingPeriodLabel = '';
|
||||
|
||||
/**
|
||||
* @deprecated not in use
|
||||
*
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $accompanyingPeriodVisible = self::FIELD_INVISIBLE;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $attendeeLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $attendeeVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityTypeCategory")
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: ActivityTypeCategory::class)]
|
||||
private ?ActivityTypeCategory $category = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $commentLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $commentVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $dateLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 2})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 2])]
|
||||
private int $dateVisible = self::FIELD_REQUIRED;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $documentsLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $documentsVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $durationTimeLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $durationTimeVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $emergencyLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $emergencyVisible = self::FIELD_INVISIBLE;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Groups({"docgen:read"})
|
||||
*/
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $locationLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $locationVisible = self::FIELD_INVISIBLE;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||
private array $name = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="float", options={"default": "0.0"})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, options: ['default' => '0.0'])]
|
||||
private float $ordering = 0.0;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $personLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $personsLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $personsVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 2})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 2])]
|
||||
private int $personVisible = self::FIELD_REQUIRED;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $privateCommentLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $privateCommentVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $reasonsLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $reasonsVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $sentReceivedLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $sentReceivedVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $socialActionsLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $socialActionsVisible = self::FIELD_INVISIBLE;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*
|
||||
* @deprecated not in use
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $socialDataLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*
|
||||
* @deprecated not in use
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $socialDataVisible = self::FIELD_INVISIBLE;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $socialIssuesLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $socialIssuesVisible = self::FIELD_INVISIBLE;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $thirdPartiesLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $thirdPartiesVisible = self::FIELD_INVISIBLE;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $travelTimeLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $travelTimeVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $userLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=false, options={"default": ""})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
|
||||
private string $usersLabel = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 1})
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
|
||||
private int $usersVisible = self::FIELD_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="smallint", nullable=false, options={"default": 2})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 2])]
|
||||
private int $userVisible = self::FIELD_REQUIRED;
|
||||
|
||||
/**
|
||||
* @Assert\Callback
|
||||
*/
|
||||
#[Assert\Callback]
|
||||
public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload)
|
||||
{
|
||||
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
|
||||
|
@ -13,37 +13,23 @@ namespace Chill\ActivityBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="activitytypecategory")
|
||||
*
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
#[ORM\Table(name: 'activitytypecategory')]
|
||||
class ActivityTypeCategory
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
|
||||
private bool $active = true;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||
private array $name = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="float", options={"default": "0.0"})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, options: ['default' => '0.0'])]
|
||||
private float $ordering = 0.0;
|
||||
|
||||
/**
|
||||
|
@ -19,9 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
class ActivityEntityListener
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository) {}
|
||||
|
||||
public function persistActionToCourse(Activity $activity)
|
||||
{
|
||||
|
@ -31,8 +31,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
private ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class BySocialActionAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class BySocialIssueAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -20,13 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class ActivityPresenceAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -29,8 +29,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
||||
protected ActivityReasonCategoryRepository $activityReasonCategoryRepository,
|
||||
protected ActivityReasonRepository $activityReasonRepository,
|
||||
protected TranslatableStringHelper $translatableStringHelper
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -22,9 +22,7 @@ class ActivityTypeAggregator implements AggregatorInterface
|
||||
{
|
||||
final public const KEY = 'activity_type_aggregator';
|
||||
|
||||
public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -22,9 +22,7 @@ class ActivityUserAggregator implements AggregatorInterface
|
||||
{
|
||||
final public const KEY = 'activity_user_id';
|
||||
|
||||
public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivityUsersAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -27,8 +27,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface
|
||||
public function __construct(
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
@ -66,9 +65,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -27,8 +27,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
|
||||
public function __construct(
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
@ -66,9 +65,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByCreatorAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByThirdpartyAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -27,8 +27,7 @@ class CreatorJobAggregator implements AggregatorInterface
|
||||
public function __construct(
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
@ -66,9 +65,7 @@ class CreatorJobAggregator implements AggregatorInterface
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -27,8 +27,7 @@ class CreatorScopeAggregator implements AggregatorInterface
|
||||
public function __construct(
|
||||
private readonly ScopeRepository $scopeRepository,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
@ -66,9 +65,7 @@ class CreatorScopeAggregator implements AggregatorInterface
|
||||
return Declarations::ACTIVITY;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class LocationTypeAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -19,9 +19,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class PersonAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private LabelPersonHelper $labelPersonHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
|
@ -25,9 +25,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
|
||||
{
|
||||
private const PREFIX = 'act_persons_agg';
|
||||
|
||||
public function __construct(private LabelPersonHelper $labelPersonHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
|
@ -19,9 +19,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class SentReceivedAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -36,9 +36,7 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -41,9 +41,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -42,9 +42,7 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -41,9 +41,7 @@ class CountPersonsOnActivity implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -31,8 +31,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
|
||||
private EntityManagerInterface $entityManager,
|
||||
private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper,
|
||||
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
|
@ -33,9 +33,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -34,9 +34,7 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -47,9 +47,7 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@ -40,8 +40,7 @@ class ListActivityHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly TranslatableStringExportLabelHelper $translatableStringLabelHelper,
|
||||
private readonly UserHelper $userHelper
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addSelect(QueryBuilder $qb): void
|
||||
{
|
||||
@ -75,9 +74,7 @@ class ListActivityHelper
|
||||
->addGroupBy('location.id');
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
|
||||
public function getAllowedFormattersTypes()
|
||||
{
|
||||
|
@ -31,8 +31,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
|
||||
private ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -21,9 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class BySocialActionFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly SocialActionRender $actionRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly SocialActionRender $actionRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -21,9 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class BySocialIssueFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly SocialIssueRender $issueRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly SocialIssueRender $issueRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -23,8 +23,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
||||
{
|
||||
public function __construct(
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
|
@ -23,9 +23,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class ActivityDateFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter)
|
||||
{
|
||||
}
|
||||
public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -26,8 +26,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface
|
||||
public function __construct(
|
||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private TranslatorInterface $translator
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
|
@ -27,8 +27,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
||||
public function __construct(
|
||||
protected TranslatableStringHelperInterface $translatableStringHelper,
|
||||
protected ActivityTypeRepositoryInterface $activityTypeRepository
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivityUsersFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly UserRender $userRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByCreatorFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly UserRender $userRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -32,8 +32,7 @@ final readonly class CreatorJobFilter implements FilterInterface
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
private TranslatorInterface $translator,
|
||||
private UserJobRepositoryInterface $userJobRepository,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -29,8 +29,7 @@ class CreatorScopeFilter implements FilterInterface
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -28,9 +28,7 @@ class EmergencyFilter implements FilterInterface
|
||||
|
||||
private const DEFAULT_CHOICE = 'false';
|
||||
|
||||
public function __construct(private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -21,9 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class LocationTypeFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -26,9 +26,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -32,8 +32,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
private ActivityReasonRepository $activityReasonRepository,
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -26,9 +26,7 @@ final readonly class PersonsFilter implements FilterInterface
|
||||
{
|
||||
private const PREFIX = 'act_persons_filter';
|
||||
|
||||
public function __construct(private PersonRenderInterface $personRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private PersonRenderInterface $personRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -29,9 +29,7 @@ class SentReceivedFilter implements FilterInterface
|
||||
|
||||
private const DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT;
|
||||
|
||||
public function __construct(private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -21,9 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class UserFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly UserRender $userRender) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -30,8 +30,7 @@ class UsersJobFilter implements FilterInterface
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly UserJobRepositoryInterface $userJobRepository
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -30,8 +30,7 @@ class UsersScopeFilter implements FilterInterface
|
||||
public function __construct(
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@ -25,9 +25,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class ActivityTypeType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@ -28,8 +28,7 @@ class PickActivityReasonType extends AbstractType
|
||||
private readonly ActivityReasonRepository $activityReasonRepository,
|
||||
private readonly ActivityReasonRender $reasonRender,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
|
@ -23,9 +23,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
class TranslatableActivityReasonCategoryType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class TranslatableActivityType extends AbstractType
|
||||
{
|
||||
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
|
@ -23,9 +23,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(protected Security $security, protected TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(protected Security $security, protected TranslatorInterface $translator) {}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
*/
|
||||
final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(private Security $security)
|
||||
{
|
||||
}
|
||||
public function __construct(private Security $security) {}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
|
@ -23,9 +23,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator) {}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
|
@ -18,9 +18,7 @@ use Chill\MainBundle\Notification\NotificationHandlerInterface;
|
||||
|
||||
final readonly class ActivityNotificationHandler implements NotificationHandlerInterface
|
||||
{
|
||||
public function __construct(private ActivityRepository $activityRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private ActivityRepository $activityRepository) {}
|
||||
|
||||
public function getTemplate(Notification $notification, array $options = []): string
|
||||
{
|
||||
|
@ -44,8 +44,7 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos
|
||||
private EntityManagerInterface $em,
|
||||
private Security $security,
|
||||
private RequestStack $requestStack,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @throws NonUniqueResultException
|
||||
|
@ -33,8 +33,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
|
||||
private CenterResolverManagerInterface $centerResolverManager,
|
||||
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
|
||||
private Security $security
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface
|
||||
{
|
||||
|
@ -51,8 +51,7 @@ class ActivityContext implements
|
||||
private readonly BaseContextData $baseContextData,
|
||||
private readonly ThirdPartyRender $thirdPartyRender,
|
||||
private readonly ThirdPartyRepository $thirdPartyRepository
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function adminFormReverseTransform(array $data): array
|
||||
{
|
||||
|
@ -57,8 +57,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
||||
private readonly ThirdPartyRepository $thirdPartyRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly UserRepository $userRepository
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function adminFormReverseTransform(array $data): array
|
||||
{
|
||||
@ -123,13 +122,13 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
||||
function ($activity) use ($user) {
|
||||
$u = $activity['user'];
|
||||
|
||||
if (null !== $u && $u['username'] === $user->getUsername()) {
|
||||
if (null !== $u && $u['username'] === $user->getUserIdentifier()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$activityUsernames = array_map(static fn ($user) => $user['username'], $activity['users'] ?? []);
|
||||
|
||||
return \in_array($user->getUsername(), $activityUsernames, true);
|
||||
return \in_array($user->getUserIdentifier(), $activityUsernames, true);
|
||||
}
|
||||
)
|
||||
);
|
||||
@ -144,9 +143,9 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
||||
array_filter(
|
||||
$works,
|
||||
function ($work) use ($user) {
|
||||
$workUsernames = array_map(static fn ($user) => $user['username'], $work['referrers'] ?? []);
|
||||
$workUsernames = array_map(static fn (User $user) => $user['username'], $work['referrers'] ?? []);
|
||||
|
||||
return \in_array($user->getUsername(), $workUsernames, true);
|
||||
return \in_array($user->getUserIdentifier(), $workUsernames, true);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
@ -34,8 +34,7 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen
|
||||
private EntityManagerInterface $em,
|
||||
private Security $security,
|
||||
private ActivityDocumentACLAwareRepositoryInterface $activityDocumentACLAwareRepository,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
|
||||
{
|
||||
|
@ -25,8 +25,7 @@ final readonly class PersonActivityGenericDocProvider implements GenericDocForPe
|
||||
public function __construct(
|
||||
private Security $security,
|
||||
private ActivityDocumentACLAwareRepositoryInterface $personActivityDocumentACLAwareRepository,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
|
||||
{
|
||||
|
@ -20,9 +20,7 @@ use Chill\DocStoreBundle\Repository\StoredObjectRepository;
|
||||
|
||||
final readonly class AccompanyingPeriodActivityGenericDocRenderer implements GenericDocRendererInterface
|
||||
{
|
||||
public function __construct(private StoredObjectRepository $objectRepository, private ActivityRepository $activityRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private StoredObjectRepository $objectRepository, private ActivityRepository $activityRepository) {}
|
||||
|
||||
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
|
||||
{
|
||||
|
@ -36,9 +36,9 @@ class ByActivityTypeAggregatorTest extends AbstractAggregatorTest
|
||||
parent::setUp();
|
||||
|
||||
self::bootKernel();
|
||||
$this->rollingDateConverter = self::$container->get(RollingDateConverterInterface::class);
|
||||
$this->activityTypeRepository = self::$container->get(ActivityTypeRepositoryInterface::class);
|
||||
$this->translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class);
|
||||
$this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class);
|
||||
$this->activityTypeRepository = self::getContainer()->get(ActivityTypeRepositoryInterface::class);
|
||||
$this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class);
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
@ -50,7 +50,7 @@ class ByActivityTypeAggregatorTest extends AbstractAggregatorTest
|
||||
);
|
||||
}
|
||||
|
||||
public function getFormData()
|
||||
public static function getFormData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@ -72,11 +72,10 @@ class ByActivityTypeAggregatorTest extends AbstractAggregatorTest
|
||||
];
|
||||
}
|
||||
|
||||
public function getQueryBuilders()
|
||||
public static function getQueryBuilders(): iterable
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
|
@ -29,7 +29,7 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::$container->get('chill.activity.export.bysocialaction_aggregator');
|
||||
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialaction_aggregator');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
@ -37,18 +37,17 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
||||
public function getFormData(): array
|
||||
public static function getFormData(): array
|
||||
{
|
||||
return [
|
||||
[],
|
||||
];
|
||||
}
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
public static function getQueryBuilders(): iterable
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
|
@ -29,7 +29,7 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->aggregator = self::$container->get('chill.activity.export.bysocialissue_aggregator');
|
||||
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialissue_aggregator');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
@ -37,18 +37,17 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
||||
public function getFormData(): array
|
||||
public static function getFormData(): array
|
||||
{
|
||||
return [
|
||||
[],
|
||||
];
|
||||
}
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
public static function getQueryBuilders(): iterable
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
|
@ -31,8 +31,8 @@ class ActivityPresenceAggregatorTest extends AbstractAggregatorTest
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class);
|
||||
$this->activityPresenceRepository = self::$container->get(ActivityPresenceRepositoryInterface::class);
|
||||
$this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class);
|
||||
$this->activityPresenceRepository = self::getContainer()->get(ActivityPresenceRepositoryInterface::class);
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
@ -40,18 +40,17 @@ class ActivityPresenceAggregatorTest extends AbstractAggregatorTest
|
||||
return new ActivityPresenceAggregator($this->activityPresenceRepository, $this->translatableStringHelper);
|
||||
}
|
||||
|
||||
public function getFormData()
|
||||
public static function getFormData(): array
|
||||
{
|
||||
return [
|
||||
[],
|
||||
];
|
||||
}
|
||||
|
||||
public function getQueryBuilders()
|
||||
public static function getQueryBuilders(): iterable
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
|
||||
return [
|
||||
$em->createQueryBuilder()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user