-
Notifications
You must be signed in to change notification settings - Fork 3
feat: skip generation for invalid stubs #108
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
Conversation
src/Generators/EntityGenerator.php
Outdated
| return view($stubPath)->with($data)->render(); | ||
| } | ||
|
|
||
| protected function checkStubExists(string $stub): bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| protected function checkStubExists(string $stub): bool | |
| protected function isStubExists(string $stubName): bool |
src/Generators/SeederGenerator.php
Outdated
|
|
||
| public function generate(): void | ||
| { | ||
| $entitySeeder = (version_compare(app()->version(), '8', '>=')) ? 'seeder' : 'legacy_seeder'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove legacy seeder check
tests/SeederGeneratorTest.php
Outdated
| config([ | ||
| 'entity-generator.stubs.seeder' => 'incorrect_stub', | ||
| ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| config([ | |
| 'entity-generator.stubs.seeder' => 'incorrect_stub', | |
| ]); | |
| config(['entity-generator.stubs.seeder' => 'incorrect_stub']); |
refs: #93