mirror of
https://github.com/symfony/ux.git
synced 2026-03-24 00:02:21 +01:00
[E2E] Test over Symfony 8.0
This commit is contained in:
13
.github/workflows/browser-tests.yml
vendored
13
.github/workflows/browser-tests.yml
vendored
@@ -7,16 +7,16 @@ defaults:
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'src/*/doc/**'
|
||||
- 'src/**/*.md'
|
||||
- '.github/workflows/app-tests.yaml'
|
||||
- '.github/workflows/unit-tests.yaml'
|
||||
- 'src/*/doc/**'
|
||||
- 'src/**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'src/*/doc/**'
|
||||
- 'src/**/*.md'
|
||||
- '.github/workflows/app-tests.yaml'
|
||||
- '.github/workflows/unit-tests.yaml'
|
||||
- 'src/*/doc/**'
|
||||
- 'src/**/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
symfony: ['6.4', '7.3']
|
||||
symfony: ['6.4', '7.4', '8.0']
|
||||
env:
|
||||
SYMFONY_REQUIRE: '${{ matrix.symfony }}.*'
|
||||
steps:
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
|
||||
- uses: shivammathur/setup-php@93cb3149d228516dfca679606c5060ee44f46437
|
||||
with:
|
||||
php-version: 8.2
|
||||
php-version: ${{ matrix.symfony >= '8.0' && '8.4' || '8.2' }}
|
||||
tools: symfony-cli, flex
|
||||
|
||||
- name: Install root PHP dependencies
|
||||
@@ -107,6 +107,7 @@ jobs:
|
||||
src/**/assets/.playwright-report/
|
||||
src/**/assets/.playwright-output/
|
||||
retention-days: 7
|
||||
include-hidden-files: true
|
||||
|
||||
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
|
||||
if: ${{ always() && steps.browser-tests.conclusion == 'failure' }}
|
||||
|
||||
2
.github/workflows/dist-files-unbuilt.yaml
vendored
2
.github/workflows/dist-files-unbuilt.yaml
vendored
@@ -3,10 +3,12 @@ name: Dist Files Unbuilt
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'apps/**'
|
||||
- 'src/*/doc/**'
|
||||
- 'src/**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'apps/**'
|
||||
- 'src/*/doc/**'
|
||||
- 'src/**/*.md'
|
||||
|
||||
|
||||
6
.github/workflows/unit-tests.yaml
vendored
6
.github/workflows/unit-tests.yaml
vendored
@@ -7,14 +7,16 @@ defaults:
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.github/workflows/app-tests.yaml'
|
||||
- 'apps/e2e/**'
|
||||
- 'src/*/doc/**'
|
||||
- 'src/**/*.md'
|
||||
- '.github/workflows/app-tests.yaml'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.github/workflows/app-tests.yaml'
|
||||
- 'apps/e2e/**'
|
||||
- 'src/*/doc/**'
|
||||
- 'src/**/*.md'
|
||||
- '.github/workflows/app-tests.yaml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
|
||||
1
apps/e2e/.gitignore
vendored
1
apps/e2e/.gitignore
vendored
@@ -5,6 +5,7 @@ composer.lock
|
||||
/.env.local.php
|
||||
/.env.*.local
|
||||
/config/secrets/prod/prod.decrypt.private.php
|
||||
/config/reference.php
|
||||
/public/bundles/
|
||||
/var/
|
||||
/vendor/
|
||||
|
||||
@@ -18,32 +18,31 @@
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": "~8.2.0",
|
||||
"php": ">=8.2.0",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"doctrine/dbal": "^3.10.1",
|
||||
"doctrine/doctrine-bundle": "^2.15.1",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.4.2",
|
||||
"doctrine/dbal": "^3.10.1|^4.4.3",
|
||||
"doctrine/doctrine-bundle": "^2.15.1|^3.2.2",
|
||||
"doctrine/orm": "^3.5.2",
|
||||
"phpdocumentor/reflection-docblock": "^5.6.2",
|
||||
"phpstan/phpdoc-parser": "^2.2",
|
||||
"symfony/asset": "6.4.*|7.3.*",
|
||||
"symfony/asset-mapper": "6.4.*|7.3.*",
|
||||
"symfony/console": "6.4.*|7.3.*",
|
||||
"symfony/dotenv": "6.4.*|7.3.*",
|
||||
"symfony/expression-language": "6.4.*|7.3.*",
|
||||
"symfony/asset": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/asset-mapper": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/console": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/dotenv": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/expression-language": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/flex": "^2.8.1",
|
||||
"symfony/form": "6.4.*|7.3.*",
|
||||
"symfony/framework-bundle": "6.4.*|7.3.*",
|
||||
"symfony/http-client": "6.4.*|7.3.*",
|
||||
"symfony/intl": "6.4.*|7.3.*",
|
||||
"symfony/monolog-bundle": "^3.10",
|
||||
"symfony/property-access": "6.4.*|7.3.*",
|
||||
"symfony/property-info": "6.4.*|7.3.*",
|
||||
"symfony/runtime": "6.4.*|7.3.*",
|
||||
"symfony/serializer": "6.4.*|7.3.*",
|
||||
"symfony/form": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/framework-bundle": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/http-client": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/intl": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/monolog-bundle": "^3.10|^4.0",
|
||||
"symfony/property-access": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/property-info": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/runtime": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/serializer": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/stimulus-bundle": "^2.29.1",
|
||||
"symfony/twig-bundle": "6.4.*|7.3.*",
|
||||
"symfony/twig-bundle": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/ux-autocomplete": "^2.29.1",
|
||||
"symfony/ux-chartjs": "^2.29.1",
|
||||
"symfony/ux-cropperjs": "^2.29.1",
|
||||
@@ -64,33 +63,35 @@
|
||||
"symfony/ux-twig-component": "^2.29",
|
||||
"symfony/ux-typed": "^2.29.1",
|
||||
"symfony/ux-vue": "^2.29.1",
|
||||
"symfony/yaml": "6.4.*|7.3.*",
|
||||
"symfony/yaml": "6.4.*|7.4.*|8.0.*",
|
||||
"symfonycasts/dynamic-forms": "^0.2",
|
||||
"twig/extra-bundle": "^3.21",
|
||||
"twig/twig": "^3.21.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/debug-bundle": "6.4.*|7.3.*",
|
||||
"symfony/debug-bundle": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/maker-bundle": "^1.64",
|
||||
"symfony/stopwatch": "6.4.*|7.3.*",
|
||||
"symfony/web-profiler-bundle": "6.4.*|7.3.*",
|
||||
"symfony/stopwatch": "6.4.*|7.4.*|8.0.*",
|
||||
"symfony/web-profiler-bundle": "6.4.*|7.4.*|8.0.*",
|
||||
"zenstruck/foundry": "^2.8"
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "8.2"
|
||||
},
|
||||
"allow-plugins": {
|
||||
"php-http/discovery": true,
|
||||
"symfony/flex": true,
|
||||
"symfony/runtime": true
|
||||
},
|
||||
"audit": {
|
||||
"ignore": {
|
||||
"PKSA-365x-2zjk-pt47": "false positive for symfony/http-foundation"
|
||||
}
|
||||
"ignore": [
|
||||
"PKSA-365x-2zjk-pt47",
|
||||
"PKSA-4k7v-pfvw-nqvp",
|
||||
"PKSA-d1rr-z8zb-qnm7",
|
||||
"PKSA-b35n-565h-rs4q",
|
||||
"PKSA-w2tw-kmfg-rt9s",
|
||||
"PKSA-rkkf-636k-qjb3",
|
||||
"PKSA-wws7-mr54-jsny"
|
||||
]
|
||||
},
|
||||
"bump-after-update": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"autoload": {
|
||||
@@ -119,7 +120,7 @@
|
||||
"extra": {
|
||||
"symfony": {
|
||||
"allow-contrib": false,
|
||||
"require": "6.4.*|7.3.*"
|
||||
"require": "6.4.*|7.4.*|8.0.*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
return [
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
|
||||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
|
||||
@@ -2,15 +2,27 @@
|
||||
# Enable stateless CSRF protection for forms and logins/logouts
|
||||
|
||||
use App\Kernel;
|
||||
use Symfony\Config\FrameworkConfig;
|
||||
|
||||
return static function (FrameworkConfig $config) {
|
||||
if (Kernel::VERSION_ID >= 70000) {
|
||||
if (Kernel::VERSION_ID >= 80000) {
|
||||
return Symfony\Component\DependencyInjection\Loader\Configurator\App::config([
|
||||
'framework' => [
|
||||
'form' => [
|
||||
'csrf_protection' => [
|
||||
'token_id' => 'submit',
|
||||
],
|
||||
],
|
||||
'csrf_protection' => [
|
||||
'stateless_token_ids' => ['submit', 'authenticate', 'logout']
|
||||
]
|
||||
]
|
||||
]);
|
||||
} else if (Kernel::VERSION_ID >= 70000) {
|
||||
return static function (Symfony\Config\FrameworkConfig $config) {
|
||||
// Enable CSRF protection for forms
|
||||
$config->form()->csrfProtection()->tokenId('submit');
|
||||
|
||||
// Enable stateless CSRF protection for specific actions
|
||||
$config->csrfProtection()
|
||||
->statelessTokenIds(['submit', 'authenticate', 'logout']);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,11 +7,7 @@ doctrine:
|
||||
#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
|
||||
identity_generation_preferences:
|
||||
@@ -36,8 +32,6 @@ when@test:
|
||||
when@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
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
doctrine_migrations:
|
||||
migrations_paths:
|
||||
# namespace is arbitrary but should be different from App\Migrations
|
||||
# as migrations classes should NOT be autoloaded
|
||||
'DoctrineMigrations': '%kernel.project_dir%/migrations'
|
||||
enable_profiler: false
|
||||
@@ -1,7 +1,6 @@
|
||||
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
annotations: false
|
||||
http_method_override: false
|
||||
handle_all_throwables: true
|
||||
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
use Symfony\Config\FrameworkConfig;
|
||||
|
||||
return static function (FrameworkConfig $config) {
|
||||
if (Kernel::VERSION_ID >= 70000) {
|
||||
if (Kernel::VERSION_ID >= 80000) {
|
||||
return Symfony\Component\DependencyInjection\Loader\Configurator\App::config([
|
||||
'framework' => [
|
||||
'property_info' => [
|
||||
'with_constructor_extractor' => true,
|
||||
]
|
||||
]
|
||||
]);
|
||||
} else if (Kernel::VERSION_ID >= 70000) {
|
||||
return static function (Symfony\Config\FrameworkConfig $config) {
|
||||
$config->propertyInfo()->withConstructorExtractor(true);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
# Enable stateless CSRF protection for forms and logins/logouts
|
||||
|
||||
use App\Kernel;
|
||||
use Symfony\Config\FrameworkConfig;
|
||||
|
||||
return static function (FrameworkConfig $config) {
|
||||
if (Kernel::VERSION_ID >= 70000) {
|
||||
// Method "checkHeader" does not exist yet
|
||||
// $config->form()->csrfProtection()->checkHeader(true);
|
||||
}
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
when@dev:
|
||||
_errors:
|
||||
# .xml to keep compatibility with Symfony 6.4
|
||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
||||
prefix: /_error
|
||||
@@ -1,10 +0,0 @@
|
||||
when@dev:
|
||||
web_profiler_wdt:
|
||||
# .xml to keep compatibility with Symfony 6.4
|
||||
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
||||
prefix: /_wdt
|
||||
|
||||
web_profiler_profiler:
|
||||
# .xml to keep compatibility with Symfony 6.4
|
||||
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
||||
prefix: /_profiler
|
||||
0
apps/e2e/migrations/.gitignore
vendored
0
apps/e2e/migrations/.gitignore
vendored
@@ -13,12 +13,13 @@ namespace App\Factory;
|
||||
|
||||
use App\Entity\Fruit;
|
||||
use Zenstruck\Foundry\Object\Instantiator;
|
||||
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
|
||||
use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory;
|
||||
|
||||
/**
|
||||
* @extends PersistentProxyObjectFactory<Fruit>
|
||||
* @extends PersistentObjectFactory<Fruit>
|
||||
*/
|
||||
final class FruitFactory extends PersistentProxyObjectFactory
|
||||
final class FruitFactory extends PersistentObjectFactory
|
||||
{
|
||||
public static function class(): string
|
||||
{
|
||||
|
||||
@@ -15,10 +15,11 @@ use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||
|
||||
class Kernel extends BaseKernel implements CompilerPassInterface
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
use MicroKernelTrait { MicroKernelTrait::configureRoutes as doConfigureRoutes; }
|
||||
|
||||
public function process(ContainerBuilder $container): void
|
||||
{
|
||||
@@ -36,4 +37,18 @@ class Kernel extends BaseKernel implements CompilerPassInterface
|
||||
// MapRenderer::Google->value => 'google://'.$container->resolveEnvPlaceholders('%env(GOOGLE_MAPS_API_KEY)%').'@default',
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureRoutes(RoutingConfigurator $routes): void
|
||||
{
|
||||
$this->doConfigureRoutes($routes);
|
||||
|
||||
$extension = self::VERSION_ID < 70000 ? 'xml' : 'php';
|
||||
|
||||
$routes->import('@FrameworkBundle/Resources/config/routing/errors.'.$extension)->prefix('/_error');
|
||||
|
||||
if ('dev' === $this->environment) {
|
||||
$routes->import('@WebProfilerBundle/Resources/config/routing/profiler.'.$extension)->prefix('/_profiler');
|
||||
$routes->import('@WebProfilerBundle/Resources/config/routing/wdt.'.$extension)->prefix('/_wdt');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ final class LiveRegistrationForm
|
||||
->add('password', PasswordType::class, [
|
||||
'constraints' => [
|
||||
new Assert\NotBlank(),
|
||||
new Assert\Length(['min' => 8]),
|
||||
new Assert\Length(min: 8),
|
||||
],
|
||||
// prevent password from being emptied on re-render
|
||||
'always_empty' => false,
|
||||
|
||||
@@ -22,19 +22,6 @@
|
||||
"src/Repository/.gitignore"
|
||||
]
|
||||
},
|
||||
"doctrine/doctrine-migrations-bundle": {
|
||||
"version": "3.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "3.1",
|
||||
"ref": "1d01ec03c6ecbd67c3375c5478c9a423ae5d6a33"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/doctrine_migrations.yaml",
|
||||
"migrations/.gitignore"
|
||||
]
|
||||
},
|
||||
"symfony/asset-mapper": {
|
||||
"version": "7.3",
|
||||
"recipe": {
|
||||
|
||||
Reference in New Issue
Block a user