Skip to content

Commit

Permalink
Bump to symfony 5.3 and remove test deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Aug 11, 2021
1 parent a08acb0 commit 9d511ba
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 10 deletions.
16 changes: 8 additions & 8 deletions composer.json
Expand Up @@ -33,12 +33,12 @@
"doctrine/persistence": "^2.0",
"sonata-project/admin-bundle": "^4.0@rc",
"sonata-project/form-extensions": "^1.7.1",
"symfony/config": "^4.4 || ^5.2",
"symfony/dependency-injection": "^4.4 || ^5.2",
"symfony/doctrine-bridge": "^4.4 || ^5.2",
"symfony/form": "^4.4 || ^5.2",
"symfony/http-kernel": "^4.4 || ^5.2",
"symfony/property-access": "^4.4 || ^5.2",
"symfony/config": "^4.4 || ^5.3",
"symfony/dependency-injection": "^4.4 || ^5.3",
"symfony/doctrine-bridge": "^4.4 || ^5.3",
"symfony/form": "^4.4 || ^5.3",
"symfony/http-kernel": "^4.4 || ^5.3",
"symfony/property-access": "^4.4 || ^5.3",
"twig/twig": "^2.6 || ^3.0"
},
"conflict": {
Expand All @@ -60,8 +60,8 @@
"psalm/plugin-phpunit": "^0.15.1",
"psalm/plugin-symfony": "^2.0",
"sonata-project/block-bundle": "^4.2",
"symfony/browser-kit": "^4.4 || ^5.2",
"symfony/css-selector": "^4.4 || ^5.2",
"symfony/browser-kit": "^4.4 || ^5.3",
"symfony/css-selector": "^4.4 || ^5.3",
"symfony/panther": "^1.0",
"symfony/phpunit-bridge": "^5.1.8",
"vimeo/psalm": "^4.1.1"
Expand Down
11 changes: 9 additions & 2 deletions tests/App/AppKernel.php
Expand Up @@ -23,6 +23,7 @@
use Sonata\Twig\Bridge\Symfony\SonataTwigBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AuthenticatorFactoryInterface;
use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
Expand Down Expand Up @@ -86,8 +87,14 @@ protected function configureRoutes($routes): void

protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
{
$loader->load(__DIR__.'/config/config.yml');
$loader->load(__DIR__.'/config/security.yml');
if (interface_exists(AuthenticatorFactoryInterface::class)) {
$loader->load(__DIR__.'/config/config_v5.yml');
$loader->load(__DIR__.'/config/security_v5.yml');
} else {
$loader->load(__DIR__.'/config/config_v4.yml');
$loader->load(__DIR__.'/config/security_v4.yml');
}

$loader->load(__DIR__.'/config/services.php');
}

Expand Down
File renamed without changes.
32 changes: 32 additions & 0 deletions tests/App/config/config_v5.yml
@@ -0,0 +1,32 @@
framework:
secret: '$3cr37'
assets:
enabled: true
form:
enabled: true
session:
storage_factory_id: session.storage.factory.mock_file
name: MOCKSESSID
test: true
translator:
enabled: true
router:
utf8: true

twig:
exception_controller: null
strict_variables: false

doctrine_mongodb:
connections:
default:
server: "mongodb://localhost:27017"
default_database: test_database
document_managers:
default:
mappings:
SonataMongoDBTest:
type: annotation
dir: "%kernel.project_dir%/Document"
is_bundle: false
prefix: Sonata\DoctrineMongoDBAdminBundle\Tests\App\Document
File renamed without changes.
8 changes: 8 additions & 0 deletions tests/App/config/security_v5.yml
@@ -0,0 +1,8 @@
security:
enable_authenticator_manager: true
providers:
in_memory:
memory: null
firewalls:
main:
lazy: true

0 comments on commit 9d511ba

Please sign in to comment.