All notable changes to typescriptable-laravel
will be documented in this file.
- Fix for SchemaClass for #89, thanks to @PerryRylance
- Upgrade
mongodb/laravel-mongodb
to v5.x.x
- Fix missing accessors with Eloquent
parser
engine
- Fix
isModel()
detection, addIlluminate\Foundation\Auth\User
for models withAuthenticatable
trait. - Add
snakeCaseName
property to relations to getcount
with snake case name.
- Fix
RouteListCommand
with JSON format - Fix
}
for Routes types
- Remove options from
typescriptable:eloquent
,typescriptable:settings
andtypescriptable:routes
because all parameters can be set from config - Add
eloquent:list
to show all Eloquent models - Routes are now generated from
route:list
command - Add more tests for routes and settings
- Add config for routes
routes.print_list
to printroutes.ts
fileroutes.add_to_window
to add routes intowindow
to get it fromwindow.Routes
(SSR check),routes.print_list
must betrue
routes.use_path
to replace routes types names to routes paths
Refactoring with Artisan command show:model
typescriptable:models
command is nowtypescriptable:eloquent
command (old command still works)- Add more tests to valid Eloquent parsing
- Add mongodb support
- Add new option into config to handle engine with two options
artisan
orparser
artisan
will parse models with Artisan commandshow:model
parser
will parse models with internal engine
'engine' => [
/**
* `artisan` will use the `php artisan model:show` command to parse the models.
* `parser` will use internal engine to parse the models.
*/
'eloquent' => 'artisan', // artisan / parser
],
BREAKING CHANGES
- Change
models
entry into config toeloquent
- 'models => [
+ 'eloquent' => [
// ...
],
- Fix
EloquentPhp::class
for\
duplicates - Fix
EloquentCast::class
withUnitEnum
and public constants into enum classes
Fix window.Routes
from routes.ts
auto-generated file
Fix version
Add filter on items()
to keep only class with inheritance from Model
class
Routes generation fixes with ESLint (typo, multiple params).
Fix window.Routes = Routes
for routes.ts
Add appUrl
to routes.ts
.
Drop Laravel 9 and Laravel 10 and PHP 8.1 support (Laravel 11 support only PHP 8.2+).
Laravel is no longer dependent on the Doctrine DBAL and registering custom Doctrines types is no longer necessary for the proper creation and alteration of various column types that previously required custom types. From Laravel News
To install package with old versions of Laravel, use the following command:
composer require kiwilan/typescriptable-laravel:1.12.03
Readd doctrine/dbal
for Laravel < 11.
Drop doctrine/dbal
to require-dev
and update dependencies.
Add support for Laravel 11
Hotfix for relation parsing if multiline.
DateTime
type is nowstring
for Typescript
For issue #46
- Fix
- Hotfix for
v1.11.33
- Add config option for database prefix
DB_PREFIX
(can be used intodatabase.php
file)
Issue #44
- Fix EloquentRelation prefix morph relations
- Replace
Schema::getAllTables()
withSchema::getConnection()->getDoctrineSchemaManager()->listTableNames()
- Add
pivot
parser withEloquentRelation
parser to addpivot
property to original model.
- Fix
EloquentRelation
warning iftype
is not exist
- Fix
[Bug]: linting problem
#36
- Fixes
- Models relationships fixes
- Typescript generated fixed
- Add header to
.d.ts
to skip Typescript errors
- Fix
Typescriptable::settings
return type to?SettingType
Table
will now check if table exists before trying to scan itClassItem
fix config skip model
- Fix
mixed
ts type toany
- Fix
SettingType
allow path to not exists
- Add
EloquentRelation
fallback fortype
andtypeTs
- fix version
- Add advanced array support to the for PHPDoc tag.
SettingType
fixextends
param ifnull
- Add partial support for
spatie/laravel-settings
package
- add support for
Morph
relations
- Fix
Illuminate\Database\Eloquent\Casts\Attribute
bug
- Add tests
- Multiple database support (
sqlserver
soon) for issue #4
- Fix same name routes
- Rename Route to App.Route
- Fix routes when method is not exist
- Fix crash on Laravel 10
- Now compatible with Laravel 10
- Remove
inertia
command - Inertia types are now generated by NPM associated package
TypedLink
is nowRoute
- Refactoring of
typescriptable:models
command - Add
typescriptable:routes
command to generate route types - Add
typescriptable:inertia
command to generate Inertia types - Add
typescriptable
command to generate current commands with options - All commands options are now into package config
- Publish
@kiwilan/typescriptable-laravel
with some features for Inertia and typed routes usage
- remove
string[]
forflash
, onlyobject
type
- Add
flash
intoInertiaPage
- Fix namespace
- Add new command
typescriptable:ziggy
to add Laravel routes types and Inertia extra types (forusePage
and global methods in Vue components)
- Improve pagination