diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92ba61e..c14cee6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.2 coverage: none - name: Download dependencies diff --git a/composer.json b/composer.json index c5d5171..26e2161 100644 --- a/composer.json +++ b/composer.json @@ -7,52 +7,50 @@ "ext-iconv": "*", "composer/package-versions-deprecated": "1.11.99.1", "doctrine/annotations": "^1.0", - "doctrine/doctrine-bundle": "^2.3", + "doctrine/doctrine-bundle": "^2.11", "doctrine/orm": "^2.8", "phpdocumentor/reflection-docblock": "^5.2", - "sensio/framework-extra-bundle": "^6.1", - "symfony/asset": "6.4.*", - "symfony/console": "6.4.*", - "symfony/dotenv": "6.4.*", - "symfony/expression-language": "6.4.*", + "symfony/asset": "*", + "symfony/console": "*", + "symfony/dotenv": "*", + "symfony/expression-language": "*", "symfony/flex": "^1.3.1", - "symfony/form": "6.4.*", - "symfony/framework-bundle": "6.4.*", - "symfony/html-sanitizer": "6.4.*", - "symfony/http-client": "6.4.*", - "symfony/intl": "6.4.*", - "symfony/mailer": "6.4.*", + "symfony/form": "*", + "symfony/framework-bundle": "*", + "symfony/html-sanitizer": "*", + "symfony/http-client": "*", + "symfony/intl": "*", + "symfony/mailer": "*", "symfony/mercure-bundle": "^0.3.2", - "symfony/messenger": "6.4.*", + "symfony/messenger": "*", "symfony/monolog-bundle": "^3.1", - "symfony/notifier": "6.4.*", - "symfony/process": "6.4.*", - "symfony/property-access": "6.4.*", - "symfony/property-info": "6.4.*", - "symfony/proxy-manager-bridge": "6.4.*", - "symfony/rate-limiter": "6.4.*", - "symfony/routing": "6.4.*", - "symfony/security-bundle": "6.4.*", - "symfony/serializer": "6.4.*", - "symfony/translation": "6.4.*", - "symfony/twig-bundle": "6.4.*", - "symfony/uid": "6.4.*", - "symfony/validator": "6.4.*", - "symfony/web-link": "6.4.*", - "symfony/webpack-encore-bundle": "^1.11", - "symfony/yaml": "6.4.*", + "symfony/notifier": "*", + "symfony/process": "*", + "symfony/property-access": "*", + "symfony/property-info": "*", + "symfony/rate-limiter": "*", + "symfony/routing": "*", + "symfony/security-bundle": "*", + "symfony/serializer": "*", + "symfony/translation": "*", + "symfony/twig-bundle": "*", + "symfony/uid": "*", + "symfony/validator": "*", + "symfony/web-link": "*", + "symfony/webpack-encore-bundle": "^2.1", + "symfony/yaml": "*", "twig/extra-bundle": "^3.0", "twig/twig": "^3.0" }, "require-dev": { - "symfony/browser-kit": "6.4.*", - "symfony/css-selector": "6.4.*", - "symfony/debug-bundle": "6.4.*", + "symfony/browser-kit": "*", + "symfony/css-selector": "*", + "symfony/debug-bundle": "*", "symfony/maker-bundle": "^1.0", "symfony/phpunit-bridge": "^5.2", - "symfony/stopwatch": "6.4.*", - "symfony/var-dumper": "6.4.*", - "symfony/web-profiler-bundle": "6.4.*" + "symfony/stopwatch": "*", + "symfony/var-dumper": "*", + "symfony/web-profiler-bundle": "*" }, "config": { "allow-plugins": { @@ -102,7 +100,7 @@ "extra": { "symfony": { "allow-contrib": false, - "require": "6.*" + "require": "7.0.*" } }, "minimum-stability": "dev", diff --git a/config/bundles.php b/config/bundles.php index a065b7d..3154197 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -2,7 +2,6 @@ return [ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], - Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml index 491dc6f..b9d0132 100644 --- a/config/packages/doctrine.yaml +++ b/config/packages/doctrine.yaml @@ -13,7 +13,7 @@ doctrine: mappings: App: is_bundle: false - type: annotation + type: attribute dir: '%kernel.project_dir%/src/Entity' prefix: 'App\Entity' alias: App diff --git a/config/packages/security.yaml b/config/packages/security.yaml new file mode 100644 index 0000000..058cbed --- /dev/null +++ b/config/packages/security.yaml @@ -0,0 +1,39 @@ +security: + # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords + password_hashers: + Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto' + # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider + providers: + users_in_memory: { memory: null } + firewalls: + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + main: + lazy: true + provider: users_in_memory + + # activate different ways to authenticate + # https://symfony.com/doc/current/security.html#the-firewall + + # https://symfony.com/doc/current/security/impersonating_user.html + # switch_user: true + + # Easy way to control access for large sections of your site + # Note: Only the *first* access control that matches will be used + access_control: + # - { path: ^/admin, roles: ROLE_ADMIN } + # - { path: ^/profile, roles: ROLE_USER } + +when@test: + security: + password_hashers: + # By default, password hashers are resource intensive and take time. This is + # important to generate secure password hashes. In tests however, secure hashes + # are not important, waste resources and increase test times. The following + # reduces the work factor to the lowest possible values. + Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: + algorithm: auto + cost: 4 # Lowest possible value for bcrypt + time_cost: 3 # Lowest possible value for argon + memory_cost: 10 # Lowest possible value for argon diff --git a/config/packages/sensio_framework_extra.yaml b/config/packages/sensio_framework_extra.yaml deleted file mode 100644 index 1821ccc..0000000 --- a/config/packages/sensio_framework_extra.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sensio_framework_extra: - router: - annotations: false diff --git a/config/routes.yaml b/config/routes.yaml index c3283aa..2d0ef99 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -1,3 +1,5 @@ -#index: -# path: / -# controller: App\Controller\DefaultController::index +controllers: + resource: + path: ../src/Controller/ + namespace: App\Controller + type: attribute diff --git a/config/routes/annotations.yaml b/config/routes/annotations.yaml deleted file mode 100644 index e92efc5..0000000 --- a/config/routes/annotations.yaml +++ /dev/null @@ -1,7 +0,0 @@ -controllers: - resource: ../../src/Controller/ - type: annotation - -kernel: - resource: ../../src/Kernel.php - type: annotation diff --git a/symfony.lock b/symfony.lock index 2759d35..4182fb6 100644 --- a/symfony.lock +++ b/symfony.lock @@ -83,12 +83,6 @@ "fig/link-util": { "version": "1.2.0" }, - "friendsofphp/proxy-manager-lts": { - "version": "v1.0.5" - }, - "laminas/laminas-code": { - "version": "4.5.0" - }, "lcobucci/clock": { "version": "2.1.0" }, @@ -119,27 +113,12 @@ "psr/event-dispatcher": { "version": "1.0.0" }, - "psr/event-dispatcher": { - "version": "1.0.0" - }, "psr/link": { "version": "1.1.1" }, "psr/log": { "version": "2.0.0" }, - "sensio/framework-extra-bundle": { - "version": "5.6", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.2", - "ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b" - }, - "files": [ - "config/packages/sensio_framework_extra.yaml" - ] - }, "symfony/amqp-messenger": { "version": "v6.0.0" }, @@ -282,18 +261,6 @@ "config/packages/lock.yaml" ] }, - "symfony/lock": { - "version": "6.0", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.2", - "ref": "a1c8800e40ae735206bb14586fdd6c4630a51b8d" - }, - "files": [ - "config/packages/lock.yaml" - ] - }, "symfony/mailer": { "version": "5.4", "recipe": { @@ -432,12 +399,6 @@ "symfony/property-info": { "version": "v5.4.0" }, - "symfony/proxy-manager-bridge": { - "version": "v5.4.0" - }, - "symfony/rate-limiter": { - "version": "v5.4.0" - }, "symfony/rate-limiter": { "version": "v6.0.0" }, @@ -525,9 +486,6 @@ "templates/base.html.twig" ] }, - "symfony/uid": { - "version": "v5.4.0" - }, "symfony/uid": { "version": "v6.0.0" },