diff --git a/composer.lock b/composer.lock index 6176aa8..2ec87f7 100644 --- a/composer.lock +++ b/composer.lock @@ -354,16 +354,16 @@ }, { "name": "doctrine/dbal", - "version": "3.6.6", + "version": "3.6.7", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "63646ffd71d1676d2f747f871be31b7e921c7864" + "reference": "8e0e268052b4a8974cb00215bb2892787021614f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/63646ffd71d1676d2f747f871be31b7e921c7864", - "reference": "63646ffd71d1676d2f747f871be31b7e921c7864", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/8e0e268052b4a8974cb00215bb2892787021614f", + "reference": "8e0e268052b4a8974cb00215bb2892787021614f", "shasum": "" }, "require": { @@ -379,9 +379,9 @@ "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "1.10.29", + "phpstan/phpstan": "1.10.34", "phpstan/phpstan-strict-rules": "^1.5", - "phpunit/phpunit": "9.6.9", + "phpunit/phpunit": "9.6.12", "psalm/plugin-phpunit": "0.18.4", "slevomat/coding-standard": "8.13.1", "squizlabs/php_codesniffer": "3.7.2", @@ -447,7 +447,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.6.6" + "source": "https://github.com/doctrine/dbal/tree/3.6.7" }, "funding": [ { @@ -463,7 +463,7 @@ "type": "tidelift" } ], - "time": "2023-08-17T05:38:17+00:00" + "time": "2023-09-19T20:15:41+00:00" }, { "name": "doctrine/deprecations", @@ -1932,16 +1932,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.0", + "version": "1.24.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6" + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/3510b0a6274cc42f7219367cb3abfc123ffa09d6", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", "shasum": "" }, "require": { @@ -1973,9 +1973,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.1" }, - "time": "2023-09-07T20:46:32+00:00" + "time": "2023-09-18T12:18:02+00:00" }, { "name": "psr/cache", @@ -6528,7 +6528,7 @@ }, { "name": "symfony/stimulus-bundle", - "version": "v2.11.1", + "version": "v2.12.0", "source": { "type": "git", "url": "https://github.com/symfony/stimulus-bundle.git", @@ -6576,7 +6576,7 @@ "symfony-ux" ], "support": { - "source": "https://github.com/symfony/stimulus-bundle/tree/v2.11.1" + "source": "https://github.com/symfony/stimulus-bundle/tree/v2.12.0" }, "funding": [ { @@ -7184,16 +7184,16 @@ }, { "name": "symfony/ux-live-component", - "version": "v2.11.2", + "version": "v2.12.0", "source": { "type": "git", "url": "https://github.com/symfony/ux-live-component.git", - "reference": "7e85291b0ddec9a720402d687d2842eac640b773" + "reference": "fa06930aa718b0120ab067e0235416378ce26b05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/ux-live-component/zipball/7e85291b0ddec9a720402d687d2842eac640b773", - "reference": "7e85291b0ddec9a720402d687d2842eac640b773", + "url": "https://api.github.com/repos/symfony/ux-live-component/zipball/fa06930aa718b0120ab067e0235416378ce26b05", + "reference": "fa06930aa718b0120ab067e0235416378ce26b05", "shasum": "" }, "require": { @@ -7255,7 +7255,7 @@ "twig" ], "support": { - "source": "https://github.com/symfony/ux-live-component/tree/v2.11.2" + "source": "https://github.com/symfony/ux-live-component/tree/v2.12.0" }, "funding": [ { @@ -7271,20 +7271,20 @@ "type": "tidelift" } ], - "time": "2023-09-07T15:13:44+00:00" + "time": "2023-09-22T13:26:20+00:00" }, { "name": "symfony/ux-twig-component", - "version": "v2.11.2", + "version": "v2.12.0", "source": { "type": "git", "url": "https://github.com/symfony/ux-twig-component.git", - "reference": "1d6f7656a788e1fe6075a3bf364d8bb6be663456" + "reference": "adafcd7b561a7e6bf4c8e7d05af99c8fe0dd35f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/ux-twig-component/zipball/1d6f7656a788e1fe6075a3bf364d8bb6be663456", - "reference": "1d6f7656a788e1fe6075a3bf364d8bb6be663456", + "url": "https://api.github.com/repos/symfony/ux-twig-component/zipball/adafcd7b561a7e6bf4c8e7d05af99c8fe0dd35f7", + "reference": "adafcd7b561a7e6bf4c8e7d05af99c8fe0dd35f7", "shasum": "" }, "require": { @@ -7299,6 +7299,7 @@ "symfony/config": "<5.4.0" }, "require-dev": { + "symfony/console": "^5.4|^6.0", "symfony/css-selector": "^5.4|^6.0", "symfony/dom-crawler": "^5.4|^6.0", "symfony/framework-bundle": "^5.4|^6.0", @@ -7337,7 +7338,7 @@ "twig" ], "support": { - "source": "https://github.com/symfony/ux-twig-component/tree/v2.11.2" + "source": "https://github.com/symfony/ux-twig-component/tree/v2.12.0" }, "funding": [ { @@ -7353,7 +7354,7 @@ "type": "tidelift" } ], - "time": "2023-09-07T14:51:36+00:00" + "time": "2023-09-22T13:26:20+00:00" }, { "name": "symfony/validator", @@ -7766,16 +7767,16 @@ }, { "name": "symfonycasts/reset-password-bundle", - "version": "v1.17.0", + "version": "v1.18.0", "source": { "type": "git", "url": "https://github.com/SymfonyCasts/reset-password-bundle.git", - "reference": "6601f15fce7a4934bc9570f76feaf1b93536b1a7" + "reference": "9906cebac5676adf5d05384dfeebd7cac7c0da83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SymfonyCasts/reset-password-bundle/zipball/6601f15fce7a4934bc9570f76feaf1b93536b1a7", - "reference": "6601f15fce7a4934bc9570f76feaf1b93536b1a7", + "url": "https://api.github.com/repos/SymfonyCasts/reset-password-bundle/zipball/9906cebac5676adf5d05384dfeebd7cac7c0da83", + "reference": "9906cebac5676adf5d05384dfeebd7cac7c0da83", "shasum": "" }, "require": { @@ -7810,9 +7811,9 @@ "description": "Symfony bundle that adds password reset functionality.", "support": { "issues": "https://github.com/SymfonyCasts/reset-password-bundle/issues", - "source": "https://github.com/SymfonyCasts/reset-password-bundle/tree/v1.17.0" + "source": "https://github.com/SymfonyCasts/reset-password-bundle/tree/v1.18.0" }, - "time": "2023-02-02T15:11:33+00:00" + "time": "2023-09-19T14:10:50+00:00" }, { "name": "symfonycasts/tailwind-bundle", @@ -8682,16 +8683,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.34", + "version": "1.10.35", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "7f806b6f1403e6914c778140e2ba07c293cb4901" + "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7f806b6f1403e6914c778140e2ba07c293cb4901", - "reference": "7f806b6f1403e6914c778140e2ba07c293cb4901", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e730e5facb75ffe09dfb229795e8c01a459f26c3", + "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3", "shasum": "" }, "require": { @@ -8740,7 +8741,7 @@ "type": "tidelift" } ], - "time": "2023-09-13T09:49:47+00:00" + "time": "2023-09-19T15:27:56+00:00" }, { "name": "phpstan/phpstan-beberlei-assert", @@ -9014,16 +9015,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.5", + "version": "10.1.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "1df504e42a88044c27a90136910f0b3fe9e91939" + "reference": "56f33548fe522c8d82da7ff3824b42829d324364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1df504e42a88044c27a90136910f0b3fe9e91939", - "reference": "1df504e42a88044c27a90136910f0b3fe9e91939", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/56f33548fe522c8d82da7ff3824b42829d324364", + "reference": "56f33548fe522c8d82da7ff3824b42829d324364", "shasum": "" }, "require": { @@ -9080,7 +9081,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.5" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.6" }, "funding": [ { @@ -9088,7 +9089,7 @@ "type": "github" } ], - "time": "2023-09-12T14:37:22+00:00" + "time": "2023-09-19T04:59:03+00:00" }, { "name": "phpunit/php-file-iterator", @@ -9335,16 +9336,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.3.4", + "version": "10.3.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b8d59476f19115c9774b3b447f78131781c6c32b" + "reference": "747c3b2038f1139e3dcd9886a3f5a948648b7503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b8d59476f19115c9774b3b447f78131781c6c32b", - "reference": "b8d59476f19115c9774b3b447f78131781c6c32b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/747c3b2038f1139e3dcd9886a3f5a948648b7503", + "reference": "747c3b2038f1139e3dcd9886a3f5a948648b7503", "shasum": "" }, "require": { @@ -9368,7 +9369,7 @@ "sebastian/comparator": "^5.0", "sebastian/diff": "^5.0", "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.0", + "sebastian/exporter": "^5.1", "sebastian/global-state": "^6.0.1", "sebastian/object-enumerator": "^5.0", "sebastian/recursion-context": "^5.0", @@ -9416,7 +9417,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.5" }, "funding": [ { @@ -9432,7 +9433,7 @@ "type": "tidelift" } ], - "time": "2023-09-12T14:42:28+00:00" + "time": "2023-09-19T05:42:37+00:00" }, { "name": "rector/rector", @@ -9496,12 +9497,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "a4a221e6b171fe5eadf48e21ad8247304738bcd5" + "reference": "2bb2ab84c07741bb617b6e012dfcbbea687cb172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/a4a221e6b171fe5eadf48e21ad8247304738bcd5", - "reference": "a4a221e6b171fe5eadf48e21ad8247304738bcd5", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/2bb2ab84c07741bb617b6e012dfcbbea687cb172", + "reference": "2bb2ab84c07741bb617b6e012dfcbbea687cb172", "shasum": "" }, "conflict": { @@ -9684,7 +9685,7 @@ "getkirby/panel": "<2.5.14", "getkirby/starterkit": "<=3.7.0.2", "gilacms/gila": "<=1.11.4", - "gleez/cms": "<=1.2", + "gleez/cms": "<=1.2|==2", "globalpayments/php-sdk": "<2", "gogentooss/samlbase": "<1.2.7", "google/protobuf": "<3.15", @@ -9721,7 +9722,7 @@ "in2code/ipandlanguageredirect": "<5.1.2", "in2code/lux": "<17.6.1|>=18,<24.0.2", "innologi/typo3-appointments": "<2.0.6", - "intelliants/subrion": "<=4.2.1", + "intelliants/subrion": "<4.2.2", "islandora/islandora": ">=2,<2.4.1", "ivankristianto/phpwhois": "<=4.3", "jackalope/jackalope-doctrine-dbal": "<1.7.4", @@ -9806,6 +9807,7 @@ "neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", "neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3", "neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<5.3.10|>=7,<7.0.9|>=7.1,<7.1.7|>=7.2,<7.2.6|>=7.3,<7.3.4|>=8,<8.0.2", + "neos/neos-ui": "<=8.3.3", "neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", @@ -9962,7 +9964,6 @@ "stormpath/sdk": "<9.9.99", "studio-42/elfinder": "<2.1.62", "subhh/libconnect": "<7.0.8|>=8,<8.1", - "subrion/cms": "<=4.2.1", "sukohi/surpass": "<1", "sulu/sulu": "<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8|==2.4.0.0-RC1|>=2.5,<2.5.10", "sumocoders/framework-user-bundle": "<1.4", @@ -10032,7 +10033,7 @@ "truckersmp/phpwhois": "<=4.3.1", "ttskch/pagination-service-provider": "<1", "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", - "typo3/cms": "<8.7.38|>=9,<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", + "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/cms-core": "<8.7.51|>=9,<9.5.42|>=10,<10.4.39|>=11,<11.5.30|>=12,<12.4.4", "typo3/cms-extbase": "<6.2.24|>=7,<7.6.8|==8.1.1", @@ -10157,7 +10158,7 @@ "type": "tidelift" } ], - "time": "2023-09-15T19:04:11+00:00" + "time": "2023-09-21T18:04:33+00:00" }, { "name": "sebastian/cli-parser", @@ -10594,16 +10595,16 @@ }, { "name": "sebastian/exporter", - "version": "5.0.1", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "32ff03d078fed1279c4ec9a407d08c5e9febb480" + "reference": "c3fa8483f9539b190f7cd4bfc4a07631dd1df344" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/32ff03d078fed1279c4ec9a407d08c5e9febb480", - "reference": "32ff03d078fed1279c4ec9a407d08c5e9febb480", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c3fa8483f9539b190f7cd4bfc4a07631dd1df344", + "reference": "c3fa8483f9539b190f7cd4bfc4a07631dd1df344", "shasum": "" }, "require": { @@ -10660,7 +10661,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.0" }, "funding": [ { @@ -10668,7 +10669,7 @@ "type": "github" } ], - "time": "2023-09-08T04:46:58+00:00" + "time": "2023-09-18T07:15:37+00:00" }, { "name": "sebastian/global-state", @@ -11414,16 +11415,16 @@ }, { "name": "symfony/maker-bundle", - "version": "v1.51.0", + "version": "v1.51.1", "source": { "type": "git", "url": "https://github.com/symfony/maker-bundle.git", - "reference": "d5684e5628d545a67ba833adcd216e7029f3e506" + "reference": "0890fd3cf1e2a5221f9b3c6ee1769c537aef683d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/d5684e5628d545a67ba833adcd216e7029f3e506", - "reference": "d5684e5628d545a67ba833adcd216e7029f3e506", + "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/0890fd3cf1e2a5221f9b3c6ee1769c537aef683d", + "reference": "0890fd3cf1e2a5221f9b3c6ee1769c537aef683d", "shasum": "" }, "require": { @@ -11486,7 +11487,7 @@ ], "support": { "issues": "https://github.com/symfony/maker-bundle/issues", - "source": "https://github.com/symfony/maker-bundle/tree/v1.51.0" + "source": "https://github.com/symfony/maker-bundle/tree/v1.51.1" }, "funding": [ { @@ -11502,7 +11503,7 @@ "type": "tidelift" } ], - "time": "2023-09-12T18:09:19+00:00" + "time": "2023-09-18T18:17:31+00:00" }, { "name": "symfony/phpunit-bridge", diff --git a/ecs.php b/ecs.php index 02a04df..d580ae8 100644 --- a/ecs.php +++ b/ecs.php @@ -96,9 +96,6 @@ ] ); - $config->services() - ->remove(PhpUnitTestClassRequiresCoversFixer::class); - $config->parallel(); $config->paths([__DIR__]); $config->skip([ @@ -109,6 +106,7 @@ __DIR__ . '/heroku', __DIR__ . '/public', __DIR__ . '/var', + PhpUnitTestClassRequiresCoversFixer::class, ]) ; }; diff --git a/importmap.php b/importmap.php index f617dbf..bbe9cf5 100644 --- a/importmap.php +++ b/importmap.php @@ -1,18 +1,6 @@ [ 'path' => 'app.js', diff --git a/rector.php b/rector.php index da57b23..1dfaf29 100644 --- a/rector.php +++ b/rector.php @@ -18,23 +18,20 @@ $rectorConfig->sets([ SetList::DEAD_CODE, LevelSetList::UP_TO_PHP_82, - SymfonyLevelSetList::UP_TO_SYMFONY_62, + SymfonyLevelSetList::UP_TO_SYMFONY_63, SymfonySetList::SYMFONY_CODE_QUALITY, SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION, + SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES, + DoctrineSetList::DOCTRINE_ORM_214, DoctrineSetList::DOCTRINE_CODE_QUALITY, DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES, - PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD, PHPUnitLevelSetList::UP_TO_PHPUNIT_100, PHPUnitSetList::PHPUNIT_CODE_QUALITY, - PHPUnitSetList::PHPUNIT_EXCEPTION, - PHPUnitSetList::REMOVE_MOCKS, - PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER, + PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES, ]); - $rectorConfig->services() - ->remove(RemoveExtraParametersRector::class); $rectorConfig->phpVersion(PhpVersion::PHP_82); $rectorConfig->paths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/tests']); - $rectorConfig->skip([__DIR__ . '/config/bundles.php']); + $rectorConfig->skip([__DIR__ . '/config/bundles.php', RemoveExtraParametersRector::class]); $rectorConfig->parallel(); $rectorConfig->importNames(); $rectorConfig->importShortClasses(); diff --git a/src/Command/Init/InitCitiesCommand.php b/src/Command/Init/InitCitiesCommand.php index d04e8c4..98828ee 100644 --- a/src/Command/Init/InitCitiesCommand.php +++ b/src/Command/Init/InitCitiesCommand.php @@ -7,15 +7,15 @@ use App\Entity\City; use App\Repository\CityRepository; use App\Repository\DepartmentRepository; -use function count; -use function is_string; -use const JSON_THROW_ON_ERROR; use RuntimeException; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +use function count; +use function is_string; +use const JSON_THROW_ON_ERROR; #[AsCommand(name: 'app:init:cities', description: 'Initialisation des villes',)] final class InitCitiesCommand extends Command diff --git a/src/Command/Init/InitDeparmentsCommand.php b/src/Command/Init/InitDeparmentsCommand.php index f3550a5..f34977a 100644 --- a/src/Command/Init/InitDeparmentsCommand.php +++ b/src/Command/Init/InitDeparmentsCommand.php @@ -7,15 +7,15 @@ use App\Entity\Department; use App\Repository\DepartmentRepository; use App\Repository\RegionRepository; -use function count; -use function is_string; -use const JSON_THROW_ON_ERROR; use RuntimeException; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +use function count; +use function is_string; +use const JSON_THROW_ON_ERROR; #[AsCommand(name: 'app:init:departments', description: 'Initialisation des départements',)] final class InitDeparmentsCommand extends Command diff --git a/src/Command/Init/InitRegionsCommand.php b/src/Command/Init/InitRegionsCommand.php index 0bc1ae4..502174e 100644 --- a/src/Command/Init/InitRegionsCommand.php +++ b/src/Command/Init/InitRegionsCommand.php @@ -6,15 +6,15 @@ use App\Entity\Region; use App\Repository\RegionRepository; -use function count; -use function is_string; -use const JSON_THROW_ON_ERROR; use RuntimeException; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +use function count; +use function is_string; +use const JSON_THROW_ON_ERROR; #[AsCommand(name: 'app:init:regions', description: 'Initialisation des régions',)] final class InitRegionsCommand extends Command diff --git a/src/Command/Init/InitUsersCommand.php b/src/Command/Init/InitUsersCommand.php index e25798d..6abeb01 100644 --- a/src/Command/Init/InitUsersCommand.php +++ b/src/Command/Init/InitUsersCommand.php @@ -6,9 +6,6 @@ use App\Entity\User; use App\Repository\UserRepository; -use function count; -use function is_string; -use const JSON_THROW_ON_ERROR; use RuntimeException; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; @@ -17,6 +14,9 @@ use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface; use Symfony\Component\Uid\Ulid; +use function count; +use function is_string; +use const JSON_THROW_ON_ERROR; #[AsCommand(name: 'app:init:users', description: 'User initialization')] final class InitUsersCommand extends Command @@ -35,9 +35,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $hasher = $this->hasherFactory->getPasswordHasher(User::class); $data = file_get_contents($this->projectDirectory . '/data/users.json'); - is_string($data) || throw new RuntimeException( - 'Unable to find user data.' - ); + is_string($data) || throw new RuntimeException('Unable to find user data.'); /** @var array}> $users */ $users = json_decode($data, true, 512, JSON_THROW_ON_ERROR); diff --git a/src/Command/User/DemoteUserCommand.php b/src/Command/User/DemoteUserCommand.php index 819d8a0..7dd6571 100644 --- a/src/Command/User/DemoteUserCommand.php +++ b/src/Command/User/DemoteUserCommand.php @@ -5,13 +5,13 @@ namespace App\Command\User; use App\Repository\UserRepository; -use function is_array; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +use function is_array; #[AsCommand('app:user:demote')] final class DemoteUserCommand extends Command diff --git a/src/Command/User/PromoteUserCommand.php b/src/Command/User/PromoteUserCommand.php index ac30977..85b6dfa 100644 --- a/src/Command/User/PromoteUserCommand.php +++ b/src/Command/User/PromoteUserCommand.php @@ -5,13 +5,13 @@ namespace App\Command\User; use App\Repository\UserRepository; -use function is_array; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +use function is_array; #[AsCommand('app:user:promote')] final class PromoteUserCommand extends Command diff --git a/src/Kernel.php b/src/Kernel.php index 35ffaa5..779cd1f 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -5,7 +5,7 @@ use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Component\HttpKernel\Kernel as BaseKernel; -final class Kernel extends BaseKernel +class Kernel extends BaseKernel { use MicroKernelTrait; } diff --git a/src/Repository/DepartmentRepository.php b/src/Repository/DepartmentRepository.php index c92b6d4..7bc45d8 100644 --- a/src/Repository/DepartmentRepository.php +++ b/src/Repository/DepartmentRepository.php @@ -52,28 +52,28 @@ public function remove(Department $entity, bool $flush = false): void } } -// /** -// * @return Department[] Returns an array of Department objects -// */ -// public function findByExampleField($value): array -// { -// return $this->createQueryBuilder('d') -// ->andWhere('d.exampleField = :val') -// ->setParameter('val', $value) -// ->orderBy('d.id', 'ASC') -// ->setMaxResults(10) -// ->getQuery() -// ->getResult() -// ; -// } + // /** + // * @return Department[] Returns an array of Department objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('d') + // ->andWhere('d.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('d.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } -// public function findOneBySomeField($value): ?Department -// { -// return $this->createQueryBuilder('d') -// ->andWhere('d.exampleField = :val') -// ->setParameter('val', $value) -// ->getQuery() -// ->getOneOrNullResult() -// ; -// } + // public function findOneBySomeField($value): ?Department + // { + // return $this->createQueryBuilder('d') + // ->andWhere('d.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } } diff --git a/src/Repository/MeasureRepository.php b/src/Repository/MeasureRepository.php index 0bdff97..84baf8b 100644 --- a/src/Repository/MeasureRepository.php +++ b/src/Repository/MeasureRepository.php @@ -45,28 +45,28 @@ public function remove(Measure $entity, bool $flush = false): void } } -// /** -// * @return Measure[] Returns an array of Measure objects -// */ -// public function findByExampleField($value): array -// { -// return $this->createQueryBuilder('m') -// ->andWhere('m.exampleField = :val') -// ->setParameter('val', $value) -// ->orderBy('m.id', 'ASC') -// ->setMaxResults(10) -// ->getQuery() -// ->getResult() -// ; -// } + // /** + // * @return Measure[] Returns an array of Measure objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('m') + // ->andWhere('m.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('m.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } -// public function findOneBySomeField($value): ?Measure -// { -// return $this->createQueryBuilder('m') -// ->andWhere('m.exampleField = :val') -// ->setParameter('val', $value) -// ->getQuery() -// ->getOneOrNullResult() -// ; -// } + // public function findOneBySomeField($value): ?Measure + // { + // return $this->createQueryBuilder('m') + // ->andWhere('m.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } } diff --git a/src/Repository/RegionRepository.php b/src/Repository/RegionRepository.php index c2953dd..4cb1eac 100644 --- a/src/Repository/RegionRepository.php +++ b/src/Repository/RegionRepository.php @@ -52,28 +52,28 @@ public function flush(): void ->clear(); } -// /** -// * @return Region[] Returns an array of Region objects -// */ -// public function findByExampleField($value): array -// { -// return $this->createQueryBuilder('r') -// ->andWhere('r.exampleField = :val') -// ->setParameter('val', $value) -// ->orderBy('r.id', 'ASC') -// ->setMaxResults(10) -// ->getQuery() -// ->getResult() -// ; -// } + // /** + // * @return Region[] Returns an array of Region objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('r') + // ->andWhere('r.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('r.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } -// public function findOneBySomeField($value): ?Region -// { -// return $this->createQueryBuilder('r') -// ->andWhere('r.exampleField = :val') -// ->setParameter('val', $value) -// ->getQuery() -// ->getOneOrNullResult() -// ; -// } + // public function findOneBySomeField($value): ?Region + // { + // return $this->createQueryBuilder('r') + // ->andWhere('r.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } } diff --git a/src/Security/UserProvider.php b/src/Security/UserProvider.php index aea8987..6c75b4a 100644 --- a/src/Security/UserProvider.php +++ b/src/Security/UserProvider.php @@ -26,9 +26,7 @@ public function loadUserByIdentifier(string $identifier): UserInterface return $user; } - /** - * {@inheritdoc} - */ + public function refreshUser(UserInterface $user): UserInterface { if (! $this->supportsClass($user::class)) { diff --git a/templates/components/search_cities.html.twig b/templates/components/search_cities.html.twig index 0d8f574..bf71ace 100644 --- a/templates/components/search_cities.html.twig +++ b/templates/components/search_cities.html.twig @@ -21,6 +21,8 @@ {% else %} -
No city matches "{{ query }}"
+ {% if not query == '' %} +
No city matches "{{ query }}"
+ {% endif %} {% endif %} diff --git a/templates/dashboard/index.html.twig b/templates/dashboard/index.html.twig index 74a1169..19ae371 100644 --- a/templates/dashboard/index.html.twig +++ b/templates/dashboard/index.html.twig @@ -3,8 +3,8 @@ {% block title %}Community records{% endblock %} {% block content %} -
-
+
+

Choose a city

@@ -12,9 +12,10 @@
-

- {{ component('search_cities') }} -

+

+ {{ component('search_cities') }} +

+
{% endblock %} diff --git a/test.php b/test.php new file mode 100644 index 0000000..d9c6689 --- /dev/null +++ b/test.php @@ -0,0 +1,40 @@ +getAlias('logger') + ->setPublic(true); + $container->getDefinition('monolog.handler.console') + ->setPublic(true); + } + }; + $k->boot(); + $c = $k->getContainer(); + + $c->get('monolog.handler.console') + ->setOutput(new StreamOutput(fopen('php://stdout', 'w'), StreamOutput::VERBOSITY_VERY_VERBOSE)); + + $logger = $c->get('logger'); + $em = $c->get('doctrine.orm.entity_manager'); + + // Start of playground +}; diff --git a/tests/Benchmark/Sha256HashTimeBench.php b/tests/Benchmark/Sha256HashTimeBench.php index ba08f16..5805349 100644 --- a/tests/Benchmark/Sha256HashTimeBench.php +++ b/tests/Benchmark/Sha256HashTimeBench.php @@ -4,8 +4,8 @@ namespace App\Tests\Benchmark; -use const PASSWORD_BCRYPT; use PhpBench\Benchmark\Metadata\Annotations\Revs; +use const PASSWORD_BCRYPT; final class Sha256HashTimeBench {