Skip to content

Commit

Permalink
feat(o10r-symfony-template-154): Upgrade doctrine/orm to 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiidonii committed Jun 4, 2024
1 parent a46f70e commit df81959
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ parameters:
level: max
paths:
- src

12 changes: 9 additions & 3 deletions tools/prepare-configs.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@

require_once __DIR__ . '/../vendor/autoload.php';

$doctrineVersion = interface_exists('Doctrine\DBAL\ServerVersionProvider') ? '4.0' : '2';
enum DoctrineType {
case doctrine3;
case doctrine4;
}

$doctrineVersion = interface_exists('Doctrine\DBAL\ServerVersionProvider') ?
DoctrineType::doctrine4 : DoctrineType::doctrine3;

if ('4.0' === $doctrineVersion) {
if (DoctrineType::doctrine4 === $doctrineVersion) {
$skipPath = __DIR__ . '/../src/Doctrine/Driver/IamDecorator.php';
} else {
$skipPath = __DIR__ . '/../src/Doctrine/Driver/IamDecoratorDoctrine30.php';
$skipPath = __DIR__ . '/../src/Doctrine/Driver/IamDecoratorDoctrine40.php';
}

$neonFile = __DIR__ . '/../phpstan.neon';
Expand Down
20 changes: 20 additions & 0 deletions tools/update_versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

#!/usr/bin/env bash

rm -rf tests/App/var/cache/*
symfonyVersion=${1:-6.4.*}
dbalVersion=${2:-3.0}

rm -rf vendor composer.lock;
composer require symfony/config:$symfonyVersion --no-update --no-scripts
composer require symfony/dependency-injection:$symfonyVersion --no-update --no-scripts
composer require symfony/http-kernel:$symfonyVersion --no-update --no-scripts
composer require symfony/cache:$symfonyVersion --no-update --no-scripts
composer require doctrine/dbal:$dbalVersion --no-update --no-scripts -W
composer require --dev symfony/yaml:$symfonyVersion --no-update --no-scripts
composer require --dev symfony/phpunit-bridge:$symfonyVersion --no-update --no-scripts
composer require --dev symfony/framework-bundle:$symfonyVersion --no-update --no-scripts

composer install

0 comments on commit df81959

Please sign in to comment.