Skip to content

Commit

Permalink
upgraded from PHPUnit 9 to 10
Browse files Browse the repository at this point in the history
  • Loading branch information
driehle committed Dec 30, 2024
1 parent 0894ea1 commit 4ae5f14
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/.phpcs.cache
/.phpunit.result.cache
/.phpunit.cache/
/ci/20*/
/config/application.config.php
/coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"ocramius/proxy-manager": "^2.2.0",
"phpstan/phpstan": "^1.4.6",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpunit/phpunit": "^9.5.13",
"phpunit/phpunit": "^10.5.40",
"squizlabs/php_codesniffer": "^3.6.2"
},
"conflict": {
Expand Down
File renamed without changes.
33 changes: 13 additions & 20 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
<?xml version="1.0"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="./vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="true"
verbose="true"
stopOnFailure="false"
processIsolation="false"
backupGlobals="false"
>
<coverage includeUncoveredFiles="true">
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="DoctrineORMModule Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<testsuite name="DoctrineORMModule test">
<directory>./tests</directory>
</testsuite>
</source>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @ORM\Entity
* @ORM\Table(name="doctrine_orm_module_test")
*/
class Test
class TestEntity
{
/**
* @ORM\Id
Expand Down
2 changes: 1 addition & 1 deletion tests/Assets/Fixture/TestFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Doctrine\Persistence\ObjectManager;
use DoctrineORMModuleTest\Assets\Entity\Category;
use DoctrineORMModuleTest\Assets\Entity\Country;
use DoctrineORMModuleTest\Assets\Entity\Test as TestEntity;
use DoctrineORMModuleTest\Assets\Entity\TestEntity as TestEntity;

Check failure on line 11 in tests/Assets/Fixture/TestFixture.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (PHP: 8.3)

Useless alias "TestEntity" for use of "DoctrineORMModuleTest\Assets\Entity\TestEntity".

/**
* Fixture that loads a constant amount of \DoctrineORMModuleTest\Assets\Entity\Test objects into the manager
Expand Down
4 changes: 2 additions & 2 deletions tests/Collector/MappingCollectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public function testCanHide(): void
}

/**
* @covers \DoctrineORMModule\Collector\MappingCollector::serialize
* @covers \DoctrineORMModule\Collector\MappingCollector::unserialize
* @covers \DoctrineORMModule\Collector\MappingCollector::__serialize
* @covers \DoctrineORMModule\Collector\MappingCollector::__unserialize
* @covers \DoctrineORMModule\Collector\MappingCollector::collect
*/
public function testSerializeUnserializeAndCollectWithNoMetadataFactory(): void
Expand Down
4 changes: 2 additions & 2 deletions tests/Paginator/AdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\Tools\Pagination\Paginator as DoctrinePaginator;
use DoctrineORMModule\Paginator\Adapter\DoctrinePaginator as PaginatorAdapter;
use DoctrineORMModuleTest\Assets\Entity\Test;
use DoctrineORMModuleTest\Assets\Entity\TestEntity;
use DoctrineORMModuleTest\Assets\Fixture\TestFixture;
use DoctrineORMModuleTest\Framework\TestCase;

Expand Down Expand Up @@ -46,7 +46,7 @@ public function setUp(): void
->getEntityManager()
->createQueryBuilder()
->select('t')
->from(Test::class, 't')
->from(TestEntity::class, 't')
->orderBy('t.id', 'ASC');

$this->paginator = new DoctrinePaginator($this->queryBuilder);
Expand Down
6 changes: 3 additions & 3 deletions tests/testing.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

use Doctrine\DBAL\Driver\PDO\SQLite\Driver;
use Doctrine\DBAL\Driver\PDO\SQLite\Driver as SQLiteDriver;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
use DoctrineModule\Service\EventManagerFactory;
use DoctrineORMModule\Service\ConfigurationFactory;
Expand Down Expand Up @@ -55,13 +55,13 @@
'orm_default' => [
'configuration' => 'orm_default',
'eventmanager' => 'orm_default',
'driverClass' => Driver::class,
'driverClass' => SQLiteDriver::class,
'params' => ['memory' => true],
],
'orm_other' => [
'configuration' => 'orm_other',
'eventmanager' => 'orm_other',
'driverClass' => Driver::class,
'driverClass' => SQLiteDriver::class,
'params' => ['memory' => true],
],
],
Expand Down

0 comments on commit 4ae5f14

Please sign in to comment.