Skip to content

Commit e7bde8f

Browse files
authored
Fix deprecations (#4085)
* Fix deprecations * Do not load the class
1 parent c59c8a8 commit e7bde8f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ jobs:
600600
- '7.4'
601601
fail-fast: false
602602
env:
603-
SYMFONY_DEPRECATIONS_HELPER: max[total]=8
603+
SYMFONY_DEPRECATIONS_HELPER: max[total]=0
604604
steps:
605605
- name: Checkout
606606
uses: actions/checkout@v2
@@ -643,6 +643,8 @@ jobs:
643643
symfony:
644644
- '5.3'
645645
fail-fast: false
646+
env:
647+
SYMFONY_DEPRECATIONS_HELPER: max[direct]=0
646648
steps:
647649
- name: Checkout
648650
uses: actions/checkout@v2

tests/Bridge/Symfony/Bundle/SwaggerUi/SwaggerUiActionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use ApiPlatform\Core\OpenApi\Model\Paths;
2424
use ApiPlatform\Core\OpenApi\OpenApi;
2525
use ApiPlatform\Core\OpenApi\Options;
26+
use ApiPlatform\Core\Tests\ProphecyTrait;
2627
use PHPUnit\Framework\TestCase;
2728
use Prophecy\Argument;
2829
use Symfony\Component\HttpFoundation\Request;
@@ -35,6 +36,8 @@
3536
*/
3637
class SwaggerUiActionTest extends TestCase
3738
{
39+
use ProphecyTrait;
40+
3841
public const SPEC = [
3942
'paths' => [
4043
'/fs' => ['get' => ['operationId' => 'getFCollection']],

tests/Fixtures/app/AppKernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface;
3232
use Symfony\Component\HttpFoundation\Session\SessionFactory;
3333
use Symfony\Component\HttpKernel\Kernel;
34+
use Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher;
3435
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
3536
use Symfony\Component\Routing\RouteCollectionBuilder;
36-
use Symfony\Component\Security\Core\Encoder\NativePasswordEncoder;
3737
use Symfony\Component\Security\Core\User\UserInterface;
3838

3939
/**
@@ -129,7 +129,7 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
129129
'router' => ['utf8' => true],
130130
]);
131131

132-
$alg = class_exists(NativePasswordEncoder::class) ? 'auto' : 'bcrypt';
132+
$alg = class_exists(NativePasswordHasher::class) || class_exists('Symfony\Component\Security\Core\Encoder\NativePasswordEncoder') ? 'auto' : 'bcrypt';
133133
$securityConfig = [
134134
'encoders' => [
135135
User::class => $alg,

0 commit comments

Comments
 (0)