8000 Merge branch '5.1' · symfony/symfony@6aecad7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6aecad7

Browse files
committed
Merge branch '5.1'
* 5.1: fix compatibility with Doctrine DBAL 3.0 skip test if guesser is not supported Added missing license headers
2 parents 75031a1 + eb58ea6 commit 6aecad7

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineReceiverTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Messenger\Bridge\Doctrine\Tests\Transport;
1313

14+
use Doctrine\DBAL\Driver\PDO\Exception;
1415
use Doctrine\DBAL\Driver\PDOException;
1516
use Doctrine\DBAL\Exception\DeadlockException;
1617
use PHPUnit\Framework\TestCase;
@@ -75,7 +76,7 @@ public function testOccursRetryableExceptionFromConnection()
7576
{
7677
$serializer = $this->createSerializer();
7778
$connection = $this->createMock(Connection::class);
78-
$driverException = new PDOException(new \PDOException('Deadlock', 40001));
79+
$driverException = class_exists(Exception::class) ? Exception::new(new \PDOException('Deadlock', 40001)) : new PDOException(new \PDOException('Deadlock', 40001));
7980
$connection->method('get')->willThrowException(new DeadlockException('Deadlock', $driverException));
8081
$receiver = new DoctrineReceiver($connection, $serializer);
8182
$this->assertSame([], $receiver->get());

src/Symfony/Component/Mime/Tests/AbstractMimeTypeGuesserTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public function testGuessFileWithUnknownExtension()
8181

8282
public function testGuessWithDuplicatedFileType()
8383
{
84+
if (!$this->getGuesser()->isGuesserSupported()) {
85+
$this->markTestSkipped('Guesser is not supported');
86+
}
87+
8488
$this->assertEquals('application/vnd.openxmlformats-officedocument.wordprocessingml.document', $this->getGuesser()->guessMimeType(__DIR__.'/Fixtures/test.docx'));
8589
}
8690

src/Symfony/Component/Security/Http/Event/LoginFailureEvent.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Component\Security\Http\Event;
413

514
use Symfony\Component\HttpFoundation\Request;

src/Symfony/Component/Security/Http/Event/LoginSuccessEvent.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Component\Security\Http\Event;
413

514
use Symfony\Component\HttpFoundation\Request;

0 commit comments

Comments
 (0)
0