Repository navigation
feat: add doctrine:fixtures:down for revertible fixtures - #6
Merged
Merged
Conversation
Fixtures implementing RevertibleFixtureInterface::down() can be reverted: the last batch by default, given fixtures or --all. Executed dependents are reverted first, each in its own transaction with its record. A plan with an irreversible or unavailable fixture reverts nothing. The command asks for confirmation, proceeds with --no-interaction and is hidden in production.
Under WordPress, mysqli runs with MYSQLI_REPORT_OFF and DBAL turns a missing table into a TypeError instead of TableNotFoundException. Check the table through schema introspection, bypassing the asset filters.
Member
Author
|
End-to-end check in a real WordPress (wordpress-astro-sympress worktree, disposable copy of the MariaDB 11.8 database,
Found and fixed in 1a9b80d: WordPress sets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part 3 of 3 of migration-style fixtures (
status→up→down). Ships asv1.1.0after merge.RevertibleFixtureInterface::down(ObjectManager)marks a fixture as revertible.doctrine:fixtures:down [fixtures...] [--all] [--group] [--em]:--group, or--all;down()or an unavailable class;--no-interactionproceeds likedoctrine:migrations:migrate -n;down()can usegetReference().AbstractFixturesCommand(shared byupanddown).ProductionGuardPasshidesdownin production.Verification
composer qapasses locally on PHP 8.5 (18 tests, 147 assertions): last batch only, explicit fixture with dependents first, irreversible fixture blocks the run, declined confirmation, not-executed fixture rejected, production container withoutdown.