Skip to content

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

Merged
taylorotwell merged 4 commits intolaravel:9.xfrom
ollieread:collectible-stub-publishing
Jan 16, 2023
Merged

[9.x] Allow for the collection of stubs to be published#45653
taylorotwell merged 4 commits intolaravel:9.xfrom
ollieread:collectible-stub-publishing

Conversation

@ollieread
Copy link
Copy Markdown
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