Download the PHP package uniacid/hashid-bundle without Composer
On this page you can find all versions of the php package uniacid/hashid-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uniacid/hashid-bundle
More information about uniacid/hashid-bundle
Files in uniacid/hashid-bundle
Package hashid-bundle
Short Description Modernized Symfony bundle for automatic encoding/decoding of route parameters using Hashids - PHP 8.3 & Symfony 6.4/7.0 ready fork of pgs-soft/hashid-bundle
License MIT
Homepage https://github.com/uniacid/HashId
Informations about the package hashid-bundle
HashId Bundle - Modernized Fork
A modernized fork of PGSSoft/HashId bundle, updated for PHP 8.3 and Symfony 6.4/7.0
Symfony bundle for automatically encoding integer route parameters and decoding request parameters using Hashids
🚀 Version 4.0 Features
- PHP 8.1+ Attributes: Native
#[Hash]attributes replace annotations - Modern PHP Support: PHP 8.1, 8.2, and 8.3 features including readonly properties, typed constants
- Symfony 6.4 LTS & 7.0: Full compatibility with latest Symfony versions
- 75.3% Rector Automation: Automated migration from v3.x using Rector
- PHPStan Level 9: Enhanced type safety and code quality
- Multiple Hasher Support: Configure different hashers with unique settings
Why Use HashId?
Transform predictable integer URL parameters into obfuscated strings automatically:
/order/315→/order/4w9aA11avM/user/1337→/user/X46dBNxd79/hash-id/demo/decode/216/30→/hash-id/demo/decode/X46dBNxd79/ePOwvANg
Benefits
- Security: Prevent resource enumeration attacks
- Transparency: No code changes needed - works with existing
generateUrl()and{{ url() }} - Compatibility: Full Doctrine ParamConverter support
- Flexibility: Configure salt, minimum length, and alphabet
Installation
Requirements
- PHP 8.1 or higher (8.3 recommended)
- Symfony 6.4 LTS or 7.0
- hashids/hashids ^4.0 or ^5.0
Configuration
Usage
Modern Usage with PHP 8.1+ Attributes (Recommended)
Legacy Annotation Support (Deprecated, will be removed in v5.0)
Twig Templates
No changes needed! The bundle works transparently:
Controllers and Services
Migration from v3.x
Automated Migration with Rector (75.3% Automation)
Key Changes in v4.0
- Minimum PHP: 7.2 → 8.1
- Symfony: 4.4/5.x → 6.4/7.0
- Annotations: Deprecated in favor of attributes
- PHPStan: Level 4 → Level 9
- Type Coverage: 65% → 95%
For detailed migration instructions, see UPGRADE-4.0.md.
Advanced Features
Multiple Hasher Configuration
Doctrine ParamConverter Integration
Works seamlessly with Doctrine entities:
Testing
Run the test suite:
Documentation
- Installation Guide
- Configuration Reference
- Migration Guide
- Rector Metrics
- API Documentation
- Security Considerations
- Performance Guide
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/uniacid/HashId.
See CONTRIBUTING.md for development setup and guidelines.
About
Original Work
This bundle is a fork of the excellent HashId Bundle originally created by PGS Software.
This Fork
This modernized fork is maintained by uniacid and focuses on:
- PHP 8.3 compatibility and modern features
- Symfony 6.4 LTS and 7.0 support
- Automated migration tools with Rector
- Enhanced performance and type safety
Version 4.0 Modernization
- Modernization Lead: AI-Assisted Development Team
- Rector Automation: 75.3% automation rate achieved
- Testing: PHPUnit 10 migration with 90%+ coverage
- Documentation: Comprehensive upgrade guides and API documentation
License
This bundle is released under the MIT license. See the LICENSE file for details.
Follow us
All versions of hashid-bundle with dependencies
symfony/dependency-injection Version ^6.4|^7.0
symfony/config Version ^6.4|^7.0
hashids/hashids Version ^4.0|^5.0
symfony/routing Version ^6.4|^7.0