Skip to content

Commit

Permalink
Merge pull request #639 from TomHAnderson/hotfix/phpunit-version
Browse files Browse the repository at this point in the history
Upgraded to phpunit 11.4
  • Loading branch information
TomHAnderson authored Oct 28, 2024
2 parents dab04b8 + 0b546ea commit bf1ad1e
Show file tree
Hide file tree
Showing 18 changed files with 86 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/[email protected]"
with:
php-version: '8.1'
php-version: '8.2'
composer-options: '--prefer-dist --ignore-platform-req=php'

1 change: 0 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
dependencies:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ composer.phar
composer.lock
.DS_Store
.phpcs-cache
.phpunit.result.cache
.phpunit.cache

/tests/Stubs/storage/framework/views/*
!/tests/Stubs/storage/framework/views/.gitkeep
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ or in the docs directory.
Versions
--------

* 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.
* 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.
* Version 2 supports Laravel 9 - 11, DBAL ^3.0 and ORM ^2.0.
* Version 1 supports Laravel 6 - 9, DBAL ^2.0 and ORM ^2.0.
See [documentation in version 2](https://github.com/laravel-doctrine/orm/tree/2.0?tab=readme-ov-file#versions)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"doctrine/dbal": "^3.0 || ^4.0",
"doctrine/orm": "^3.1",
"doctrine/persistence": "^3.3",
Expand All @@ -44,7 +44,7 @@
"php-parallel-lint/php-parallel-lint": "^1.4",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpunit/phpunit": "^9.3",
"phpunit/phpunit": "^11.4",
"fakerphp/faker": "^1.23",
"laravel/framework": "^10.0 || ^11.0"
},
Expand Down
38 changes: 20 additions & 18 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
cacheDirectory=".phpunit.cache"
executionOrder="depends,defects"
shortenArraysForExportThreshold="10"
requireCoverageMetadata="false"
beStrictAboutCoverageMetadata="false"
beStrictAboutOutputDuringTests="true"
displayDetailsOnPhpunitDeprecations="true"
failOnPhpunitDeprecation="true"
failOnRisky="true"
failOnWarning="true">
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix="Test.php">./tests/</directory>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>

<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
<include>
<directory>src</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion tests/Assets/Extensions/ExtensionMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ExtensionMock implements Extension
public function addSubscribers(EventManager $manager, EntityManagerInterface $em): void
{
// Confirm it gets called
(new ExtensionManagerTest())->assertTrue(true);
(new ExtensionManagerTest('test'))->assertTrue(true);
}

/** @return mixed[] */
Expand Down
2 changes: 1 addition & 1 deletion tests/Assets/MyDoctrineExtender.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class MyDoctrineExtender implements DoctrineExtender
{
public function extend(Configuration $configuration, Connection $connection, EventManager $eventManager): void
{
(new DoctrineManagerTest())->assertExtendedCorrectly($configuration, $connection, $eventManager);
(new DoctrineManagerTest('test'))->assertExtendedCorrectly($configuration, $connection, $eventManager);
}
}
2 changes: 1 addition & 1 deletion tests/Feature/Configuration/Cache/ApcCacheProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Mockery as m;
use Psr\Cache\CacheItemPoolInterface;

class ApcCacheProviderTest extends CacheProviderTest
class ApcCacheProviderTest extends CacheProvider
{
public function getProvider(): mixed
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use LaravelDoctrine\ORM\Configuration\Cache\ArrayCacheProvider;
use Symfony\Component\Cache\Adapter\ArrayAdapter;

class ArrayCacheProviderTest extends CacheProviderTest
class ArrayCacheProviderTest extends CacheProvider
{
public function getProvider(): mixed
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use LaravelDoctrineTest\ORM\TestCase;
use Mockery;

abstract class CacheProviderTest extends TestCase
abstract class CacheProvider extends TestCase
{
abstract public function getProvider(): mixed;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Mockery as m;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;

class FileCacheProviderTest extends CacheProviderTest
class FileCacheProviderTest extends CacheProvider
{
public function getProvider(): mixed
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Mockery as m;
use Psr\Cache\CacheItemPoolInterface;

class MemcachedCacheProviderTest extends CacheProviderTest
class MemcachedCacheProviderTest extends CacheProvider
{
public function getProvider(): mixed
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Mockery as m;
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;

class PhpFileCacheProviderTest extends CacheProviderTest
class PhpFileCacheProviderTest extends CacheProvider
{
public function getProvider(): mixed
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Mockery as m;
use Psr\Cache\CacheItemPoolInterface;

class RedisCacheProviderTest extends CacheProviderTest
class RedisCacheProviderTest extends CacheProvider
{
public function getProvider(): mixed
{
Expand Down
Loading

0 comments on commit bf1ad1e

Please sign in to comment.