-
Notifications
You must be signed in to change notification settings - Fork 17
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
[3.x] Adds support for Laravel >=11.33.0, Fixes #81 #83
Conversation
Implement model inspector
Added new class |
add output-file tests Fix ModelTyperCommand Add ShowModelTyperMappingsCommand Update ModelInspectorTest.php Create ModelInspectorTest.php
Update ModelInspectorTest.php Update GeneratorTest Update DetermineAccessorTypeTest.php Update GeneratorTest.php
Add more tests
Merge test changes
Add config options
…typer into modeltyper-v3
more tests run modeltyper after migration Update readme.md add UPGRADE.md update deps slim skeleton replace \n with PHP_EOL
4bb606e
to
fe4079f
Compare
I'm sorry for so many changes, I know that reviewing so many modifications is quite tedious, let me know if you need me to clarify anything. |
All good, much appreciated! I'll be sure to review this when i can asap thanks again |
Upgrade modeltyper to V3.x
The problem with previous version comes from laravel 11.33 extracting functionalities from
ShowModelCommand
to a external classIlluminate\Database\Eloquent\ModelInspector
(see #81).Changes
This pull request drops support for Laravel <11.0 and php 8.1, updates dependencies and include php 8.4 in testbench.
Now, instead of extending
ShowModelCommand
, modeltyper implementsModelInspector
directly, and drops its internalShowModelCommand
.Dependencies have been updated, larastan v3, orchestra v9, make sure phpstan and test pass (there where a lot of tests that where not implemented, those were updated).
Additions
artisan model:typer-mappings
, it returns a table with current mappings.artisan model:typer
and get the data exactly how you want it.model:typer
to run after migrating, disabled by default.Removed
--all
, in description it implied it "Enable all output options", in reality only 2 (--plurals --api-resources),--resolve-abstract
and--throw-exceptions
, these are no longer needed.spatie/laravel-ray
as it is incompatible at this time withlarastan@v3
.Task list
ModelInterface
andTypescriptInterface
ShowModelCommand
can be updated (it can't)ModelInspector
and removeShowModelCommand
Optional
I would like some other improvements for V3, if ok, like: