Skip to content

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

Merged
taylorotwell merged 2 commits into
laravel:7.xfrom
hailwood:7.x
Mar 15, 2020
Merged

[7.x] Publish the form request stub used by RequestMakeCommand#31962
taylorotwell merged 2 commits into
laravel:7.xfrom
hailwood:7.x

Conversation

@hailwood

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

can you also do it for the observer stub?

@hailwood

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