Closed internalsystemerror closed 6 years ago
This is a fairly large change and although it passes the local tests in composer ci-check
I suggest that you try this with any modules dependent upon it for BC breaks. I've also tested this PR branch in place of the latest stable in an application I'm using it in, and that all runs successfully.
The only thing of note with this, is that php public/index.php
will no longer be an access point provided since zend-mvc-console
is no longer included. Since it integrates with DoctrineModule, however, I do believe that including zend-mvc-console
in your application would allow this access point to be available again.
The list command does not work for groups:
root@8081e4c8dc6e:/var/www# php public/index.php data-fixture:list
All Fixture Groups
==================
* zf-doctrine-audit
* elasticsearch
* default
* performance-substitution
root@8081e4c8dc6e:/var/www# php public/index.php data-fixture:list default
All Fixture Groups
==================
* zf-doctrine-audit
* elasticsearch
* default
* performance-substitution
root@8081e4c8dc6e:/var/www#
php public/index.php data-fixture:list <groupname>
should return a list of the data fixtures in that groupname.
When no fixture group is given to import please create a nicer error message:
root@8081e4c8dc6e:/var/www# php public/index.php data-fixture:import
In ServiceManager.php line 771:
Service with name "ZF\Doctrine\DataFixture\DataFixtureManager" could not be
created. Reason: No fixture group given.
In DataFixtureManagerFactory.php line 51:
No fixture group given.
data-fixture:import [--purge-with-truncate] [--do-not-append] [--] [<group_name>]
root@8081e4c8dc6e:/var/www#
I've encountered one thing in testing I'm not entirely certain about...
Rerunning the import for a given fixture group gives me duplicate key warnings. Is this intentional? I typically destroy and recreate the db from schema and then importing the fixtures again so its not something I've noticed.
But I recall when writing the help text for the commands that rerunning the fixtures should not be an issue.
I'd say this is ready now unless you want to change the help message?
I write all my fixtures to be repeatable. Throwing duplicate key errors is correct for fixtures which are not written to be re-ran.
I've been using this in a few projects without issue, thoughts?
This PR includes:
zendframework/zend-mvc-console
tosymfony/console
and attach to the existingdoctrine-module
binary.composer update --prefer-lowest
See: https://github.com/API-Skeletons/zf-doctrine-data-fixture/issues/4