Skip to content

Commit

Permalink
avoid deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
craue committed Aug 28, 2023
1 parent 70a3083 commit 07a3a3c
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
1 change: 1 addition & 0 deletions Tests/Storage/DoctrineStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class DoctrineStorageTest extends AbstractStorageTest {
* {@inheritDoc}
*/
protected function getStorageImplementation() {
// TODO remove $configuration variable as soon as DBAL >= 4 is required
$configuration = new Configuration();

if (\method_exists($configuration, 'setSchemaManagerFactory')) {
Expand Down
2 changes: 2 additions & 0 deletions Tests/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ framework:
router:
resource: '%kernel.project_dir%/Tests/config/routing.yml'
secret: whatever
session:
handler_id: ~
test: ~
translator:
fallback: en
Expand Down
31 changes: 28 additions & 3 deletions Tests/config/config_hacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,38 @@
],
]);

// TODO put back into config.yml as soon as Symfony >= 5.3 is required, see https://github.com/symfony/symfony/pull/41247
$container->loadFromExtension('security', Kernel::VERSION_ID >= 50300 ? [
// TODO clean up as soon as Symfony >= 5.3 is required, see https://github.com/symfony/symfony/pull/41247
// TODO remove as soon as Symfony >= 6.2 is required, see https://github.com/symfony/symfony/pull/47890
$container->loadFromExtension('security', Kernel::VERSION_ID >= 60200 ? [] : (Kernel::VERSION_ID >= 50300 ? [
'enable_authenticator_manager' => true,
] : [
'firewalls' => [
'dummy' => [
'anonymous' => true,
],
],
]);
]));

// TODO remove as soon as Symfony >= 7 is required, see https://github.com/symfony/symfony/blob/6.4/UPGRADE-6.4.md#frameworkbundle
if (Kernel::VERSION_ID >= 60400 && Kernel::VERSION_ID < 70000) {
$container->loadFromExtension('framework', [
'handle_all_throwables' => true,
'php_errors' => [
'log' => true,
],
'session' => [
'cookie_secure' => 'auto',
'cookie_samesite' => 'lax',
],
'validation' => [
'email_validation_mode' => 'html5',
],
]);
}

// TODO remove as soon as Symfony >= 7 is required, see https://github.com/symfony/symfony/blob/6.1/UPGRADE-6.1.md#frameworkbundle
if (Kernel::VERSION_ID < 70000) {
$container->loadFromExtension('framework', [
'http_method_override' => false,
]);
}
6 changes: 6 additions & 0 deletions phpstan-config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ parameters:
Use \\{@see createSchemaManager\\(\\)\\} instead\\.$#
"""
path: Storage/DoctrineStorage.php
-
message: """
#^Fetching deprecated class constant ARRAY of class Doctrine\\\\DBAL\\\\Types\\\\Types:
Use \\{@link Types::JSON} instead\\.$#
"""
path: Storage/DoctrineStorage.php

0 comments on commit 07a3a3c

Please sign in to comment.