Download the PHP package zackkitzmiller/tiny without Composer
On this page you can find all versions of the php package zackkitzmiller/tiny. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package tiny
Tiny
Tiny is a small reversible ID obfuscator for PHP. It encodes integers into a custom alphabet and decodes them back again.
What's modernized
- PHP 8.1+ baseline
- PSR-4 autoloading
- PHPUnit 10/11 test suite
- GitHub Actions CI
- Safer alphabet validation and decoding errors
Installation
Usage
Character set rules
Your alphabet must:
- contain at least 2 characters
- only contain unique characters
- stay fixed forever once you start issuing encoded IDs
Tiny throws an exception when the alphabet is invalid or when you try to decode characters that are not in the configured alphabet.
Generate an alphabet
After installing dependencies, generate a fresh 62-character alphabet with:
You can also generate one in code:
The legacy Tiny::generate_set() helper is still available for backwards compatibility.
This release does introduce a package-level modernization break: Composer autoloading now uses PSR-4 for ZackKitzmiller\\ classes, so consumers relying on older PSR-0-era assumptions should verify their integration when upgrading.
The Laravel integration classes continue to autoload from the ZackKitzmiller\\Laravel5\\ namespace under src/ZackKitzmiller/Laravel5/.
Development
Legacy Laravel integration
The repository still includes the original Laravel integration classes for older applications, but the package is now centered on the framework-agnostic core library.
For Laravel integration:
- Laravel 5+:
- register
ZackKitzmiller\Laravel5\TinyServiceProvider - optionally register the
ZackKitzmiller\Facades\Tinyfacade alias - publish the config with
php artisan vendor:publish --tag=tiny-config - set
TINY_KEYin your environment or runphp artisan tiny:generate
- register
- older Laravel integrations:
- register
ZackKitzmiller\TinyServiceProvider - optionally register the
ZackKitzmiller\Facades\Tinyfacade alias - publish the package configuration with the framework command your app version expects
- run
php artisan tiny:generateto persist the generated key
- register