From 52cdefed496969f9c13f398d562c0de49b5166b9 Mon Sep 17 00:00:00 2001 From: Tim Goudriaan Date: Fri, 10 Jan 2025 14:32:31 +0100 Subject: [PATCH] Update Symfony recipes --- .env | 21 +++- .env.dev | 0 bin/console | 4 + bin/phpunit | 10 +- config/packages/doctrine.yaml | 10 +- config/packages/doctrine_migrations.yaml | 2 +- config/packages/framework.yaml | 3 +- config/packages/messenger.yaml | 9 ++ config/packages/monolog.yaml | 5 +- config/packages/notifier.yaml | 2 + config/packages/security.yaml | 1 + config/packages/sentry.yaml | 23 ++++ config/packages/translation.yaml | 8 +- config/packages/twig.yaml | 1 + config/packages/web_profiler.yaml | 4 +- config/packages/webpack_encore.yaml | 5 + config/routes.yaml | 8 +- config/routes/annotations.yaml | 7 -- config/routes/security.yaml | 3 + package.json | 7 +- phpunit.xml.dist | 6 +- symfony.lock | 154 +++++++++++------------ tests/bootstrap.php | 8 +- webpack.config.js | 10 ++ 24 files changed, 197 insertions(+), 114 deletions(-) create mode 100644 .env.dev delete mode 100644 config/routes/annotations.yaml create mode 100644 config/routes/security.yaml diff --git a/.env b/.env index 5123647f..907ee596 100644 --- a/.env +++ b/.env @@ -1,3 +1,19 @@ +# In all environments, the following files are loaded if they exist, +# the latter taking precedence over the former: +# +# * .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 + COMPOSE_PROJECT_NAME=na-website ### Runtime variables @@ -43,7 +59,8 @@ APP_SECRET=86e65e43da3975441a202235908a0a52 # # DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" DATABASE_URL="mysql://dudenamedben:dudettenamedbernadette@database:3306/noagenda?serverVersion=8" -# DATABASE_URL="postgresql://symfony:ChangeMe@127.0.0.1:5432/app?serverVersion=13&charset=utf8" +# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4" +# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" ###< doctrine/doctrine-bundle ### ###> sentry/sentry-symfony ### @@ -58,9 +75,9 @@ MAILER_FROM_AUTHOR="No Agenda Website" ###> symfony/messenger ### # Choose one of the transports below -# MESSENGER_TRANSPORT_DSN=doctrine://default # MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages # MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages +MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 ###< symfony/messenger ### ###> symfony/telegram-notifier ### diff --git a/.env.dev b/.env.dev new file mode 100644 index 00000000..e69de29b diff --git a/bin/console b/bin/console index c933dc53..d8d530e2 100755 --- a/bin/console +++ b/bin/console @@ -4,6 +4,10 @@ use App\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; +if (!is_dir(dirname(__DIR__).'/vendor')) { + throw new LogicException('Dependencies are missing. Try running "composer install".'); +} + if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); } diff --git a/bin/phpunit b/bin/phpunit index f26f2c72..692baccb 100755 --- a/bin/phpunit +++ b/bin/phpunit @@ -6,9 +6,13 @@ if (!ini_get('date.timezone')) { } if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { - define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); - require PHPUNIT_COMPOSER_INSTALL; - PHPUnit\TextUI\Command::main(); + if (PHP_VERSION_ID >= 80000) { + require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit'; + } else { + define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); + require PHPUNIT_COMPOSER_INSTALL; + PHPUnit\TextUI\Command::main(); + } } else { if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml index 32012808..24240769 100644 --- a/config/packages/doctrine.yaml +++ b/config/packages/doctrine.yaml @@ -8,13 +8,20 @@ doctrine: # IMPORTANT: You MUST configure your server version, # either here or in the DATABASE_URL env var (see .env file) - #server_version: '13' + #server_version: '16' + + profiling_collect_backtrace: '%kernel.debug%' + use_savepoints: true orm: auto_generate_proxy_classes: true + enable_lazy_ghost_objects: true + report_fields_where_declared: true + validate_xml_mapping: true naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware auto_mapping: true mappings: App: + type: attribute is_bundle: false dir: '%kernel.project_dir%/src/Entity' prefix: 'App\Entity' @@ -30,6 +37,7 @@ when@prod: &doctrine_prod doctrine: orm: auto_generate_proxy_classes: false + proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies' query_cache_driver: type: pool pool: doctrine.system_cache_pool diff --git a/config/packages/doctrine_migrations.yaml b/config/packages/doctrine_migrations.yaml index a0a17a08..29231d94 100644 --- a/config/packages/doctrine_migrations.yaml +++ b/config/packages/doctrine_migrations.yaml @@ -3,4 +3,4 @@ doctrine_migrations: # namespace is arbitrary but should be different from App\Migrations # as migrations classes should NOT be autoloaded 'DoctrineMigrations': '%kernel.project_dir%/migrations' - enable_profiler: '%kernel.debug%' + enable_profiler: false diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index d0c9a23f..2f302344 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -3,7 +3,9 @@ framework: secret: '%env(APP_SECRET)%' #csrf_protection: true http_cache: true + annotations: false http_method_override: false + handle_all_throwables: true trusted_proxies: '%env(string:default::TRUSTED_PROXIES)%' trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix'] @@ -14,7 +16,6 @@ framework: handler_id: null cookie_secure: auto cookie_samesite: lax - storage_factory_id: session.storage.factory.native #esi: true #fragments: true diff --git a/config/packages/messenger.yaml b/config/packages/messenger.yaml index c1f63b1b..965eb8dc 100644 --- a/config/packages/messenger.yaml +++ b/config/packages/messenger.yaml @@ -21,6 +21,7 @@ framework: queue_name: failed auto_setup: false + # Route your messages to the transports routing: 'App\Message\Crawl': crawler 'App\Message\PrepareEpisode': crawler @@ -45,3 +46,11 @@ framework: doctrine_close_connection - doctrine_transaction + +# when@test: +# framework: +# messenger: +# transports: +# # replace with your transport name here (e.g., my_transport: 'in-memory://') +# # For more Messenger testing tools, see https://github.com/zenstruck/messenger-test +# async: 'in-memory://' diff --git a/config/packages/monolog.yaml b/config/packages/monolog.yaml index 3b7eb153..752466d3 100644 --- a/config/packages/monolog.yaml +++ b/config/packages/monolog.yaml @@ -99,8 +99,9 @@ when@staging: deprecation: type: rotating_file channels: [deprecation] - path: "%kernel.logs_dir%/deprecation.log" - max_files: 28 + path: php://stderr + formatter: monolog.formatter.json + crawler_console: type: console channels: [crawler] diff --git a/config/packages/notifier.yaml b/config/packages/notifier.yaml index 9075c544..c7915c2b 100644 --- a/config/packages/notifier.yaml +++ b/config/packages/notifier.yaml @@ -3,4 +3,6 @@ framework: channel_policy: high: ['chat/notifications'] chatter_transports: + telegram: '%env(TELEGRAM_DSN)%' notifications: '%env(APP_NOTIFICATIONS_DSN)%' + texter_transports: diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 10e87987..608793be 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -4,6 +4,7 @@ security: ROLE_ADMIN: ROLE_MOD ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] + # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords password_hashers: Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: bcrypt diff --git a/config/packages/sentry.yaml b/config/packages/sentry.yaml index af3fa6e8..a24ee2d2 100644 --- a/config/packages/sentry.yaml +++ b/config/packages/sentry.yaml @@ -4,8 +4,31 @@ parameters: when@prod: &sentry_prod sentry: dsn: '%env(SENTRY_DSN)%' + # this hooks into critical paths of the framework (and vendors) to perform + # automatic instrumentation (there might be some performance penalty) + # https://docs.sentry.io/platforms/php/guides/symfony/performance/instrumentation/automatic-instrumentation/ + tracing: + enabled: false options: before_send: App\EventListener\Sentry\BeforeSendListener environment: '%env(string:default:sentry_environment:SENTRY_ENVIRONMENT)%' +# If you are using Monolog, you also need this additional configuration to log the errors correctly: +# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration +# register_error_listener: false +# register_error_handler: false + +# monolog: +# handlers: +# sentry: +# type: sentry +# level: !php/const Monolog\Logger::ERROR +# hub_id: Sentry\State\HubInterface + +# Uncomment these lines to register a log message processor that resolves PSR-3 placeholders +# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration +# services: +# Monolog\Processor\PsrLogMessageProcessor: +# tags: { name: monolog.processor, handler: sentry } + when@staging: *sentry_prod diff --git a/config/packages/translation.yaml b/config/packages/translation.yaml index abb76aae..b3f8f9cf 100644 --- a/config/packages/translation.yaml +++ b/config/packages/translation.yaml @@ -4,10 +4,4 @@ framework: default_path: '%kernel.project_dir%/translations' fallbacks: - en -# providers: -# crowdin: -# dsn: '%env(CROWDIN_DSN)%' -# loco: -# dsn: '%env(LOCO_DSN)%' -# lokalise: -# dsn: '%env(LOKALISE_DSN)%' + providers: diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index ae0f0a4d..88423c5b 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -43,6 +43,7 @@ twig: drebscott_url: 'https://noauthority.social/@drebscott' sirbemrose_url: 'https://bemrose.social/ryan' voidzero_url: 'https://podcastindex.social/@voidzero' + file_name_pattern: '*.twig' when@test: twig: diff --git a/config/packages/web_profiler.yaml b/config/packages/web_profiler.yaml index 17893da1..b9461110 100644 --- a/config/packages/web_profiler.yaml +++ b/config/packages/web_profiler.yaml @@ -4,7 +4,9 @@ when@dev: intercept_redirects: false framework: - profiler: { only_exceptions: false } + profiler: + only_exceptions: false + collect_serializer_data: true when@test: web_profiler: diff --git a/config/packages/webpack_encore.yaml b/config/packages/webpack_encore.yaml index 89be60e8..a9037436 100644 --- a/config/packages/webpack_encore.yaml +++ b/config/packages/webpack_encore.yaml @@ -27,6 +27,11 @@ webpack_encore: builds: app: '%kernel.project_dir%/public/build' console: '%kernel.project_dir%/public/console-build' + # builds: + # frontend: '%kernel.project_dir%/public/frontend/build' + + # pass the build name as the 3rd argument to the Twig functions + # {{ encore_entry_script_tags('entry1', null, 'frontend') }} framework: assets: diff --git a/config/routes.yaml b/config/routes.yaml index c3283aa2..41ef8140 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 e92efc59..00000000 --- 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/config/routes/security.yaml b/config/routes/security.yaml new file mode 100644 index 00000000..f853be15 --- /dev/null +++ b/config/routes/security.yaml @@ -0,0 +1,3 @@ +_security_logout: + resource: security.route_loader.logout + type: service diff --git a/package.json b/package.json index c6343c36..e3ad7d15 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,8 @@ "private": true, "license": "MIT", "devDependencies": { + "@babel/core": "^7.17.0", + "@babel/preset-env": "^7.16.0", "@fortawesome/fontawesome-free": "^6.1.1", "@hotwired/stimulus": "^3.0.0", "@octopodcasting/player": "octopodcasting/player#new-dist", @@ -28,7 +30,10 @@ "sass": "^1.38.2", "sass-loader": "^13.3.2", "srt-parser-2": "^1.1.8", - "swup": "^4.5.0" + "swup": "^4.5.0", + "webpack": "^5.74.0", + "webpack-cli": "^4.10.0", + "webpack-notifier": "^1.15.0" }, "scripts": { "build": "encore dev", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index af3f1474..c76a655a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,7 +14,7 @@ - + @@ -33,10 +33,6 @@ - - diff --git a/symfony.lock b/symfony.lock index ccea33c3..34204a5a 100644 --- a/symfony.lock +++ b/symfony.lock @@ -12,16 +12,14 @@ "version": "1.11.99.3" }, "doctrine/annotations": { - "version": "1.13", + "version": "1.14", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "1.0", - "ref": "a2759dd6123694c8d901d0ec80006e044c2e6457" + "branch": "main", + "version": "1.10", + "ref": "64d8583af5ea57b7afa4aba4b159907f3a148b05" }, - "files": [ - "config/routes/annotations.yaml" - ] + "files": [] }, "doctrine/cache": { "version": "2.1.1" @@ -42,12 +40,12 @@ "version": "v0.5.3" }, "doctrine/doctrine-bundle": { - "version": "2.5", + "version": "2.13", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "2.4", - "ref": "ddddd8249dd55bbda16fa7a45bb7499ef6f8e90e" + "branch": "main", + "version": "2.10", + "ref": "c170ded8fc587d6bd670550c43dafcf093762245" }, "files": [ "config/packages/doctrine.yaml", @@ -68,12 +66,12 @@ ] }, "doctrine/doctrine-migrations-bundle": { - "version": "3.2", + "version": "3.3", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", + "branch": "main", "version": "3.1", - "ref": "ee609429c9ee23e22d6fa5728211768f51ed2818" + "ref": "1d01ec03c6ecbd67c3375c5478c9a423ae5d6a33" }, "files": [ "config/packages/doctrine_migrations.yaml", @@ -229,12 +227,12 @@ "version": "5.0.3" }, "phpunit/phpunit": { - "version": "9.5", + "version": "9.6", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "9.3", - "ref": "a6249a6c4392e9169b87abf93225f7f9f59025e6" + "branch": "main", + "version": "9.6", + "ref": "7364a21d87e658eb363c5020c072ecfdc12e2326" }, "files": [ ".env.test", @@ -324,12 +322,12 @@ "version": "3.4.0" }, "sentry/sentry-symfony": { - "version": "4.2", + "version": "4.14", "recipe": { "repo": "github.com/symfony/recipes-contrib", - "branch": "master", - "version": "3.0", - "ref": "9746f0823302d7980e5273ef7a69ef3f5ac80914" + "branch": "main", + "version": "4.6", + "ref": "153de5f041f7e8a9c19f3674b800b76be0e6fd90" }, "files": [ "config/packages/sentry.yaml" @@ -351,12 +349,12 @@ "version": "v5.4.3" }, "symfony/console": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", + "branch": "main", "version": "5.3", - "ref": "da0c8be8157600ad34f10ff0c9cc91232522e047" + "ref": "1781ff40d8a17d87cf53f8d4cf0c8346ed2bb461" }, "files": [ "bin/console" @@ -411,27 +409,28 @@ "version": "v5.4.3" }, "symfony/flex": { - "version": "1.18", + "version": "2.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "1.0", - "ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e" + "branch": "main", + "version": "2.4", + "ref": "52e9754527a15e2b79d9a610f98185a1fe46622a" }, "files": [ - ".env" + ".env", + ".env.dev" ] }, "symfony/form": { "version": "v5.4.5" }, "symfony/framework-bundle": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.4", - "ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb" + "branch": "main", + "version": "6.4", + "ref": "32126346f25e1cee607cc4aa6783d46034920554" }, "files": [ "config/packages/cache.yaml", @@ -460,12 +459,12 @@ "version": "v5.4.5" }, "symfony/mailer": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", + "branch": "main", "version": "4.3", - "ref": "bbfc7e27257d3a3f12a6fb0a42540a42d9623a37" + "ref": "09051cfde49476e3c12cd3a0e44289ace1c75a4f" }, "files": [ "config/packages/mailer.yaml" @@ -481,12 +480,12 @@ } }, "symfony/messenger": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "4.3", - "ref": "25e3c964d3aee480b3acc3114ffb7940c89edfed" + "branch": "main", + "version": "6.0", + "ref": "ba1ac4e919baba5644d31b57a3284d6ba12d52ee" }, "files": [ "config/packages/messenger.yaml" @@ -499,24 +498,24 @@ "version": "v5.4.3" }, "symfony/monolog-bundle": { - "version": "3.7", + "version": "3.10", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", + "branch": "main", "version": "3.7", - "ref": "213676c4ec929f046dfde5ea8e97625b81bc0578" + "ref": "aff23899c4440dd995907613c1dd709b6f59503f" }, "files": [ "config/packages/monolog.yaml" ] }, "symfony/notifier": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", + "branch": "main", "version": "5.0", - "ref": "c31585e252b32fe0e1f30b1f256af553f4a06eb9" + "ref": "178877daf79d2dbd62129dd03612cb1a2cb407cc" }, "files": [ "config/packages/notifier.yaml" @@ -529,12 +528,12 @@ "version": "v5.4.3" }, "symfony/phpunit-bridge": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.3", - "ref": "97cb3dc7b0f39c7cfc4b7553504c9d7b7795de96" + "branch": "main", + "version": "6.3", + "ref": "a411a0480041243d97382cac7984f7dce7813c08" }, "files": [ ".env.test", @@ -574,12 +573,12 @@ "version": "v2.1.2" }, "symfony/routing": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.3", - "ref": "85de1d8ae45b284c3c84b668171d2615049e698f" + "branch": "main", + "version": "6.2", + "ref": "e0a11b4ccb8c9e70b574ff5ad3dfdcd41dec5aa6" }, "files": [ "config/packages/routing.yaml", @@ -590,15 +589,16 @@ "version": "v5.4.5" }, "symfony/security-bundle": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.3", - "ref": "98f1f2b0d635908c2b40f3675da2d23b1a069d30" + "branch": "main", + "version": "6.4", + "ref": "2ae08430db28c8eb4476605894296c82a642028f" }, "files": [ - "config/packages/security.yaml" + "config/packages/security.yaml", + "config/routes/security.yaml" ] }, "symfony/security-core": { @@ -623,21 +623,21 @@ "version": "v5.4.3" }, "symfony/telegram-notifier": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", "version": "5.0", - "ref": "5cf5c19e8fdcbf922de680cdf8d65fa7d77758ae" + "ref": "6cecb59a0e96c9e1cee469f2b82fa920101a68e8" } }, "symfony/translation": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.3", - "ref": "da64f5a2b6d96f5dc24914517c0350a5f91dee43" + "branch": "main", + "version": "6.3", + "ref": "e28e27f53663cc34f0be2837aba18e3a1bef8e7b" }, "files": [ "config/packages/translation.yaml", @@ -651,12 +651,12 @@ "version": "v5.4.5" }, "symfony/twig-bundle": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.4", - "ref": "bb2178c57eee79e6be0b297aa96fc0c0def81387" + "branch": "main", + "version": "6.4", + "ref": "cab5fd2a13a45c266d45a7d9337e28dee6272877" }, "files": [ "config/packages/twig.yaml", @@ -688,12 +688,12 @@ "version": "v5.4.3" }, "symfony/web-profiler-bundle": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.3", - "ref": "24bbc3d84ef2f427f82104f766014e799eefcc3e" + "branch": "main", + "version": "6.1", + "ref": "e42b3f0177df239add25373083a564e5ead4e13a" }, "files": [ "config/packages/web_profiler.yaml", @@ -701,16 +701,16 @@ ] }, "symfony/webpack-encore-bundle": { - "version": "1.14", + "version": "1.17", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", "version": "1.10", - "ref": "91f4d29f5ebbd2fcccc71ca55a17d14a17b308e8" + "ref": "eff2e505d4557c967b6710fe06bd947ba555cae5" }, "files": [ "assets/app.js", - "assets/stimulus.js", + "assets/bootstrap.js", "assets/controllers.json", "assets/controllers/hello_controller.js", "assets/styles/app.css", diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 469dccee..47a58557 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,8 +4,10 @@ require dirname(__DIR__).'/vendor/autoload.php'; -if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) { - require dirname(__DIR__).'/config/bootstrap.php'; -} elseif (method_exists(Dotenv::class, 'bootEnv')) { +if (method_exists(Dotenv::class, 'bootEnv')) { (new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); } + +if ($_SERVER['APP_DEBUG']) { + umask(0000); +} diff --git a/webpack.config.js b/webpack.config.js index 2c128c93..aded1f4c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,6 +16,11 @@ Encore .cleanupOutputBeforeBuild() .enableSourceMaps(!Encore.isProduction()) .enableVersioning(Encore.isProduction()) + + .configureBabelPresetEnv((config) => { + config.useBuiltIns = 'usage'; + config.corejs = '3.23'; + }) .enableSassLoader(); const appConfig = Encore.getWebpackConfig(); @@ -33,6 +38,11 @@ Encore .cleanupOutputBeforeBuild() .enableSourceMaps(!Encore.isProduction()) .enableVersioning(Encore.isProduction()) + + .configureBabelPresetEnv((config) => { + config.useBuiltIns = 'usage'; + config.corejs = '3.23'; + }) .enableSassLoader(); const consoleConfig = Encore.getWebpackConfig();