Skip to content

Commit bf1ad1e

Browse files
authored
Merge pull request #639 from TomHAnderson/hotfix/phpunit-version
Upgraded to phpunit 11.4
2 parents dab04b8 + 0b546ea commit bf1ad1e

18 files changed

+86
-86
lines changed

.github/workflows/coding-standards.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
name: "Coding Standards"
1616
uses: "doctrine/.github/.github/workflows/[email protected]"
1717
with:
18-
php-version: '8.1'
18+
php-version: '8.2'
1919
composer-options: '--prefer-dist --ignore-platform-req=php'
2020

.github/workflows/continuous-integration.yml

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
php-version:
22-
- "8.1"
2322
- "8.2"
2423
- "8.3"
2524
dependencies:

.github/workflows/static-analysis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
strategy:
1313
matrix:
1414
php-version:
15-
- "8.1"
1615
- "8.2"
1716
- "8.3"
1817

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ composer.phar
44
composer.lock
55
.DS_Store
66
.phpcs-cache
7-
.phpunit.result.cache
7+
.phpunit.cache
88

99
/tests/Stubs/storage/framework/views/*
1010
!/tests/Stubs/storage/framework/views/.gitkeep

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ or in the docs directory.
4343
Versions
4444
--------
4545

46-
* Version 3 supports DBAL ^4.0 and ORM ^3.0. See the [upgrade guide](https://laravel-doctrine-orm-official.readthedocs.io/en/latest/upgrade.html) for more information.
46+
* Version 3 supports DBAL ^4.0, ORM ^3.0, and PHP 8.2. See the [upgrade guide](https://laravel-doctrine-orm-official.readthedocs.io/en/latest/upgrade.html) for more information.
4747
* Version 2 supports Laravel 9 - 11, DBAL ^3.0 and ORM ^2.0.
4848
* Version 1 supports Laravel 6 - 9, DBAL ^2.0 and ORM ^2.0.
4949
See [documentation in version 2](https://github.com/laravel-doctrine/orm/tree/2.0?tab=readme-ov-file#versions)

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919
],
2020
"require": {
21-
"php": "^8.1",
21+
"php": "^8.2",
2222
"doctrine/dbal": "^3.0 || ^4.0",
2323
"doctrine/orm": "^3.1",
2424
"doctrine/persistence": "^3.3",
@@ -44,7 +44,7 @@
4444
"php-parallel-lint/php-parallel-lint": "^1.4",
4545
"phpstan/phpstan": "^1.9",
4646
"phpstan/phpstan-deprecation-rules": "^1.1",
47-
"phpunit/phpunit": "^9.3",
47+
"phpunit/phpunit": "^11.4",
4848
"fakerphp/faker": "^1.23",
4949
"laravel/framework": "^10.0 || ^11.0"
5050
},

phpunit.xml

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
13-
>
14-
<coverage>
15-
<include>
16-
<directory suffix=".php">src/</directory>
17-
</include>
18-
</coverage>
5+
cacheDirectory=".phpunit.cache"
6+
executionOrder="depends,defects"
7+
shortenArraysForExportThreshold="10"
8+
requireCoverageMetadata="false"
9+
beStrictAboutCoverageMetadata="false"
10+
beStrictAboutOutputDuringTests="true"
11+
displayDetailsOnPhpunitDeprecations="true"
12+
failOnPhpunitDeprecation="true"
13+
failOnRisky="true"
14+
failOnWarning="true">
1915
<testsuites>
20-
<testsuite name="Package Test Suite">
21-
<directory suffix="Test.php">./tests/</directory>
16+
<testsuite name="default">
17+
<directory>tests</directory>
2218
</testsuite>
2319
</testsuites>
20+
21+
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
22+
<include>
23+
<directory>src</directory>
24+
</include>
25+
</source>
2426
</phpunit>

tests/Assets/Extensions/ExtensionMock.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ExtensionMock implements Extension
1414
public function addSubscribers(EventManager $manager, EntityManagerInterface $em): void
1515
{
1616
// Confirm it gets called
17-
(new ExtensionManagerTest())->assertTrue(true);
17+
(new ExtensionManagerTest('test'))->assertTrue(true);
1818
}
1919

2020
/** @return mixed[] */

tests/Assets/MyDoctrineExtender.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ class MyDoctrineExtender implements DoctrineExtender
1414
{
1515
public function extend(Configuration $configuration, Connection $connection, EventManager $eventManager): void
1616
{
17-
(new DoctrineManagerTest())->assertExtendedCorrectly($configuration, $connection, $eventManager);
17+
(new DoctrineManagerTest('test'))->assertExtendedCorrectly($configuration, $connection, $eventManager);
1818
}
1919
}

tests/Feature/Configuration/Cache/ApcCacheProviderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Mockery as m;
1111
use Psr\Cache\CacheItemPoolInterface;
1212

13-
class ApcCacheProviderTest extends CacheProviderTest
13+
class ApcCacheProviderTest extends CacheProvider
1414
{
1515
public function getProvider(): mixed
1616
{

tests/Feature/Configuration/Cache/ArrayCacheProviderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use LaravelDoctrine\ORM\Configuration\Cache\ArrayCacheProvider;
88
use Symfony\Component\Cache\Adapter\ArrayAdapter;
99

10-
class ArrayCacheProviderTest extends CacheProviderTest
10+
class ArrayCacheProviderTest extends CacheProvider
1111
{
1212
public function getProvider(): mixed
1313
{

tests/Feature/Configuration/Cache/CacheProviderTest.php renamed to tests/Feature/Configuration/Cache/CacheProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use LaravelDoctrineTest\ORM\TestCase;
88
use Mockery;
99

10-
abstract class CacheProviderTest extends TestCase
10+
abstract class CacheProvider extends TestCase
1111
{
1212
abstract public function getProvider(): mixed;
1313

tests/Feature/Configuration/Cache/FileCacheProviderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Mockery as m;
1010
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
1111

12-
class FileCacheProviderTest extends CacheProviderTest
12+
class FileCacheProviderTest extends CacheProvider
1313
{
1414
public function getProvider(): mixed
1515
{

tests/Feature/Configuration/Cache/MemcachedCacheProviderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Mockery as m;
1111
use Psr\Cache\CacheItemPoolInterface;
1212

13-
class MemcachedCacheProviderTest extends CacheProviderTest
13+
class MemcachedCacheProviderTest extends CacheProvider
1414
{
1515
public function getProvider(): mixed
1616
{

tests/Feature/Configuration/Cache/PhpFileCacheProviderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Mockery as m;
1010
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
1111

12-
class PhpFileCacheProviderTest extends CacheProviderTest
12+
class PhpFileCacheProviderTest extends CacheProvider
1313
{
1414
public function getProvider(): mixed
1515
{

tests/Feature/Configuration/Cache/RedisCacheProviderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Mockery as m;
1111
use Psr\Cache\CacheItemPoolInterface;
1212

13-
class RedisCacheProviderTest extends CacheProviderTest
13+
class RedisCacheProviderTest extends CacheProvider
1414
{
1515
public function getProvider(): mixed
1616
{

0 commit comments

Comments
 (0)