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
Merged

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

merged 2 commits into from
Mar 15, 2020

Conversation

hailwood
Copy link
Contributor

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
Copy link
Member

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
Copy link

can you also do it for the observer stub?

@hailwood
Copy link
Contributor Author

@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
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.

3 participants