Skip to content

Commit

Permalink
fix: fix .gitattributes and #[RequiresPhpUnit] versions (zenstruck#792
Browse files Browse the repository at this point in the history
)
  • Loading branch information
nikophil authored Jan 18, 2025
1 parent 57c42bc commit d9262cc
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 31 deletions.
8 changes: 7 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
* text=auto

/.codecov.yml export-ignore
/.editorconfig export-ignore
/.env export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
Expand All @@ -12,8 +14,12 @@
/docker-compose.yaml export-ignore
/Makefile export-ignore
/phpstan.neon export-ignore
/phpunit-dama-doctrine.xml.dist export-ignore
/phpunit export-ignore
/phpunit.xml.dist export-ignore
/phpunit-10.xml.dist export-ignore
/phpunit-paratest.xml.dist export-ignore
/psalm.xml export-ignore
/stubs export-ignore
/tests export-ignore
/utils/rector/tests export-ignore
/utils/rector/composer.json export-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

/**
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.0
* @requires PHPUnit >=11.0
*/
#[RequiresPhpunit('^11.0')]
#[RequiresPhpunit('>=11.0')]
#[RequiresPhpunitExtension(FoundryExtension::class)]
#[WithStory(EntityStory::class)]
final class WithStoryOnClassTest extends KernelTestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

/**
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.0
* @requires PHPUnit >=11.0
*/
#[RequiresPhpunit('^11.0')]
#[RequiresPhpunit('>=11.0')]
#[RequiresPhpunitExtension(FoundryExtension::class)]
final class WithStoryOnMethodTest extends KernelTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

/**
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.0
* @requires PHPUnit >=11.0
*/
#[RequiresPhpunit('^11.0')]
#[RequiresPhpunit('>=11.0')]
#[RequiresPhpunitExtension(FoundryExtension::class)]
#[WithStory(EntityPoolStory::class)]
final class WithStoryOnParentClassTest extends ParentClassWithStoryAttributeTestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

/**
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
#[RequiresPhpunitExtension(FoundryExtension::class)]
final class DataProviderForServiceFactoryInKernelTestCaseTest extends KernelTestCase
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/DataProvider/DataProviderInUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@

/**
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
#[RequiresPhpunitExtension(FoundryExtension::class)]
final class DataProviderInUnitTest extends TestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

/**
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
#[RequiresPhpunitExtension(FoundryExtension::class)]
final class DataProviderWithNonProxyFactoryInKernelTestCaseTest extends KernelTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

/**
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
#[RequiresPhpunitExtension(FoundryExtension::class)]
abstract class DataProviderWithProxyFactoryInKernelTestCase extends KernelTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

/**
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
#[RequiresPhpunitExtension(FoundryExtension::class)]
final class GenericDocumentProxyFactoryTest extends DataProviderWithProxyFactoryInKernelTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

/**
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
#[RequiresPhpunitExtension(FoundryExtension::class)]
final class GenericEntityProxyFactoryTest extends DataProviderWithProxyFactoryInKernelTestCase
{
Expand Down
8 changes: 4 additions & 4 deletions tests/Integration/ORM/EdgeCasesRelationshipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class EdgeCasesRelationshipTest extends KernelTestCase
#[Test]
#[DataProvider('provideCascadeRelationshipsCombinations')]
#[UsingRelationships(RelationshipWithGlobalEntity\RelationshipWithGlobalEntity::class, ['globalEntity'])]
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
public function it_can_use_flush_after_and_entity_from_global_state(): void
{
$relationshipWithGlobalEntityFactory = persistent_factory(RelationshipWithGlobalEntity\RelationshipWithGlobalEntity::class);
Expand All @@ -72,7 +72,7 @@ public function it_can_use_flush_after_and_entity_from_global_state(): void
#[Test]
#[DataProvider('provideCascadeRelationshipsCombinations')]
#[UsingRelationships(RichDomainMandatoryRelationship\OwningSide::class, ['main'])]
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
public function inversed_relationship_mandatory(): void
{
$owningSideEntityFactory = persistent_factory(RichDomainMandatoryRelationship\OwningSide::class);
Expand All @@ -91,7 +91,7 @@ public function inversed_relationship_mandatory(): void
#[Test]
#[DataProvider('provideCascadeRelationshipsCombinations')]
#[UsingRelationships(InversedOneToOneWithNonNullableOwning\OwningSide::class, ['inverseSide'])]
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
public function inverse_one_to_one_with_non_nullable_inverse_side(): void
{
$owningSideFactory = persistent_factory(InversedOneToOneWithNonNullableOwning\OwningSide::class);
Expand All @@ -109,7 +109,7 @@ public function inverse_one_to_one_with_non_nullable_inverse_side(): void
#[Test]
#[DataProvider('provideCascadeRelationshipsCombinations')]
#[UsingRelationships(InversedOneToOneWithSetter\OwningSide::class, ['inverseSide'])]
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
public function inverse_one_to_one_with_both_nullable(): void
{
$owningSideFactory = persistent_factory(InversedOneToOneWithSetter\OwningSide::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
/**
* @author Kevin Bond <kevinbond@gmail.com>
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
abstract class EntityFactoryRelationshipTestCase extends KernelTestCase
{
use ChangesEntityRelationshipCascadePersist, Factories, ResetDatabase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
*
* @author Kevin Bond <kevinbond@gmail.com>
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
final class PolymorphicEntityFactoryRelationshipTest extends EntityFactoryRelationshipTestCase
{
protected static function contactFactory(): ChildContactFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
/**
* @author Kevin Bond <kevinbond@gmail.com>
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
final class ProxyEntityFactoryRelationshipTest extends EntityFactoryRelationshipTestCase
{
/** @test */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
/**
* @author Kevin Bond <kevinbond@gmail.com>
* @author Nicolas PHILIPPE <nikophil@gmail.com>
* @requires PHPUnit ^11.4
* @requires PHPUnit >=11.4
*/
#[RequiresPhpunit('^11.4')]
#[RequiresPhpunit('>=11.4')]
final class StandardEntityFactoryRelationshipTest extends EntityFactoryRelationshipTestCase
{
protected static function contactFactory(): ContactFactory
Expand Down

0 comments on commit d9262cc

Please sign in to comment.