diff --git a/composer.json b/composer.json
index abfa2577..53601b69 100644
--- a/composer.json
+++ b/composer.json
@@ -24,15 +24,15 @@
},
"require-dev": {
"ext-sqlite3": "*",
- "doctrine/coding-standard": "^10.0",
+ "doctrine/coding-standard": "^11.0",
"doctrine/dbal": "^2.13 || ^3.0",
"doctrine/deprecations": "^1.0",
"doctrine/mongodb-odm": "^1.3.0 || ^2.0.0",
"doctrine/orm": "^2.12",
"phpstan/phpstan": "^1.5",
- "phpunit/phpunit": "^8.5 || ^9.5",
+ "phpunit/phpunit": "^8.5 || ^9.5 || ^10.0",
"symfony/cache": "^5.0 || ^6.0",
- "vimeo/psalm": "^4.10"
+ "vimeo/psalm": "^4.10 || ^5.9"
},
"suggest": {
"alcaeus/mongo-php-adapter": "For using MongoDB ODM 1.3 with PHP 7 (deprecated)",
@@ -49,12 +49,12 @@
},
"autoload": {
"psr-4": {
- "Doctrine\\Common\\DataFixtures\\": "lib/Doctrine/Common/DataFixtures"
+ "Doctrine\\Common\\DataFixtures\\": "src"
}
},
"autoload-dev": {
"psr-4": {
- "Doctrine\\Tests\\": "tests/Doctrine/Tests"
+ "Doctrine\\Tests\\": "tests"
}
}
}
diff --git a/docs/en/how-to/fixture-ordering.rst b/docs/en/how-to/fixture-ordering.rst
index 76454d4e..6430bcba 100644
--- a/docs/en/how-to/fixture-ordering.rst
+++ b/docs/en/how-to/fixture-ordering.rst
@@ -20,6 +20,7 @@ Option 1: Controlling the order manually
----------------------------------------
.. code-block:: php
+
loadFromFile('/path/to/MyDataFixtures/MyFixture1.php');
@@ -69,12 +72,14 @@ want to load a whole directory of fixtures instead of making one call
per fixture.
.. code-block:: php
+
loadFromDirectory('/path/to/MyDataFixtures');
You can get the added fixtures using the ``getFixtures()`` method:
.. code-block:: php
+
getFixtures();
@@ -87,6 +92,7 @@ store you are using. For example, if you are using ORM, you should
do the following:
.. code-block:: php
+
execute($loader->getFixtures(), append: true);
@@ -114,5 +121,6 @@ want to wrap the purge and the load of every fixture in its own transaction.
To do so, you can use ``MultipleTransactionORMExecutor``.
.. code-block:: php
+
` is satisfied if you extend ``AbstractFixture``.
.. code-block:: php
+
- lib
+ src
tests
@@ -30,21 +30,21 @@
- lib/Doctrine/Common/DataFixtures/AbstractFixture.php
- lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php
+ src/AbstractFixture.php
+ src/Executor/AbstractExecutor.php
- lib/Doctrine/Common/DataFixtures/Exception/CircularReferenceException.php
+ src/Exception/CircularReferenceException.php
- lib/Doctrine/Common/DataFixtures/DependentFixtureInterface.php
- lib/Doctrine/Common/DataFixtures/FixtureInterface.php
- lib/Doctrine/Common/DataFixtures/Purger/ORMPurgerInterface.php
- lib/Doctrine/Common/DataFixtures/Purger/PurgerInterface.php
- lib/Doctrine/Common/DataFixtures/OrderedFixtureInterface.php
- lib/Doctrine/Common/DataFixtures/SharedFixtureInterface.php
+ src/DependentFixtureInterface.php
+ src/FixtureInterface.php
+ src/Purger/ORMPurgerInterface.php
+ src/Purger/PurgerInterface.php
+ src/OrderedFixtureInterface.php
+ src/SharedFixtureInterface.php
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index b0b443c3..805249c4 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -3,109 +3,109 @@ parameters:
-
message: "#^Call to method transactional\\(\\) on an unknown class Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManagerInterface\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php
+ path: src/Executor/PHPCRExecutor.php
-
message: "#^Method Doctrine\\\\Common\\\\DataFixtures\\\\Executor\\\\PHPCRExecutor\\:\\:getObjectManager\\(\\) has invalid return type Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManagerInterface\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php
+ path: src/Executor/PHPCRExecutor.php
-
message: "#^Parameter \\$dm of method Doctrine\\\\Common\\\\DataFixtures\\\\Executor\\\\PHPCRExecutor\\:\\:__construct\\(\\) has invalid type Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManagerInterface\\.$#"
count: 2
- path: lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php
+ path: src/Executor/PHPCRExecutor.php
-
message: "#^Property Doctrine\\\\Common\\\\DataFixtures\\\\Executor\\\\PHPCRExecutor\\:\\:\\$dm has unknown class Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManagerInterface as its type\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php
+ path: src/Executor/PHPCRExecutor.php
-
message: "#^Call to an undefined method Doctrine\\\\Common\\\\DataFixtures\\\\FixtureInterface\\:\\:getDependencies\\(\\)\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Loader.php
+ path: src/Loader.php
-
message: "#^Call to an undefined method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getReference\\(\\)\\.$#"
count: 2
- path: lib/Doctrine/Common/DataFixtures/ProxyReferenceRepository.php
+ path: src/ProxyReferenceRepository.php
-
message: "#^Call to an undefined method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getUnitOfWork\\(\\)\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/ProxyReferenceRepository.php
+ path: src/ProxyReferenceRepository.php
-
message: "#^Call to method getPhpcrSession\\(\\) on an unknown class Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManagerInterface\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
+ path: src/Purger/PHPCRPurger.php
-
message: "#^Call to static method purgeWorkspace\\(\\) on an unknown class PHPCR\\\\Util\\\\NodeHelper\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
+ path: src/Purger/PHPCRPurger.php
-
message: "#^Method Doctrine\\\\Common\\\\DataFixtures\\\\Purger\\\\PHPCRPurger\\:\\:getObjectManager\\(\\) has invalid return type Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManagerInterface\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
+ path: src/Purger/PHPCRPurger.php
-
message: "#^Parameter \\$dm of method Doctrine\\\\Common\\\\DataFixtures\\\\Purger\\\\PHPCRPurger\\:\\:__construct\\(\\) has invalid type Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManagerInterface\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
+ path: src/Purger/PHPCRPurger.php
-
message: "#^Parameter \\$dm of method Doctrine\\\\Common\\\\DataFixtures\\\\Purger\\\\PHPCRPurger\\:\\:setDocumentManager\\(\\) has invalid type Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManager\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
+ path: src/Purger/PHPCRPurger.php
-
message: "#^Property Doctrine\\\\Common\\\\DataFixtures\\\\Purger\\\\PHPCRPurger\\:\\:\\$dm \\(Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManagerInterface\\|null\\) does not accept Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManager\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
+ path: src/Purger/PHPCRPurger.php
-
message: "#^Property Doctrine\\\\Common\\\\DataFixtures\\\\Purger\\\\PHPCRPurger\\:\\:\\$dm has unknown class Doctrine\\\\ODM\\\\PHPCR\\\\DocumentManagerInterface as its type\\.$#"
count: 1
- path: lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
+ path: src/Purger/PHPCRPurger.php
-
message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\