[11.x] Added an event that reports files being deleted when calling the schema:dump --prune command#53870
Merged
taylorotwell merged 3 commits intolaravel:11.xfrom Dec 14, 2024
Conversation
1ab90cb to
02a7a7d
Compare
…ema:dump --prune` command
02a7a7d to
2472b49
Compare
Member
|
I'm not sure if I would call the event |
Contributor
Author
|
@taylorotwell, I couldn't think of anything better at the time. I thought the name |
Contributor
Author
|
I've started brainstorming for the best title. I'll be back with the final result. |
685ccdb to
77ea265
Compare
Contributor
Author
|
@taylorotwell I can't say that many people participated in the brainstorm, but one of the suggested names is There were also some less popular names:
I added a commit with the event name changed to |
This was referenced Feb 24, 2025
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.
The
art schema:dumpconsole command is able to report the end of a job by sending theSchemaDumpedevent, but is unable to report file deletion if the command is called with the--pruneparameter.This PR adds a new event to implement this feature.
P.S.: I didn't find any tests to check both the
art schema:dumpcommand and the event, so I didn't add tests for the new event either.P.S.2: The static analyzer error has nothing to do with my code :)
P.S.3: My case that started it all:
I am developing a package to export data from tables selected by the developer. Yesterday I added the ability to delete files, but I was surprised that in Laravel the
SchemaDumpedevent doesn't contain a label when calling the console command with the--pruneflag (and it shouldn't, because the essence of the event is related to the database schema, not to the files). That's why I decided to add a new event, called in case of launching a console command with the parameter of file trimming.