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

[7.x] Publish the form request stub used by RequestMakeCommand #31962

Merged
merged 2 commits into from Mar 15, 2020

Conversation

@hailwood
Copy link
Contributor

hailwood commented Mar 14, 2020

With V7 we got the awesome stubs:publish command which covers a lot of things.

One thing it doesn't cover is the default FormRequest, which is something I feel would be quite a good stub for things if you create your own base FormRequest class with custom methods and you want all the created form requests to extend your new base class.

This PR simply updates the RequestMakeCommand to function the same as the generators that have their stubs published.

@GrahamCampbell GrahamCampbell changed the title Publish the form request stub used by RequestMakeCommand.php [7.x] Publish the form request stub used by RequestMakeCommand Mar 14, 2020
@taylorotwell

This comment has been minimized.

Copy link
Member

taylorotwell commented Mar 14, 2020

That's not the only changes that need to be made. The DummyClass and DummyNamespace need to be updated to reflect the other published stub variables for consistency.

@rcerljenko

This comment has been minimized.

Copy link

rcerljenko commented Mar 14, 2020

can you also do it for the observer stub?

@hailwood

This comment has been minimized.

Copy link
Contributor Author

hailwood commented Mar 15, 2020

@taylorotwell done 👍

@rcerljenko I looked into it, however the observers have several other placeholders that get replaced, and as they're not part of the default replacements done via the GeneratorCommand I'd have to name them, and I don't want this PR to get rejected due to names in the observer stub.

It's pretty simple to do though, Check out the files changed in this PR, and how the JobMakeCommand functions with the boolean and then you can base your own PR around that for the observer stub and have the discussion there about what best to name the replacements 🙂

@taylorotwell taylorotwell merged commit f5b6f3b into laravel:7.x Mar 15, 2020
7 checks passed
7 checks passed
P7.2 - Sprefer-lowest
Details
P7.2 - Sprefer-stable
Details
P7.3 - Sprefer-lowest
Details
P7.3 - Sprefer-stable
Details
P7.4 - Sprefer-lowest
Details
P7.4 - Sprefer-stable
Details
continuous-integration/styleci/pr The analysis has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.