Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Id Type Laravel Package

skrepr/id-type

Skrepr ID Type adds type-safe ID value objects to Laravel Eloquent models, with a custom cast for UUIDs, ULIDs, and other identifiers so you can validate, serialize, and use IDs consistently across your application. Lightweight and easy to configure.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Id Type
What does skrepr/id-type do in a Laravel application?
Skrepr ID Type provides type-safe ID value objects and a custom cast for identifiers such as UUIDs and ULIDs. It is intended to help you validate, serialize, and use IDs consistently across your Laravel application. The package is described as lightweight and easy to configure, with support for other identifier types beyond UUID and ULID.
How do I install skrepr/id-type?
Install it with Composer using composer require skrepr/id-type, then apply the package cast to the model attributes that hold your identifiers. Check the package README and composer.json for any required service provider or configuration steps. Before committing, confirm that the package's PHP and Laravel constraints match your application.
Does skrepr/id-type work with Eloquent models?
The package blurb explicitly describes a custom cast for Laravel Eloquent models, so Eloquent usage is the advertised path. However, technical assessment notes that recent releases focus on Doctrine ORM 3 and EntityValueResolver, and that Eloquent-only fit should be confirmed. Validate the cast against your Laravel version and consider Laravel's native UUID and ULID casts if you only need basic identifier handling.
Which ID formats does skrepr/id-type support?
The package advertises UUIDs, ULIDs, and other identifiers, suggesting support for custom ID value objects in addition to the common formats. The exact list of supported types and any extension points should be confirmed in the README and source code for the version you install. Test custom formats explicitly if your application uses non-standard identifiers.
Is skrepr/id-type a replacement for Laravel's native UUID and ULID casts?
It is best treated as an optional enhancement rather than a mandatory replacement. Laravel already provides native UUID and ULID casting, which may be sufficient for simple applications. Skrepr ID Type adds typed ID value objects and consistent validation and serialization, so it is most useful when you want domain-specific ID objects across your models.
What Laravel and PHP versions does skrepr/id-type support?
The supported PHP and Laravel versions are defined in the package's composer.json and should be checked before installation. Technical assessment specifically recommends verifying PHP, Laravel, and doctrine/orm constraints. Release 1.3.2 is a patch-level compatibility improvement for doctrine/orm ^3, so Doctrine users should pay particular attention to that constraint.
Does skrepr/id-type support Doctrine ORM and Laravel route model binding?
The package is assessed as the best fit for Laravel applications using Doctrine ORM or hybrid Eloquent and Doctrine services. Doctrine's EntityValueResolver is not the same as Laravel's route model binding, and the 1.3.2 improvement mainly matters where controller or request binding resolves Doctrine entities from IDs. Confirm which resolution path your application actually uses before relying on the package for route binding.
How should I test skrepr/id-type in my application?
Pilot the package with one entity or model rather than rolling it out everywhere at once. Add integration tests for create, read, and update flows, malformed IDs, serialization, and controller or entity resolution where applicable. If you use Doctrine, also verify DBAL type registration and entity mappings, then validate in staging with production-like data.
What production risks should I watch for with skrepr/id-type?
Technical assessment highlights misregistered DBAL types, resolver mismatches, malformed ID handling, and storage format choices such as binary versus string IDs. Confirm index behavior and storage size before high-volume adoption. Pin to ^1.3.2 or a narrower constraint and keep a rollback pin to 1.3.1 if resolver or mapping regressions appear.
Is skrepr/id-type actively maintained, and what license does it use?
Package maturity and maintainer responsiveness are not clear from the release note alone, so check the GitHub repository, Packagist release history, and LICENSE file directly. For production use, identify an internal owner for Doctrine and Eloquent ID typing and track compatibility follow-ups for Doctrine ORM 3. Avoid broad version ranges and keep lockfile updates deliberate.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections