Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Symfony 3 and 4 #513

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use function count;
use function in_array;
use function is_string;
use function method_exists;
use function strlen;
use function strpos;
use function strtoupper;
Expand All @@ -34,12 +33,7 @@ public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('doctrine_migrations');

if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('doctrine_migrations', 'array');
}
$rootNode = $treeBuilder->getRootNode();

$organizeMigrationModes = $this->getOrganizeMigrationsModes();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use Symfony\Component\DependencyInjection\Reference;

use function assert;
use function class_exists;
use function sys_get_temp_dir;

class DoctrineMigrationsExtensionTest extends TestCase
Expand Down Expand Up @@ -451,9 +450,7 @@ private function getContainer(array $config, ?array $dbalConfig = null, ?array $

$container->getDefinition('doctrine.migrations.dependency_factory')->setPublic(true);
$container->getDefinition('doctrine.migrations.configuration')->setPublic(true);
if (class_exists(CacheCompatibilityPass::class)) {
$container->addCompilerPass(new CacheCompatibilityPass());
}
$container->addCompilerPass(new CacheCompatibilityPass());

return $container;
}
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
],
"require": {
"php": "^7.2|^8.0",
"symfony/framework-bundle": "~3.4|~4.0|~5.0|~6.0|~7.0",
"doctrine/doctrine-bundle": "~1.0|~2.0",
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0",
"doctrine/doctrine-bundle": "^2.4",
"doctrine/migrations": "^3.2"
},
"require-dev": {
Expand All @@ -32,8 +32,9 @@
"phpstan/phpstan-deprecation-rules": "^1",
"phpstan/phpstan-phpunit": "^1",
"phpstan/phpstan-strict-rules": "^1.1",
"phpstan/phpstan-symfony": "^1.3",
"doctrine/orm": "^2.6",
"doctrine/persistence": "^1.3||^2.0",
"doctrine/persistence": "^2.0 || ^3 ",
"vimeo/psalm": "^4.22"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ parameters:
- %currentWorkingDirectory%/Tests

ignoreErrors:
- '~.*TreeBuilder.*getRootNode.*~'
- '~.*TreeBuilder::root.*~'
- '~Parameter \#1 \$configs.*DoctrineMigrationsExtension::load.*~'

includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-symfony/extension.neon
- vendor/phpstan/phpstan-symfony/rules.neon