All notable changes to ys-tinify-laravel will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
First modernization since 2018. Will be released as 2.0.0 — see breaking changes below.
- Minimum PHP is now 8.2 (was 5.5).
- Minimum Laravel is now 11 (was 5.2). Laravel 10 is EOL since Feb 2025.
- S3 credentials are now read from
config('tinify.s3.*')instead ofenv()inside the service. The.envkeys (S3_KEY,S3_SECRET,S3_REGION) are unchanged; if you set them in.envit still works. If you wrote your own config override that bound the values differently, update it to the newtinify.s3shape.
- Laravel 11, 12, and 13 support (
illuminate/support: ^11.0|^12.0|^13.0). - PHP 8.2, 8.3, 8.4 support.
config/tinify.phpnow exposes ans3block for the AWS credentials.- PHPUnit test suite (10 tests) covering service registration, missing-apikey failure, and the S3 helpers' missing-credentials paths.
- PHPStan (Larastan) at level 8 in CI.
- GitHub Actions matrix: PHP 8.2/8.3/8.4 × Laravel 11/12/13.
composer checkscript that runs PHPStan and PHPUnit in one shot.
TinifyService::validate()previously caught\Exception, so an invalid API key (or any network/server failure) was reported as valid. It now only treats\Tinify\ClientExceptionas success, matching upstream tinify-php.TinifyService::__construct()threw an opaqueTypeErrorwhenTINIFY_APIKEYwas unset, because of the typed property assignment. It now raises the intendedInvalidArgumentExceptionwith a clear message.- S3 helpers (
fileToS3/bufferToS3/urlToS3) usedenv()inside the service constructor, which returnsnulloncephp artisan config:cachehas run. Values are now resolved viaconfig(), so they survive config caching.
- Service provider modernized —
boot()/register()split, singleton binding,runningInConsole()guard on config publishing. - All source files use
declare(strict_types=1)with property and return types throughout. Tinifyfacade documents all public methods via@methodannotations for IDE autocomplete and static analysis.
- Added a config file (
config/tinify.php) so the API key works underphp artisan config:cache. Fixes #1.
- Direct upload to AWS S3 via
fileToS3,bufferToS3, andurlToS3.
- Initial release as
yasmuru/ys-tinify-laravel. Wraps thetinify/tinifyPHP SDK with a Laravel service provider andTinifyfacade.