type-lang / mapper-laravel
Laravel integration of the TypeLang mapper
dev-master / 2.x-dev
2026-11-22 00:55 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- type-lang/mapper: dev-master
- type-lang/parser: dev-master
Requires (Dev)
- illuminate/cache: ^10.0|^11.0|^12.0|^13.0
- illuminate/config: ^10.0|^11.0|^12.0|^13.0
- illuminate/container: ^10.0|^11.0|^12.0|^13.0
- laravel/telescope: ^5.0
- php-debugbar/php-debugbar: ^2.0|^3.0
- phpstan/phpstan: ^2.3.6
- phpunit/phpunit: ^10.5|^11.0|^12.0|^13.0
Suggests
- barryvdh/laravel-debugbar: (^3.0|^4.0) Allows showing the mapper calls in the Laravel Debugbar
- laravel/telescope: (^5.0) Allows recording the mapper calls in Laravel Telescope
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-22 00:55:24 UTC
README
Registers the mapper in a Laravel application: a default mapper and named
mappers extending its settings, php artisan vendor:publish --tag=type-lang-mapper-config publishes the config.
// config/type-lang-mapper.php return [ 'naming' => 'snake_case', 'types' => [App\Mapper\UuidTypeBuilder::class], 'mappers' => [ 'api' => [ 'strict' => true, 'types' => [App\Mapper\MoneyTypeBuilder::class], ], ], ];
The default mapper is type-lang.mapper (bound to MapperInterface), a
named one is type-lang.mapper.api.