Skip to content

Commit

Permalink
refactor: update phpunit to v11 and run rector with phpunit set list
Browse files Browse the repository at this point in the history
  • Loading branch information
ynnoig committed Jun 10, 2024
1 parent 6d7688c commit e7fb8b1
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 20 deletions.
5 changes: 0 additions & 5 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
'@PhpCsFixer:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => false,
'native_function_invocation' => [
'include' => ['@internal'],
'scope' => 'namespaced',
'strict' => false,
],
'nullable_type_declaration_for_default_null_value' => false,
'void_return' => true,
'random_api_migration' => true,
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"symfony/routing": "If you want to use SelfAwareProfileRequestHandler"
},
"require-dev": {
"phpunit/phpunit": "^10",
"phpunit/phpunit": "^11",
"phpstan/phpstan": "^1.11.0",
"friendsofphp/php-cs-fixer": "*",
"php-parallel-lint/php-parallel-lint": "*",
Expand Down
4 changes: 4 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\Config\RectorConfig;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\JMSSetList;

Expand All @@ -14,6 +15,9 @@
])
->withSets([
JMSSetList::ANNOTATIONS_TO_ATTRIBUTES,
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
SetList::TYPE_DECLARATION,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Builder/OrderRequestBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
use CXml\Payload\PayloadIdentityFactoryInterface;
use CXml\Serializer;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

use function file_get_contents;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class OrderRequestBuilderTest extends TestCase implements PayloadIdentityFactoryInterface
{
public function testFromPunchOutOrderMessage(): void
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Handling/HandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
use CXml\Processor\Processor;
use CXml\Serializer;
use CXml\Validation\DtdValidator;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

use function file_get_contents;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class HandlerTest extends TestCase
{
public static function getEndpointData(): iterable
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Model/OrderRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
use CXml\Serializer;
use CXml\Validation\DtdValidator;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class OrderRequestTest extends TestCase implements PayloadIdentityFactoryInterface
{
private DtdValidator $dtdValidator;
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Model/ProductActivityMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
use CXml\Serializer;
use CXml\Validation\DtdValidator;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class ProductActivityMessageTest extends TestCase implements PayloadIdentityFactoryInterface
{
private DtdValidator $dtdValidator;
Expand Down
4 changes: 2 additions & 2 deletions tests/CXmlTest/Model/PunchOutSetupRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
use CXml\Serializer;
use CXml\Validation\DtdValidator;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

/**
* @internal
*
* @coversNothing
*/
#[CoversNothing]
final class PunchOutSetupRequestTest extends TestCase implements PayloadIdentityFactoryInterface
{
private DtdValidator $dtdValidator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
use CXml\Serializer;
use CXml\Validation\DtdValidator;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class PunchoutOrderMessageAdvancedPricingTest extends TestCase implements PayloadIdentityFactoryInterface
{
private DtdValidator $dtdValidator;
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Model/PunchoutOrderMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
use CXml\Serializer;
use CXml\Validation\DtdValidator;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class PunchoutOrderMessageTest extends TestCase implements PayloadIdentityFactoryInterface
{
private DtdValidator $dtdValidator;
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Model/QuoteMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
use CXml\Serializer;
use CXml\Validation\DtdValidator;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class QuoteMessageTest extends TestCase implements PayloadIdentityFactoryInterface
{
private DtdValidator $dtdValidator;
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Model/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
use CXml\Model\Status;
use CXml\Serializer;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;
use RuntimeException;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class SerializerTest extends TestCase
{
public function testSerializeSimpleRequest(): void
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Model/ShipNoticeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
use CXml\Serializer;
use CXml\Validation\DtdValidator;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class ShipNoticeRequestTest extends TestCase implements PayloadIdentityFactoryInterface
{
private DtdValidator $dtdValidator;
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Model/StatusUpdateRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
use CXml\Serializer;
use CXml\Validation\DtdValidator;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class StatusUpdateRequestTest extends TestCase implements PayloadIdentityFactoryInterface
{
private DtdValidator $dtdValidator;
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Payload/DefaultPayloadIdentityFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

use CXml\Payload\DefaultPayloadIdentityFactory;
use DateTime;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class DefaultPayloadIdentityFactoryTest extends TestCase
{
public function testGenerateNewPayloadId(): void
Expand Down
3 changes: 2 additions & 1 deletion tests/CXmlTest/Validation/MessageValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@

use CXml\Validation\DtdValidator;
use CXml\Validation\Exception\CXmlInvalidException;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\TestCase;

use function file_get_contents;

/**
* @internal
* @coversNothing
*/
#[CoversNothing]
final class MessageValidatorTest extends TestCase
{
private DtdValidator $dtdValidator;
Expand Down

0 comments on commit e7fb8b1

Please sign in to comment.