Commit 4832bc7e authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Merge branch 'master' into alc-note-intervenant

# Conflicts:
#	module/Intervenant/config/module.config.php
parents fa39bd33 51d02baf
Loading
Loading
Loading
Loading
+54 −64
Changes for composer.lock: 54 added lines, 64 removed lines.
Original line number Diff line number Diff line
@@ -1276,16 +1276,16 @@
        },
        {
            "name": "doctrine/lexer",
            "version": "1.2.2",
            "version": "1.2.3",
            "source": {
                "type": "git",
                "url": "https://github.com/doctrine/lexer.git",
                "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c"
                "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/doctrine/lexer/zipball/9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c",
                "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c",
                "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229",
                "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229",
                "shasum": ""
            },
            "require": {
@@ -1293,7 +1293,7 @@
            },
            "require-dev": {
                "doctrine/coding-standard": "^9.0",
                "phpstan/phpstan": "1.3",
                "phpstan/phpstan": "^1.3",
                "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
                "vimeo/psalm": "^4.11"
            },
@@ -1332,7 +1332,7 @@
            ],
            "support": {
                "issues": "https://github.com/doctrine/lexer/issues",
                "source": "https://github.com/doctrine/lexer/tree/1.2.2"
                "source": "https://github.com/doctrine/lexer/tree/1.2.3"
            },
            "funding": [
                {
@@ -1348,7 +1348,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2022-01-12T08:27:12+00:00"
            "time": "2022-02-28T11:07:21+00:00"
        },
        {
            "name": "doctrine/orm",
@@ -3720,16 +3720,16 @@
        },
        {
            "name": "laminas/laminas-mvc-i18n",
            "version": "1.3.0",
            "version": "1.3.1",
            "source": {
                "type": "git",
                "url": "https://github.com/laminas/laminas-mvc-i18n.git",
                "reference": "1df255e2840eafdd814f5f7f4a46ef192aa5f880"
                "reference": "3f6c81d839507dee8bbf74a09a9bfc65ecd3bb88"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laminas/laminas-mvc-i18n/zipball/1df255e2840eafdd814f5f7f4a46ef192aa5f880",
                "reference": "1df255e2840eafdd814f5f7f4a46ef192aa5f880",
                "url": "https://api.github.com/repos/laminas/laminas-mvc-i18n/zipball/3f6c81d839507dee8bbf74a09a9bfc65ecd3bb88",
                "reference": "3f6c81d839507dee8bbf74a09a9bfc65ecd3bb88",
                "shasum": ""
            },
            "require": {
@@ -3793,7 +3793,7 @@
                    "type": "community_bridge"
                }
            ],
            "time": "2021-11-30T17:32:48+00:00"
            "time": "2022-02-25T14:13:55+00:00"
        },
        {
            "name": "laminas/laminas-mvc-plugin-fileprg",
@@ -5154,41 +5154,36 @@
        },
        {
            "name": "ocramius/proxy-manager",
            "version": "2.13.0",
            "version": "2.14.0",
            "source": {
                "type": "git",
                "url": "https://github.com/Ocramius/ProxyManager.git",
                "reference": "21e2b4aa7d7661e7641cc6362fc8635ddcfa8464"
                "reference": "dbcdf2c925c774d3521107174672665a2f0f7255"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/Ocramius/ProxyManager/zipball/21e2b4aa7d7661e7641cc6362fc8635ddcfa8464",
                "reference": "21e2b4aa7d7661e7641cc6362fc8635ddcfa8464",
                "url": "https://api.github.com/repos/Ocramius/ProxyManager/zipball/dbcdf2c925c774d3521107174672665a2f0f7255",
                "reference": "dbcdf2c925c774d3521107174672665a2f0f7255",
                "shasum": ""
            },
            "require": {
                "composer-runtime-api": "^2.1.0",
                "laminas/laminas-code": "^4.3.0",
                "php": "~7.4.1 || ~8.0.0",
                "laminas/laminas-code": "^4.4.2",
                "php": "~8.0.0",
                "webimpress/safe-writer": "^2.2.0"
            },
            "conflict": {
                "doctrine/annotations": "<1.6.1",
                "laminas/laminas-stdlib": "<3.2.1",
                "thecodingmachine/safe": "<1.3.3",
                "zendframework/zend-stdlib": "<3.2.1"
                "thecodingmachine/safe": "<1.3.3"
            },
            "require-dev": {
                "codelicia/xulieta": "^0.1.6",
                "doctrine/coding-standard": "^8.2.1",
                "doctrine/coding-standard": "^9.0.0",
                "ext-phar": "*",
                "infection/infection": "^0.21.5",
                "nikic/php-parser": "^4.10.5",
                "phpbench/phpbench": "^0.17.1 || 1.0.0-alpha2",
                "phpunit/phpunit": "^9.5.4",
                "slevomat/coding-standard": "^6.3.10",
                "phpbench/phpbench": "^1.0.3",
                "phpunit/phpunit": "^9.5.6",
                "roave/infection-static-analysis-plugin": "^1.8",
                "squizlabs/php_codesniffer": "^3.6.0",
                "vimeo/psalm": "^4.4.1"
                "vimeo/psalm": "^4.8.1"
            },
            "suggest": {
                "laminas/laminas-json": "To have the JsonRpc adapter (Remote Object feature)",
@@ -5197,11 +5192,6 @@
                "ocramius/generated-hydrator": "To have very fast object to array to object conversion for ghost objects"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "3.0.x-dev"
                }
            },
            "autoload": {
                "psr-4": {
                    "ProxyManager\\": "src/ProxyManager"
@@ -5215,7 +5205,7 @@
                {
                    "name": "Marco Pivetta",
                    "email": "ocramius@gmail.com",
                    "homepage": "http://ocramius.github.io/"
                    "homepage": "https://ocramius.github.io/"
                }
            ],
            "description": "A library providing utilities to generate, instantiate and generally operate with Object Proxies",
@@ -5229,7 +5219,7 @@
            ],
            "support": {
                "issues": "https://github.com/Ocramius/ProxyManager/issues",
                "source": "https://github.com/Ocramius/ProxyManager/tree/2.13.0"
                "source": "https://github.com/Ocramius/ProxyManager/tree/2.14.0"
            },
            "funding": [
                {
@@ -5241,7 +5231,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2021-06-09T10:16:06+00:00"
            "time": "2022-02-28T13:55:36+00:00"
        },
        {
            "name": "paragonie/random_compat",
@@ -5742,16 +5732,16 @@
        },
        {
            "name": "symfony/console",
            "version": "v6.0.3",
            "version": "v6.0.5",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/console.git",
                "reference": "22e8efd019c3270c4f79376234a3f8752cd25490"
                "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/symfony/console/zipball/22e8efd019c3270c4f79376234a3f8752cd25490",
                "reference": "22e8efd019c3270c4f79376234a3f8752cd25490",
                "url": "https://api.github.com/repos/symfony/console/zipball/3bebf4108b9e07492a2a4057d207aa5a77d146b1",
                "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1",
                "shasum": ""
            },
            "require": {
@@ -5817,7 +5807,7 @@
                "terminal"
            ],
            "support": {
                "source": "https://github.com/symfony/console/tree/v6.0.3"
                "source": "https://github.com/symfony/console/tree/v6.0.5"
            },
            "funding": [
                {
@@ -5833,7 +5823,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2022-01-26T17:23:29+00:00"
            "time": "2022-02-25T10:48:52+00:00"
        },
        {
            "name": "symfony/deprecation-contracts",
@@ -6672,12 +6662,12 @@
            },
            "type": "library",
            "autoload": {
                "psr-4": {
                    "Symfony\\Component\\String\\": ""
                },
                "files": [
                    "Resources/functions.php"
                ],
                "psr-4": {
                    "Symfony\\Component\\String\\": ""
                },
                "exclude-from-classmap": [
                    "/Tests/"
                ]
@@ -6727,16 +6717,16 @@
        },
        {
            "name": "symfony/var-dumper",
            "version": "v6.0.3",
            "version": "v6.0.5",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/var-dumper.git",
                "reference": "7b701676fc64f9ef11f9b4870f16b48f66be4834"
                "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/7b701676fc64f9ef11f9b4870f16b48f66be4834",
                "reference": "7b701676fc64f9ef11f9b4870f16b48f66be4834",
                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/60d6a756d5f485df5e6e40b337334848f79f61ce",
                "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce",
                "shasum": ""
            },
            "require": {
@@ -6795,7 +6785,7 @@
                "dump"
            ],
            "support": {
                "source": "https://github.com/symfony/var-dumper/tree/v6.0.3"
                "source": "https://github.com/symfony/var-dumper/tree/v6.0.5"
            },
            "funding": [
                {
@@ -6811,7 +6801,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2022-01-17T16:30:44+00:00"
            "time": "2022-02-21T17:15:17+00:00"
        },
        {
            "name": "unicaen/app",
@@ -8320,16 +8310,16 @@
        },
        {
            "name": "symfony/dependency-injection",
            "version": "v6.0.3",
            "version": "v6.0.5",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/dependency-injection.git",
                "reference": "bf53dbf6e8f3eec14f44c53fa4c3b4905ab19ee4"
                "reference": "481846cbd2441cf3444340ee53486fc24da525bd"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/bf53dbf6e8f3eec14f44c53fa4c3b4905ab19ee4",
                "reference": "bf53dbf6e8f3eec14f44c53fa4c3b4905ab19ee4",
                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/481846cbd2441cf3444340ee53486fc24da525bd",
                "reference": "481846cbd2441cf3444340ee53486fc24da525bd",
                "shasum": ""
            },
            "require": {
@@ -8388,7 +8378,7 @@
            "description": "Allows you to standardize and centralize the way objects are constructed in your application",
            "homepage": "https://symfony.com",
            "support": {
                "source": "https://github.com/symfony/dependency-injection/tree/v6.0.3"
                "source": "https://github.com/symfony/dependency-injection/tree/v6.0.5"
            },
            "funding": [
                {
@@ -8404,20 +8394,20 @@
                    "type": "tidelift"
                }
            ],
            "time": "2022-01-26T17:23:29+00:00"
            "time": "2022-02-24T10:01:27+00:00"
        },
        {
            "name": "symfony/filesystem",
            "version": "v6.0.3",
            "version": "v6.0.5",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/filesystem.git",
                "reference": "6ae49c4fda17322171a2b8dc5f70bc6edbc498e1"
                "reference": "6646c13f787057d64701a3a0235cf9567c6ccbbd"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/symfony/filesystem/zipball/6ae49c4fda17322171a2b8dc5f70bc6edbc498e1",
                "reference": "6ae49c4fda17322171a2b8dc5f70bc6edbc498e1",
                "url": "https://api.github.com/repos/symfony/filesystem/zipball/6646c13f787057d64701a3a0235cf9567c6ccbbd",
                "reference": "6646c13f787057d64701a3a0235cf9567c6ccbbd",
                "shasum": ""
            },
            "require": {
@@ -8451,7 +8441,7 @@
            "description": "Provides basic utilities for the filesystem",
            "homepage": "https://symfony.com",
            "support": {
                "source": "https://github.com/symfony/filesystem/tree/v6.0.3"
                "source": "https://github.com/symfony/filesystem/tree/v6.0.5"
            },
            "funding": [
                {
@@ -8467,7 +8457,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2022-01-02T09:55:41+00:00"
            "time": "2022-02-28T07:42:30+00:00"
        },
        {
            "name": "tysonandre/var_representation_polyfill",
+7
Changes for module/Application/src/ConfigFactory.php: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -82,6 +82,13 @@ class ConfigFactory
            ];
        }

        if (isset($config['resources'])) {
            if (!isset($finalConfig['bjyauthorize'])) $finalConfig['bjyauthorize'] = [];
            $finalConfig['bjyauthorize']['resource_providers'] = [
                \BjyAuthorize\Provider\Resource\Config::class => $config['resources'],
            ];
        }

        if (isset($config['controllers'])) {
            $finalConfig['controllers'] = [
                'factories' => $config['controllers'],
+1 −1
Changes for module/Application/src/Form/AbstractForm.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -451,7 +451,7 @@ abstract class AbstractForm extends Form implements InputFilterProviderInterface



    public function readOnly(bool $readOnly)
    public function readOnly(bool $readOnly = true)
    {
        /** @var $element \Laminas\Form\Element */
        foreach ($this->getElements() as $element) {
+9 −13
Changes for module/Application/src/Hydrator/GenericHydrator.php: 9 added lines, 13 removed lines.
Original line number Diff line number Diff line
@@ -61,28 +61,24 @@ class GenericHydrator implements HydratorInterface
                $value = null;
                if (is_string($getter) && method_exists($object, $getter)) {
                    $value = $object->$getter();
                } elseif (is_callable($getter)) {
                    $value = $getter($object, $name);
                } elseif (method_exists($object, $gget = 'get' . ucFirst($name))) {
                    $value = $object->$gget();
                } elseif (method_exists($object, $gis = 'is' . ucFirst($name))) {
                    $value = $object->$gis();
                } elseif (is_callable($getter)) {
                    $value = $getter($name, $object);
                }

                /* Transformation en string */
                if ('float' == $type && is_float($value)) {
                    $value = floatToString($value);
                }
                if ('int' == $type && is_int($value)) {
                } elseif ('int' == $type && is_int($value)) {
                    $value = intToString($value);
                }
                if (('bool' == $type || 'boolean' == $type) && is_bool($value)) {
                } elseif (('bool' == $type || 'boolean' == $type) && is_bool($value)) {
                    $value = booleanToString($value, '1', '0');
                }
                if (\DateTime::class == $type && $value instanceof \DateTime) {
                } elseif (\DateTime::class == $type && $value instanceof \DateTime) {
                    $value = $value->format(Constants::DATE_FORMAT);
                }
                if (class_exists($type) && $value instanceof $type && method_exists($value, 'getId')) {
                } elseif (class_exists($type) && $value instanceof $type && method_exists($value, 'getId')) {
                    $value = (string)$value->getId();
                }

@@ -129,10 +125,10 @@ class GenericHydrator implements HydratorInterface
                }

                /* Injection de la valeur dans l'objet */
                if (is_string($setter) && method_exists($object, $setter)) {
                if (is_callable($setter)) {
                    $setter($object, $value, $name);
                } elseif (is_string($setter) && method_exists($object, $setter)) {
                    $object->$setter($value);
                } elseif (is_callable($setter)) {
                    $setter($object, $name, $value);
                }
            }
        }
+27
Changes for module/Application/src/ORM/Event/Listeners/ParametreEntityListener.php: 27 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ class ParametreEntityListener implements EventSubscriber
        $this->metadata = $this->em->getClassMetadata(get_class($this->entity));
        $this->hydrator = new ClassMethodsHydrator();
        $this->hydrator->setUnderscoreSeparatedKeys(false);
        $disabledFilters = $this->disableFilters();

        /* Gestion de l'historique en délégation à l'HistoriqueListener */
        $histoListener = new HistoriqueListener();
@@ -79,6 +80,8 @@ class ParametreEntityListener implements EventSubscriber
            }
        }

        $this->enableFilters($disabledFilters);

        $this->isSaving = false;
    }

@@ -164,10 +167,12 @@ class ParametreEntityListener implements EventSubscriber
    {
        $next = $this->nextEntities();
        foreach ($next as $entity) {
            if ($entity) {
                $this->em->remove($entity);
                $this->em->flush($entity);
            }
        }
    }



@@ -290,6 +295,28 @@ class ParametreEntityListener implements EventSubscriber



    protected function disableFilters()
    {
        $filters = $this->em->getFilters()->getEnabledFilters();

        foreach ($filters as $name => $filter) {
            $this->em->getFilters()->disable($name);
        }

        return $filters;
    }



    protected function enableFilters(array $filters)
    {
        foreach ($filters as $name => $filter) {
            $this->em->getFilters()->enable($name);
        }
    }



    protected function getColumns(): array
    {
        $columns = $this->metadata->fieldNames;
Loading