Skip to content

Commit

Permalink
Revert "Silence deprecation from 5.1" and fix the deprecation otherwise
Browse files Browse the repository at this point in the history
This reverts commit b941c50
  • Loading branch information
Jean85 committed Jun 12, 2020
1 parent eb04f46 commit dab43fd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ parameters:
count: 1
path: src/WebTestCase.php

-
message: "#^Comparison operation \"\\>\\=\" between 50100 and 50000 is always true\\.$#"
count: 1
path: tests/App/AppKernel.php

-
message: "#^Parameter \\#1 \\$callable of static method Doctrine\\\\Common\\\\Annotations\\\\AnnotationRegistry\\:\\:registerLoader\\(\\) expects callable\\(\\)\\: mixed, array\\(mixed, 'loadClass'\\) given\\.$#"
count: 1
Expand All @@ -14,3 +19,4 @@ parameters:
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNull\\(\\) with int will always evaluate to false\\.$#"
count: 1
path: tests/Command/CommandTest.php

4 changes: 4 additions & 0 deletions tests/App/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public function registerBundles(): array
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(__DIR__ . '/config.yml');

if (self::VERSION_ID >= 50000) {
$loader->load(__DIR__ . '/config_5.yml');
}
}

public function getCacheDir(): string
Expand Down
4 changes: 1 addition & 3 deletions tests/App/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
framework:
secret: secret
test: ~
router:
utf8: true
resource: "%kernel.project_dir%/tests/App/routing.yml"
router: { resource: "%kernel.project_dir%/tests/App/routing.yml" }
form: false
validation: false
csrf_protection: true
Expand Down
3 changes: 3 additions & 0 deletions tests/App/config_5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
framework:
router:
utf8: true

0 comments on commit dab43fd

Please sign in to comment.