Skip to content

Commit 8407875

Browse files
authored
ci: fix remaining deprecation notices (#5700)
* ci: fix remaining deprecation notices * cleanup * relax deprecations for Windows * a bit more strict * fix
1 parent ca98347 commit 8407875

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ concurrency:
1010

1111
env:
1212
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13-
SYMFONY_DEPRECATIONS_HELPER: max[self]=0
1413

1514
jobs:
1615
commitlint:
@@ -552,8 +551,6 @@ jobs:
552551
php:
553552
- '8.2'
554553
fail-fast: false
555-
env:
556-
SYMFONY_DEPRECATIONS_HELPER: max[total]=0
557554
steps:
558555
- name: Checkout
559556
uses: actions/checkout@v3
@@ -592,9 +589,6 @@ jobs:
592589
php:
593590
- '8.2'
594591
fail-fast: false
595-
# env:
596-
# See https://github.com/doctrine/DoctrineMongoDBBundle/pull/673
597-
#SYMFONY_DEPRECATIONS_HELPER: max[direct]=0
598592
steps:
599593
- name: Checkout
600594
uses: actions/checkout@v3
@@ -713,6 +707,8 @@ jobs:
713707
run: tests/Fixtures/app/console cache:clear --ansi
714708
- name: Run PHPUnit tests
715709
run: vendor/bin/simple-phpunit --log-junit build/logs/phpunit/junit.xml
710+
env:
711+
SYMFONY_DEPRECATIONS_HELPER: max[direct]=0&ignoreFile=./tests/.ignored-deprecations
716712

717713
windows-behat:
718714
name: Windows Behat (PHP ${{ matrix.php }}) (SQLite)
@@ -765,9 +761,6 @@ jobs:
765761
php:
766762
- '8.2'
767763
fail-fast: false
768-
# env:
769-
# See https://github.com/doctrine/DoctrineMongoDBBundle/pull/673
770-
#SYMFONY_DEPRECATIONS_HELPER: max[direct]=0
771764
steps:
772765
- name: Checkout
773766
uses: actions/checkout@v3
@@ -798,6 +791,8 @@ jobs:
798791
run: tests/Fixtures/app/console cache:clear --ansi
799792
- name: Run PHPUnit tests
800793
run: vendor/bin/simple-phpunit
794+
env:
795+
SYMFONY_DEPRECATIONS_HELPER: max[self]=0&ignoreFile=./tests/.ignored-deprecations
801796

802797
behat-symfony-lowest:
803798
name: Behat (PHP ${{ matrix.php }}) (Symfony lowest)

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<php>
55
<ini name="error_reporting" value="-1" />
66
<ini name="memory_limit" value="-1" />
7-
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
7+
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[total]=0&amp;ignoreFile=./tests/.ignored-deprecations" />
88
<!-- This is necessary for GitHub Actions to work properly -->
99
<server name="SYMFONY_PHPUNIT_DIR" value="vendor/bin/.phpunit" />
1010
<server name="SYMFONY_PHPUNIT_REMOVE" value="symfony/yaml" />

tests/.ignored-deprecations

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# No fix available yet, see https://github.com/doctrine/dbal/issues/5784
2+
%Subscribing to onSchemaCreateTable events is deprecated\.%
3+
4+
# Fixed by https://github.com/doctrine/orm/pull/10855
5+
%Column::setCustomSchemaOptions\(\) is deprecated\. Use setPlatformOptions\(\) instead\.%
6+
7+
# Fixed in DoctrineMongoDBBundle 4.6
8+
%Accessing Doctrine\\Common\\Lexer\\Token properties via ArrayAccess is deprecated, use the value, type or position property instead%
9+
%Do the same.*Doctrine\\Bundle\\MongoDBBundle%

tests/Fixtures/TestBundle/Entity/Person.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Person
3434
#[ORM\GeneratedValue(strategy: 'AUTO')]
3535
private ?int $id = null;
3636

37-
#[ORM\Column(type: 'string', enumType: GenderTypeEnum::class, nullable: true)]
37+
#[ORM\Column(type: 'string', nullable: true, enumType: GenderTypeEnum::class)]
3838
#[Groups(['people.pets'])]
3939
public ?GenderTypeEnum $genderType = GenderTypeEnum::MALE;
4040

tests/Fixtures/app/bootstrap.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
exit('PHPUnit is not installed. Please run ./vendor/bin/simple-phpunit to install it');
1919
}
2020

21+
// Increase default max nesting level allowed by XDebug for the Symfony container
22+
$xdebugMaxNestingLevel = ini_get('xdebug.max_nesting_level');
23+
if (false !== $xdebugMaxNestingLevel && $xdebugMaxNestingLevel <= 512) {
24+
ini_set('xdebug.max_nesting_level', 512);
25+
}
26+
2127
$phpunitLoader = require $phpUnitAutoloaderPath;
2228
// Don't register the PHPUnit autoloader before the normal autoloader to prevent weird issues
2329
$phpunitLoader->unregister();

0 commit comments

Comments
 (0)