diff --git a/Tests/Mailer/MailerTest.php b/Tests/Mailer/MailerTest.php index 7997f3d8a..4dadbe0a4 100644 --- a/Tests/Mailer/MailerTest.php +++ b/Tests/Mailer/MailerTest.php @@ -15,15 +15,14 @@ use PHPUnit\Framework\TestCase; use Swift_Mailer; use Swift_Transport_NullTransport; -use Symfony\Component\Templating\EngineInterface; class MailerTest extends TestCase { protected function setUp() { // skip test for Symfony > 5 - if (!interface_exists(EngineInterface::class)) { - $this->markTestSkipped(sprintf('%s class not exists', EngineInterface::class)); + if (!interface_exists('Symfony\Bundle\FrameworkBundle\Templating\EngineInterface')) { + $this->markTestSkipped('Symfony\Bundle\FrameworkBundle\Templating\EngineInterface class not exists'); } } diff --git a/Tests/Util/PasswordUpdaterTest.php b/Tests/Util/PasswordUpdaterTest.php index ea5abff11..ccbf8f00b 100644 --- a/Tests/Util/PasswordUpdaterTest.php +++ b/Tests/Util/PasswordUpdaterTest.php @@ -54,6 +54,10 @@ public function testUpdatePassword() public function testUpdatePasswordWithBCrypt() { + if (!class_exists('Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder')) { + $this->markTestSkipped('This test requires Symfony 4'); + } + $encoder = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder') ->disableOriginalConstructor() ->getMock(); diff --git a/composer.json b/composer.json index 372369212..b8c4e82df 100644 --- a/composer.json +++ b/composer.json @@ -48,8 +48,8 @@ "symfony/doctrine-bridge": "<4.4" }, "require-dev": { - "doctrine/doctrine-bundle": "^1.3", - "friendsofphp/php-cs-fixer": "^3.0.2", + "doctrine/doctrine-bundle": "^1.3 || ^2", + "friendsofphp/php-cs-fixer": "^3.0.2, !=3.5.0", "swiftmailer/swiftmailer": "^4.3 || ^5.0 || ^6.0", "symfony/console": "^4.4 || ^5.0", "symfony/phpunit-bridge": "^5.3",