Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Allow for the collection of stubs to be published #45653

Merged
merged 4 commits into from
Jan 16, 2023

Conversation

ollieread
Copy link
Contributor

@ollieread ollieread commented Jan 14, 2023

This PR adds a CollectStubsForPublishing event that is fired during the stub:publish artisan command, with the express purpose of collecting stubs to be published.

The idea is that rather than rely on different tags in vendor:publish, third-party packages can queue up stubs for publishing during the command designed for such.

This current solution is the simplest, as I originally wanted to create a simple "StubManager" class to handle it, and have that work as part of the service provider. This solution also allows for the overriding of default stubs, but I can amend that if necessary. My specific use case for this would actually require overriding some of the default ones.

If you're open to a more advanced version of this, I would happily replace this functionality with a method on the base ServiceProvider if that would be preferable.

@ollieread ollieread changed the title Add event for collecting publishable stubs Allow for the collection of stubs to be published Jan 14, 2023
@taylorotwell taylorotwell merged commit 955db51 into laravel:9.x Jan 16, 2023
@ollieread ollieread deleted the collectible-stub-publishing branch January 16, 2023 21:03
@GrahamCampbell GrahamCampbell changed the title Allow for the collection of stubs to be published [9.x] Allow for the collection of stubs to be published Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants