webpatser/laravel-uuid
Laravel integration for webpatser/uuid - High-performance drop-in UUID replacements (15% faster than Ramsey). Provides Str macros, HasUuids trait, facades, and casts. RFC 4122/9562 compliant.
v7.0.1
18M downloads/mo
#1738 most downloaded on Packagist
webpatser/laravel-uuid
What this package is like to depend on
Last release 1 months ago
02 Jul 2026
Release timing varies
gaps range from 1 weeks to 3.2 years
Some releases are documented
notes for 10 of 32 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
32 releases · first in 2013
12 releases in the last 12 months
see the full history below
Release timeline
32 releases · Sep 2013 to Jul 2026Releases
latest 32-
v7.0.102 Jul 2026Release notes
Open source →Fixed
Str::isSqlServerGuid()now validates viaUuid::validate()instead of the non-existentUuid::isSqlServerFormat(), which threw a runtime error. SQL Serveruniqueidentifiervalues share the 8-4-4-4-12 hex text format, so string validation is the correct check.
-
v7.0.020 Mar 2026Release notes
Open source →- Require PHP 8.5+, Laravel 13.x, webpatser/uuid ^2.0
- Migrate test suite from PHPUnit to Pest 4
- Modernize switch statements to match expressions
- Drop Laravel 11/12 and PHP 8.2-8.4 support
Release notes
Open source →Changed
- Laravel 13 Support: Now requires Laravel 13.x exclusively
- PHP 8.5 Requirement: Minimum PHP version bumped to 8.5
- UUID Package: Requires
webpatser/uuid^2.0 - Test Framework: Migrated entire test suite from PHPUnit to Pest 4
- Code Modernization: Refactored
switchstatements to PHPmatchexpressions inBinaryUuidMigrations - Dev Dependencies: Replaced PHPUnit with Pest PHP, added Pest plugin support
Removed
- Dropped Laravel 11.x and 12.x support
- Dropped PHP 8.2–8.4 support
- Removed PHPUnit bootstrap file (
tests/bootstrap.php) - Removed local path repository configuration from
composer.json
-
v6.2.119 Mar 2026 -
v6.2.012 Sep 2025Release notes
Open source →Changed
- Directory Structure Refactoring: Modernized PSR-4 autoloading structure
- Moved all classes from
src/Webpatser/LaravelUuid/directly tosrc/ - Simplified autoload mapping in
composer.jsonto follow Laravel package conventions - Eliminated redundant nested directory structure while maintaining namespace consistency
- Moved all classes from
Removed
- Cleaned up development artifacts:
benchmark_results.php,.travis.yml, and.phpunit.cache/ - Added
.phpunit.cache/to.gitignorefor cleaner repository maintenance
- Directory Structure Refactoring: Modernized PSR-4 autoloading structure
-
v6.1.011 Sep 2025Release notes
Open source →- Fix spacing, quotes, method naming and other style issues
- Ensure consistent code formatting across the codebase
- Apply Laravel Pint rules for better code readability
Release notes
Open source →Added
- SQL Server GUID Support: Complete Laravel integration for SQL Server's mixed-endianness GUID format
Str::uuidFromSqlServer()- Import UUID from SQL Server with automatic byte order correctionStr::uuidToSqlServer()- Export UUID to SQL Server GUID formatStr::uuidToSqlServerBinary()- Get SQL Server binary format for uniqueidentifier columnsStr::sqlServerBinaryToUuid()- Import SQL Server binary uniqueidentifier to standard UUIDStr::isSqlServerGuid()- Heuristic detection of SQL Server GUID format
- SQL Server Migration Support:
- Automatic
uniqueidentifiercolumn support inBinaryUuidMigrations - SQL Server database detection and conversion SQL generation
- Cross-database compatibility with unified migration helpers
- Automatic
- Database Support Matrix: Extended to include SQL Server alongside MySQL, PostgreSQL, and SQLite
- Comprehensive test suite for SQL Server GUID handling (10 tests, 27 assertions)
- Complete documentation with examples, migration guides, and database compatibility matrix
Changed
- Default Database: Changed fallback database from MySQL to SQLite (Laravel's default)
- Code Formatting: Applied Laravel Pint formatting across entire codebase (16 files, 15 style fixes)
- Documentation: Enhanced README with SQL Server GUID section and updated database support tables
- Dependencies: Updated to use webpatser/uuid v1.3.0 with SQL Server support
Fixed
- SQL Server GUID byte order problems when working with uniqueidentifier columns
- Cross-database UUID compatibility issues between SQL Server and other databases
-
v6.0.111 Sep 2025Release notes
Open source →Fixed
- Removed benchmark function references from README documentation
- Updated documentation to match actual available methods
-
v6.0.010 Sep 2025Release notes
Open source →Major Architecture Change:
- Split into separate core (webpatser/uuid) and Laravel integration packages
- Complete Laravel integration with high-performance drop-in replacements
- 15-25% performance improvement over Laravel's built-in UUID methods
Laravel Integration Features:
- High-performance Str macros (fastUuid, fastOrderedUuid, etc.)
- Drop-in HasUuids trait replacement using our library
- Binary UUID storage support with 55% storage savings
- Database-specific implementations (MySQL/MariaDB varbinary(16), PostgreSQL bytea, SQLite BLOB)
- Comprehensive route model binding support
- Global UUID facade with full webpatser/uuid access
- UuidCast and BinaryUuidCast for automatic model casting
Production Testing:
- Comprehensive testing on MariaDB with real storage verification
- All 10 test suites passing with 67 assertions
- Binary vs string storage comparison (16 bytes vs 36 bytes = 55.6% savings)
- Route model binding, foreign keys, and query performance verified
- Migration helpers tested for all supported databases
Updated Documentation:
- Production-ready status with test results
- Real-world MariaDB test data and storage comparisons
- Quick installation testing guide with Laravel Tinker examples
- Database-specific implementation details and migration examples
Requirements: PHP 8.2+, Laravel 11.x/12.x
Dependencies: webpatser/uuid ^1.2.1Release notes
Open source →Added
- Split Architecture: UUID logic moved to dedicated
webpatser/uuidpackage - High-Performance Str Macros:
Str::fastUuid()- 15% faster thanStr::uuid()Str::fastOrderedUuid()- 25% faster thanStr::orderedUuid()Str::fastIsUuid()- Fast UUID validation
- Extended UUID Methods: Support for all UUID versions (1, 3, 4, 5, 6, 7, 8)
Str::timeBasedUuid()- V1 time-basedStr::reorderedTimeUuid()- V6 reordered timeStr::customUuid()- V8 customStr::nameUuidSha1()- V5 name-based
- Binary UUID Storage: 55% storage savings with 16-byte binary columns
HasBinaryUuidstrait for automatic binary UUID supportBinaryUuidCastfor automatic conversionBinaryUuidMigrationsfor database-optimized migrations
- Production Ready: Comprehensive testing on MariaDB, MySQL, PostgreSQL, SQLite
Breaking Changes
- Architecture: Core UUID functionality moved to separate
webpatser/uuidpackage - Dependencies: Now requires
webpatser/uuidas core dependency - Performance: Existing Laravel UUID methods unchanged, new high-performance alternatives added
Performance Improvements
- 15-25% faster UUID generation compared to Laravel's built-in methods
- 55% storage savings with binary UUID storage
- Better database performance with optimized column types
- Modern PHP 8.2+ optimizations
Features
- ✅ Drop-in Replacements: High-performance alternatives to Laravel's UUID components
- ✅ Auto-Discovery Support: Zero-configuration setup
- ✅ Laravel 11.x & 12.x: Latest Laravel support
- ✅ Route Model Binding: Seamless URL-to-model resolution
- ✅ Foreign Keys: Both binary and string UUID relationships
- ✅ Migration Helpers: Database-specific column types
-
v5.1.210 Sep 2025 -
v5.1.110 Sep 2025Release notes
Open source →- Add prominent benchmark section to README showcasing performance leadership
- Include comprehensive benchmark script with detailed analysis
- Demonstrate 15.1% overall performance advantage vs Ramsey UUID v4.9
- Highlight superior V7 performance (25.7% faster) for database optimization
- Document PHP 8.2+ optimizations and trade-offs between versions
-
v5.1.010 Sep 2025Release notes
Open source →- Upgrade minimum PHP requirement to 8.2+ for maximum performance
- Implement Random\Randomizer class for 11% faster random generation
- Add PHP 8.3+ getBytesFromString() optimization for hex generation
- Introduce readonly properties for immutable UUID data
- Fix V7 UUID monotonic timestamp ordering with sequence counters
- Add comprehensive performance benchmarking with Uuid::benchmark()
- Enhance V7 UUIDs with sub-millisecond precision and consistent sorting
- Optimize memory usage and generation speed across all UUID versions
- Maintain full RFC 9562 compliance for versions 6, 7, and 8
-
v5.0.110 Sep 2025Nothing published for this version
-
v5.0.010 Sep 2025Nothing published for this version
-
4.0.219 May 2023Nothing published for this version
-
4.0.109 Mar 2021Nothing published for this version
-
3.0.204 Oct 2017Nothing published for this version
-
3.0.103 Sep 2017Nothing published for this version
-
2.2.110 Sep 2017Nothing published for this version
-
2.1.130 Aug 2017Nothing published for this version
-
2.0.326 Jun 2017Nothing published for this version
-
2.0.219 May 2016Nothing published for this version
-
2.0.109 May 2016Nothing published for this version
-
1.5.110 Sep 2017Nothing published for this version
-
4.014 Dec 2020Nothing published for this version
-
3.003 Sep 2017Nothing published for this version
-
2.204 Sep 2017Nothing published for this version
-
2.130 Aug 2017Nothing published for this version
-
2.015 Jun 2015Nothing published for this version
-
1.515 Jun 2015Nothing published for this version
-
1.420 Feb 2015Nothing published for this version
-
1.329 Sep 2014Nothing published for this version
-
1.227 Jun 2014Nothing published for this version
-
1.014 Sep 2013Nothing published for this version