diff --git a/CHANGELOG.md b/CHANGELOG.md index 907a280..66a91a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,23 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] +## [2.2.0] - 2022-07-07 + +### Added + +- support for S3-compatible object storage solutions (like [Digital Ocean Spaces](https://www.digitalocean.com/products/spaces)) ([#16](https://github.com/codewithkyle/craft-jitter/issues/16)) +- `craft.jitter.url(asset, params)` method + +### Fixed + +- improved image caching response times ([#15](https://github.com/codewithkyle/craft-jitter/issues/15)) +- `craft.jitter.transformImage()` would cache transformed images using the assets `uid` instead of `id` ([#14](https://github.com/codewithkyle/craft-jitter/issues/14)) + +### Updated + +- composer packages + - Jitter Core v1.1.0 -> v2.0.0 + ## [2.1.0] - 2022-05-31 ### Added @@ -113,7 +130,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - delete local files - delete S3 files -[Unreleased]: https://github.com/codewithkyle/craft-jitter/compare/v2.1.0...HEAD +[Unreleased]: https://github.com/codewithkyle/craft-jitter/compare/v2.2.0...HEAD +[2.2.0]: https://github.com/codewithkyle/craft-jitter/compare/v2.1.0...v2.2.0 [2.1.0]: https://github.com/codewithkyle/craft-jitter/compare/v2.0.0...v2.1.0 [2.0.0]: https://github.com/codewithkyle/craft-jitter/compare/v1.2.6...v2.0.0 [1.2.6]: https://github.com/codewithkyle/craft-jitter/compare/v1.2.5...v1.2.6 diff --git a/README.md b/README.md index 5017561..220ebdb 100644 --- a/README.md +++ b/README.md @@ -25,20 +25,23 @@ To install the plugin, follow these instructions. ## Configuring Jitter -Jitter can be configured by adding a `jitter.php` file to your projects `config/` directory. +Jitter can be configured to use S3-compatible object storage solutions by adding a `jitter.php` file to your projects `config/` directory. ```php getenv("S3_PUBLIC_KEY"), - 'secretAccessKey' => getenv("S3_PRIVATE_KEY"), - 'region' => 'us-east-2', - 'bucket' => 'bucket-name', - 'folder' => 'transformed-images', + "accessKey" => getenv("PUBLIC_KEY"), + "secretAccessKey" => getenv("PRIVATE_KEY"), + "region" => "region-name", + "bucket" => "bucket-name", + "folder" => "transformed-images", + "endpoint" => getenv("ENDPOINT_URL") ]; ``` +> **Note**: the `endpoint` config value is optional. You will only need to use it when using an S3-compatible alternative S3 cloud object storage solution (like Digital Ocean Spaces). + ## Using Jitter Requesting an image transformation through the API: @@ -50,11 +53,12 @@ Requesting an image transformation through the API: Requesting an image transformation via Twig: ```twig -{# This will transform the image on page load #} +{# This will transform the image when the template renders. #} +{# This can cause site-wide performance issues depending on how many times this method is used (per template) and how much RAM is available. #} {% set transformedImageUrl = craft.jitter.transformImage(entry.image[0], { w: 150, ar: "1:1", m: "fit", fm: "gif", q: 10 }) %} {# For a faster template render build the API URL instead #} -{% set transformedImageUrl = "/jitter/v1/transform&id=" ~ entry.image[0].id ~ "&w=150&ar=1:1&m=fit&fm=gif&q=10" %} +{% set transformedImageUrl = craft.jitter.url(entry.image[0], { w: 150, ar: "1:1", m: "fit", fm: "gif", q: 10 }) %} id . "&w=300&ar=1:1"; -$srcset = $jitter->generateSourceSet($image->id, [ +$src = $jitter->generateURL([ + "id" => $image->id, + "w" => 300, + "ar" => "1:1", +]); +$srcset = $jitter->generateSourceSet($image, [ [ "w" => 300, "h" => 250, @@ -94,7 +102,7 @@ Transformation parameters: | Parameter | Default | Description | Valid options | | ------------- | -------------------------- | ------------------------------- | ---------------------------------------------- | | `id` | `null` | the image asset id | `int` | -| `path` | `null` | the image asset id | `int` | +| `path` | `null` | the image file path | `string` | | `w` | base image width | desired image width | `int` | | `h` | base image height | desired image height | `int` | | `ar` | base image aspect ratio | desired aspect ratio | `int`:`int` | diff --git a/composer.json b/composer.json index abf7845..40ab6e0 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "codewithkyle/jitter", "description": "A just in time image transformation service.", "type": "craft-plugin", - "version": "2.1.0", + "version": "2.2.0", "keywords": [ "craft", "cms", @@ -25,7 +25,7 @@ "php": "^8.0", "craftcms/cms": "^4.0", "aws/aws-sdk-php": "^3.0.0", - "codewithkyle/jitter-core": "^1.1.0" + "codewithkyle/jitter-core": "^2.0.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index a605448..b47eb7e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "437f34905dcc881a4566c702827bf957", + "content-hash": "62b6cdd2bbbc9c6c6b963135bd0f8006", "packages": [ { "name": "aws/aws-crt-php", @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.222.17", + "version": "3.231.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "dfcaf44f64be4f844b44515f31d9f6d9293244a4" + "reference": "6222f9e77df8142ec1cbf60337871ef73859bea9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/dfcaf44f64be4f844b44515f31d9f6d9293244a4", - "reference": "dfcaf44f64be4f844b44515f31d9f6d9293244a4", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6222f9e77df8142ec1cbf60337871ef73859bea9", + "reference": "6222f9e77df8142ec1cbf60337871ef73859bea9", "shasum": "" }, "require": { @@ -75,9 +75,9 @@ "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", - "guzzlehttp/guzzle": "^5.3.3 || ^6.2.1 || ^7.0", + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", "guzzlehttp/promises": "^1.4.0", - "guzzlehttp/psr7": "^1.7.0 || ^2.1.1", + "guzzlehttp/psr7": "^1.8.5 || ^2.3", "mtdowling/jmespath.php": "^2.6", "php": ">=5.5" }, @@ -85,6 +85,7 @@ "andrewsville/php-token-reflection": "^1.4", "aws/aws-php-sns-message-validator": "~1.0", "behat/behat": "~3.0", + "composer/composer": "^1.10.22", "doctrine/cache": "~1.4", "ext-dom": "*", "ext-openssl": "*", @@ -143,9 +144,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.222.17" + "source": "https://github.com/aws/aws-sdk-php/tree/3.231.0" }, - "time": "2022-05-20T18:23:52+00:00" + "time": "2022-07-06T18:15:37+00:00" }, { "name": "cebe/markdown", @@ -213,16 +214,16 @@ }, { "name": "codewithkyle/jitter-core", - "version": "1.1.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/codewithkyle/jitter.git", - "reference": "628339ee606b4915911150624c279c71c97e4ad6" + "reference": "5e122c542f994c0bcc885c097d2bec527ca6985d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/codewithkyle/jitter/zipball/628339ee606b4915911150624c279c71c97e4ad6", - "reference": "628339ee606b4915911150624c279c71c97e4ad6", + "url": "https://api.github.com/repos/codewithkyle/jitter/zipball/5e122c542f994c0bcc885c097d2bec527ca6985d", + "reference": "5e122c542f994c0bcc885c097d2bec527ca6985d", "shasum": "" }, "require": { @@ -247,9 +248,9 @@ "description": "An Imgix inspired image transformation library.", "support": { "issues": "https://github.com/codewithkyle/jitter/issues", - "source": "https://github.com/codewithkyle/jitter/tree/v1.0.2" + "source": "https://github.com/codewithkyle/jitter/tree/v2.0.0" }, - "time": "2022-05-21T13:16:57+00:00" + "time": "2022-07-01T18:28:19+00:00" }, { "name": "commerceguys/addressing", @@ -317,16 +318,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.3.1", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b" + "reference": "fd5dd441932a7e10ca6e5b490e272d34c8430640" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/fd5dd441932a7e10ca6e5b490e272d34c8430640", + "reference": "fd5dd441932a7e10ca6e5b490e272d34c8430640", "shasum": "" }, "require": { @@ -373,7 +374,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.1" + "source": "https://github.com/composer/ca-bundle/tree/1.3.2" }, "funding": [ { @@ -389,20 +390,20 @@ "type": "tidelift" } ], - "time": "2021-10-28T20:44:15+00:00" + "time": "2022-05-24T11:56:16+00:00" }, { "name": "composer/composer", - "version": "2.2.12", + "version": "2.2.15", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "ba61e768b410736efe61df01b61f1ec44f51474f" + "reference": "509dcbd4f8d459e0ef2ef223a231b8c31bceed78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/ba61e768b410736efe61df01b61f1ec44f51474f", - "reference": "ba61e768b410736efe61df01b61f1ec44f51474f", + "url": "https://api.github.com/repos/composer/composer/zipball/509dcbd4f8d459e0ef2ef223a231b8c31bceed78", + "reference": "509dcbd4f8d459e0ef2ef223a231b8c31bceed78", "shasum": "" }, "require": { @@ -472,7 +473,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.2.12" + "source": "https://github.com/composer/composer/tree/2.2.15" }, "funding": [ { @@ -488,7 +489,7 @@ "type": "tidelift" } ], - "time": "2022-04-13T14:42:25+00:00" + "time": "2022-07-01T10:01:26+00:00" }, { "name": "composer/metadata-minifier", @@ -713,16 +714,16 @@ }, { "name": "composer/spdx-licenses", - "version": "1.5.6", + "version": "1.5.7", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "a30d487169d799745ca7280bc90fdfa693536901" + "reference": "c848241796da2abf65837d51dce1fae55a960149" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/a30d487169d799745ca7280bc90fdfa693536901", - "reference": "a30d487169d799745ca7280bc90fdfa693536901", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149", + "reference": "c848241796da2abf65837d51dce1fae55a960149", "shasum": "" }, "require": { @@ -773,7 +774,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.6" + "source": "https://github.com/composer/spdx-licenses/tree/1.5.7" }, "funding": [ { @@ -789,7 +790,7 @@ "type": "tidelift" } ], - "time": "2021-11-18T10:14:14+00:00" + "time": "2022-05-23T07:37:50+00:00" }, { "name": "composer/xdebug-handler", @@ -859,21 +860,21 @@ }, { "name": "craftcms/cms", - "version": "4.0.3", + "version": "4.1.2", "source": { "type": "git", "url": "https://github.com/craftcms/cms.git", - "reference": "0fb3cc89e69c1e7c78ba6710eef46ad241f8b4c7" + "reference": "06fbdc0ec322b77ca346c8c1bdce4cde9d8669f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/craftcms/cms/zipball/0fb3cc89e69c1e7c78ba6710eef46ad241f8b4c7", - "reference": "0fb3cc89e69c1e7c78ba6710eef46ad241f8b4c7", + "url": "https://api.github.com/repos/craftcms/cms/zipball/06fbdc0ec322b77ca346c8c1bdce4cde9d8669f9", + "reference": "06fbdc0ec322b77ca346c8c1bdce4cde9d8669f9", "shasum": "" }, "require": { "commerceguys/addressing": "^1.2", - "composer/composer": "2.2.12", + "composer/composer": "2.2.15", "craftcms/oauth2-craftid": "~1.0.0", "craftcms/plugin-installer": "~1.5.6", "craftcms/server-check": "~2.1.2", @@ -973,7 +974,7 @@ "rss": "https://github.com/craftcms/cms/releases.atom", "source": "https://github.com/craftcms/cms" }, - "time": "2022-05-20T16:51:02+00:00" + "time": "2022-07-06T20:21:36+00:00" }, { "name": "craftcms/oauth2-craftid", @@ -1382,16 +1383,16 @@ }, { "name": "egulias/email-validator", - "version": "3.1.2", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ee0db30118f661fb166bcffbf5d82032df484697" + "reference": "f88dcf4b14af14a98ad96b14b2b317969eab6715" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697", - "reference": "ee0db30118f661fb166bcffbf5d82032df484697", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/f88dcf4b14af14a98ad96b14b2b317969eab6715", + "reference": "f88dcf4b14af14a98ad96b14b2b317969eab6715", "shasum": "" }, "require": { @@ -1438,7 +1439,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.1.2" + "source": "https://github.com/egulias/EmailValidator/tree/3.2.1" }, "funding": [ { @@ -1446,7 +1447,7 @@ "type": "github" } ], - "time": "2021-10-11T09:18:27+00:00" + "time": "2022-06-18T20:57:19+00:00" }, { "name": "elvanto/litemoji", @@ -1588,22 +1589,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.2", + "version": "7.4.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" + "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", + "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1692,7 +1693,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + "source": "https://github.com/guzzle/guzzle/tree/7.4.5" }, "funding": [ { @@ -1708,7 +1709,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T14:16:28+00:00" + "time": "2022-06-20T22:16:13+00:00" }, { "name": "guzzlehttp/promises", @@ -1796,16 +1797,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "13388f00956b1503577598873fffb5ae994b5737" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737", + "reference": "13388f00956b1503577598873fffb5ae994b5737", "shasum": "" }, "require": { @@ -1829,7 +1830,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -1891,7 +1892,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.0" }, "funding": [ { @@ -1907,20 +1908,20 @@ "type": "tidelift" } ], - "time": "2022-03-20T21:55:58+00:00" + "time": "2022-06-20T21:43:11+00:00" }, { "name": "illuminate/collections", - "version": "v9.13.0", + "version": "v9.19.0", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "7d7617afdca6f15c881856c679da4e76820e7674" + "reference": "253cfce2bf469c340d2268bfbc31d4ad446a1fa7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/7d7617afdca6f15c881856c679da4e76820e7674", - "reference": "7d7617afdca6f15c881856c679da4e76820e7674", + "url": "https://api.github.com/repos/illuminate/collections/zipball/253cfce2bf469c340d2268bfbc31d4ad446a1fa7", + "reference": "253cfce2bf469c340d2268bfbc31d4ad446a1fa7", "shasum": "" }, "require": { @@ -1962,20 +1963,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-05-16T15:20:45+00:00" + "time": "2022-06-28T14:33:19+00:00" }, { "name": "illuminate/conditionable", - "version": "v9.13.0", + "version": "v9.19.0", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", - "reference": "56b4ba1166c264064bf63896f498a2bee320d16a" + "reference": "46b7beed47948bd2e67f523d0a76daa62775031e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/conditionable/zipball/56b4ba1166c264064bf63896f498a2bee320d16a", - "reference": "56b4ba1166c264064bf63896f498a2bee320d16a", + "url": "https://api.github.com/repos/illuminate/conditionable/zipball/46b7beed47948bd2e67f523d0a76daa62775031e", + "reference": "46b7beed47948bd2e67f523d0a76daa62775031e", "shasum": "" }, "require": { @@ -2008,20 +2009,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-02-28T16:37:46+00:00" + "time": "2022-05-31T14:47:50+00:00" }, { "name": "illuminate/contracts", - "version": "v9.13.0", + "version": "v9.19.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "e354ef98f3c59e5c8b5ba87299999220270f3da5" + "reference": "e014cf88ef46065b8b1f078893c01189b95ffb11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/e354ef98f3c59e5c8b5ba87299999220270f3da5", - "reference": "e354ef98f3c59e5c8b5ba87299999220270f3da5", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/e014cf88ef46065b8b1f078893c01189b95ffb11", + "reference": "e014cf88ef46065b8b1f078893c01189b95ffb11", "shasum": "" }, "require": { @@ -2056,11 +2057,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-04-28T13:05:07+00:00" + "time": "2022-06-07T19:28:00+00:00" }, { "name": "illuminate/macroable", - "version": "v9.13.0", + "version": "v9.19.0", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", @@ -2380,16 +2381,16 @@ }, { "name": "monolog/monolog", - "version": "2.6.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0" + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/247918972acd74356b0a91dfaa5adcaec069b6c0", - "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", "shasum": "" }, "require": { @@ -2468,7 +2469,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.6.0" + "source": "https://github.com/Seldaek/monolog/tree/2.7.0" }, "funding": [ { @@ -2480,7 +2481,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T09:36:00+00:00" + "time": "2022-06-09T08:59:12+00:00" }, { "name": "mtdowling/jmespath.php", @@ -3529,16 +3530,16 @@ }, { "name": "symfony/console", - "version": "v5.4.8", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b" + "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b", - "reference": "ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b", + "url": "https://api.github.com/repos/symfony/console/zipball/4d671ab4ddac94ee439ea73649c69d9d200b5000", + "reference": "4d671ab4ddac94ee439ea73649c69d9d200b5000", "shasum": "" }, "require": { @@ -3608,7 +3609,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.8" + "source": "https://github.com/symfony/console/tree/v5.4.10" }, "funding": [ { @@ -3624,29 +3625,29 @@ "type": "tidelift" } ], - "time": "2022-04-12T16:02:29+00:00" + "time": "2022-06-26T13:00:04+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.1", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -3675,7 +3676,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.1" }, "funding": [ { @@ -3691,24 +3692,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-02-25T11:15:52+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.0.3", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934" + "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6472ea2dd415e925b90ca82be64b8bc6157f3934", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a0449a7ad7daa0f7c0acd508259f80544ab5a347", + "reference": "a0449a7ad7daa0f7c0acd508259f80544ab5a347", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { @@ -3758,7 +3759,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.1.0" }, "funding": [ { @@ -3774,24 +3775,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-05-05T16:51:07+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.1", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" + "reference": "02ff5eea2f453731cfbc6bc215e456b781480448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/02ff5eea2f453731cfbc6bc215e456b781480448", + "reference": "02ff5eea2f453731cfbc6bc215e456b781480448", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, "suggest": { @@ -3800,7 +3801,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -3837,7 +3838,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1" }, "funding": [ { @@ -3853,24 +3854,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-02-25T11:15:52+00:00" }, { "name": "symfony/filesystem", - "version": "v6.0.7", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "6c9e4c41f2c51dfde3db298594ed9cba55dbf5ff" + "reference": "3132d2f43ca799c2aa099f9738d98228c56baa5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/6c9e4c41f2c51dfde3db298594ed9cba55dbf5ff", - "reference": "6c9e4c41f2c51dfde3db298594ed9cba55dbf5ff", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3132d2f43ca799c2aa099f9738d98228c56baa5d", + "reference": "3132d2f43ca799c2aa099f9738d98228c56baa5d", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -3900,7 +3901,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.7" + "source": "https://github.com/symfony/filesystem/tree/v6.1.0" }, "funding": [ { @@ -3916,24 +3917,27 @@ "type": "tidelift" } ], - "time": "2022-04-01T12:54:51+00:00" + "time": "2022-05-21T13:34:40+00:00" }, { "name": "symfony/finder", - "version": "v6.0.8", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "af7edab28d17caecd1f40a9219fc646ae751c21f" + "reference": "45b8beb69d6eb3b05a65689ebfd4222326773f8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/af7edab28d17caecd1f40a9219fc646ae751c21f", - "reference": "af7edab28d17caecd1f40a9219fc646ae751c21f", + "url": "https://api.github.com/repos/symfony/finder/zipball/45b8beb69d6eb3b05a65689ebfd4222326773f8f", + "reference": "45b8beb69d6eb3b05a65689ebfd4222326773f8f", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" }, "type": "library", "autoload": { @@ -3961,7 +3965,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.0.8" + "source": "https://github.com/symfony/finder/tree/v6.1.0" }, "funding": [ { @@ -3977,24 +3981,24 @@ "type": "tidelift" } ], - "time": "2022-04-15T08:07:58+00:00" + "time": "2022-04-15T08:08:08+00:00" }, { "name": "symfony/http-client", - "version": "v6.0.8", + "version": "v6.1.2", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "d347895193283e08b4c3ebf2f2974a1df3e1f670" + "reference": "ea1af6c8cc479147d67a3fead457dd7b06261041" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/d347895193283e08b4c3ebf2f2974a1df3e1f670", - "reference": "d347895193283e08b4c3ebf2f2974a1df3e1f670", + "url": "https://api.github.com/repos/symfony/http-client/zipball/ea1af6c8cc479147d67a3fead457dd7b06261041", + "reference": "ea1af6c8cc479147d67a3fead457dd7b06261041", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/log": "^1|^2|^3", "symfony/http-client-contracts": "^3", "symfony/service-contracts": "^1.0|^2|^3" @@ -4045,7 +4049,7 @@ "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-client/tree/v6.0.8" + "source": "https://github.com/symfony/http-client/tree/v6.1.2" }, "funding": [ { @@ -4061,24 +4065,24 @@ "type": "tidelift" } ], - "time": "2022-04-12T16:11:42+00:00" + "time": "2022-06-19T13:02:30+00:00" }, { "name": "symfony/http-client-contracts", - "version": "v3.0.1", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "f7525778c712be78ad5b6ca31f47fdcfd404c280" + "reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/f7525778c712be78ad5b6ca31f47fdcfd404c280", - "reference": "f7525778c712be78ad5b6ca31f47fdcfd404c280", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/fd038f08c623ab5d22b26e9ba35afe8c79071800", + "reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "suggest": { "symfony/http-client-implementation": "" @@ -4086,7 +4090,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -4096,7 +4100,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\HttpClient\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4123,7 +4130,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.1.1" }, "funding": [ { @@ -4139,25 +4146,25 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:10:05+00:00" + "time": "2022-04-22T07:30:54+00:00" }, { "name": "symfony/mailer", - "version": "v6.0.8", + "version": "v6.1.2", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "706af6b3e99ebcbc639c9c664f5579aaa869409b" + "reference": "8fa150355115ea09238858ae3cfaf249fd1fd5ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/706af6b3e99ebcbc639c9c664f5579aaa869409b", - "reference": "706af6b3e99ebcbc639c9c664f5579aaa869409b", + "url": "https://api.github.com/repos/symfony/mailer/zipball/8fa150355115ea09238858ae3cfaf249fd1fd5ed", + "reference": "8fa150355115ea09238858ae3cfaf249fd1fd5ed", "shasum": "" }, "require": { "egulias/email-validator": "^2.1.10|^3", - "php": ">=8.0.2", + "php": ">=8.1", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", "symfony/event-dispatcher": "^5.4|^6.0", @@ -4197,7 +4204,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.0.8" + "source": "https://github.com/symfony/mailer/tree/v6.1.2" }, "funding": [ { @@ -4213,24 +4220,24 @@ "type": "tidelift" } ], - "time": "2022-04-27T17:10:30+00:00" + "time": "2022-06-19T13:21:48+00:00" }, { "name": "symfony/mime", - "version": "v6.0.8", + "version": "v6.1.1", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "c1701e88ad0ca49fc6ad6cdf360bc0e1209fb5e1" + "reference": "56508865dd883dce3c863af11b3e8053adab30d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/c1701e88ad0ca49fc6ad6cdf360bc0e1209fb5e1", - "reference": "c1701e88ad0ca49fc6ad6cdf360bc0e1209fb5e1", + "url": "https://api.github.com/repos/symfony/mime/zipball/56508865dd883dce3c863af11b3e8053adab30d7", + "reference": "56508865dd883dce3c863af11b3e8053adab30d7", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -4278,7 +4285,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.0.8" + "source": "https://github.com/symfony/mime/tree/v6.1.1" }, "funding": [ { @@ -4294,20 +4301,20 @@ "type": "tidelift" } ], - "time": "2022-04-12T16:11:42+00:00" + "time": "2022-06-09T12:51:38+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { @@ -4322,7 +4329,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4360,7 +4367,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -4376,20 +4383,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40" + "reference": "143f1881e655bebca1312722af8068de235ae5dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f1aed619e28cb077fc83fac8c4c0383578356e40", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/143f1881e655bebca1312722af8068de235ae5dc", + "reference": "143f1881e655bebca1312722af8068de235ae5dc", "shasum": "" }, "require": { @@ -4404,7 +4411,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4443,7 +4450,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.26.0" }, "funding": [ { @@ -4459,20 +4466,20 @@ "type": "tidelift" } ], - "time": "2022-01-04T09:04:05+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "433d05519ce6990bf3530fba6957499d327395c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", "shasum": "" }, "require": { @@ -4484,7 +4491,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4524,7 +4531,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" }, "funding": [ { @@ -4540,20 +4547,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { @@ -4567,7 +4574,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4611,7 +4618,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" }, "funding": [ { @@ -4627,20 +4634,20 @@ "type": "tidelift" } ], - "time": "2021-09-14T14:02:44+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -4652,7 +4659,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4695,7 +4702,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -4711,20 +4718,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -4739,7 +4746,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4778,7 +4785,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -4794,20 +4801,20 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", "shasum": "" }, "require": { @@ -4816,7 +4823,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4854,7 +4861,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" }, "funding": [ { @@ -4870,20 +4877,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:17:38+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", "shasum": "" }, "require": { @@ -4892,7 +4899,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4933,7 +4940,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" }, "funding": [ { @@ -4949,20 +4956,20 @@ "type": "tidelift" } ], - "time": "2021-06-05T21:20:04+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -4971,7 +4978,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5016,7 +5023,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -5032,7 +5039,7 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { "name": "symfony/process", @@ -5098,20 +5105,20 @@ }, { "name": "symfony/service-contracts", - "version": "v3.0.1", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c" + "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e517458f278c2131ca9f262f8fbaf01410f2c65c", - "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/925e713fe8fcacf6bc05e936edd8dd5441a21239", + "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/container": "^2.0" }, "conflict": { @@ -5123,7 +5130,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -5133,7 +5140,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5160,7 +5170,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.1.1" }, "funding": [ { @@ -5176,24 +5186,24 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:10:05+00:00" + "time": "2022-05-30T19:18:58+00:00" }, { "name": "symfony/string", - "version": "v6.0.8", + "version": "v6.1.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d" + "reference": "1903f2879875280c5af944625e8246d81c2f0604" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", - "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", + "url": "https://api.github.com/repos/symfony/string/zipball/1903f2879875280c5af944625e8246d81c2f0604", + "reference": "1903f2879875280c5af944625e8246d81c2f0604", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -5245,7 +5255,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.8" + "source": "https://github.com/symfony/string/tree/v6.1.2" }, "funding": [ { @@ -5261,24 +5271,24 @@ "type": "tidelift" } ], - "time": "2022-04-22T08:18:02+00:00" + "time": "2022-06-26T16:35:04+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.0.8", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "fa61dfb4bd3068df2492013dc65f3190e9f550c0" + "reference": "98587d939cb783aa04e828e8fa857edaca24c212" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/fa61dfb4bd3068df2492013dc65f3190e9f550c0", - "reference": "fa61dfb4bd3068df2492013dc65f3190e9f550c0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/98587d939cb783aa04e828e8fa857edaca24c212", + "reference": "98587d939cb783aa04e828e8fa857edaca24c212", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -5333,7 +5343,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.0.8" + "source": "https://github.com/symfony/var-dumper/tree/v6.1.0" }, "funding": [ { @@ -5349,20 +5359,20 @@ "type": "tidelift" } ], - "time": "2022-04-26T13:22:23+00:00" + "time": "2022-05-21T13:34:40+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.3", + "version": "v5.4.10", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2" + "reference": "04e42926429d9e8b39c174387ab990bf7817f7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e80f87d2c9495966768310fc531b487ce64237a2", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2", + "url": "https://api.github.com/repos/symfony/yaml/zipball/04e42926429d9e8b39c174387ab990bf7817f7a2", + "reference": "04e42926429d9e8b39c174387ab990bf7817f7a2", "shasum": "" }, "require": { @@ -5408,7 +5418,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.3" + "source": "https://github.com/symfony/yaml/tree/v5.4.10" }, "funding": [ { @@ -5424,7 +5434,7 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:32:32+00:00" + "time": "2022-06-20T11:50:59+00:00" }, { "name": "theiconic/name-parser", @@ -5685,16 +5695,16 @@ }, { "name": "voku/arrayy", - "version": "7.9.1", + "version": "7.9.3", "source": { "type": "git", "url": "https://github.com/voku/Arrayy.git", - "reference": "11509d59745af6b2c23a781938491f9981241c1d" + "reference": "41318bd1483a10f133c8214479b3580a3e936a86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/Arrayy/zipball/11509d59745af6b2c23a781938491f9981241c1d", - "reference": "11509d59745af6b2c23a781938491f9981241c1d", + "url": "https://api.github.com/repos/voku/Arrayy/zipball/41318bd1483a10f133c8214479b3580a3e936a86", + "reference": "41318bd1483a10f133c8214479b3580a3e936a86", "shasum": "" }, "require": { @@ -5764,7 +5774,7 @@ "type": "tidelift" } ], - "time": "2022-03-08T19:16:33+00:00" + "time": "2022-07-06T00:50:30+00:00" }, { "name": "voku/email-check", @@ -6241,21 +6251,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -6293,9 +6303,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" }, { "name": "webonyx/graphql-php", diff --git a/src/Jitter.php b/src/Jitter.php index a86a632..aea5729 100644 --- a/src/Jitter.php +++ b/src/Jitter.php @@ -1,11 +1,11 @@ getRequest(); $params = $request->getQueryParams(); - $clientAcceptsWebp = $request->accepts('image/webp'); try { - $file = Jitter::getInstance()->transform->transformImage($params, $clientAcceptsWebp); + $file = Jitter::getInstance()->transform->transformImage($params); $response = Craft::$app->getResponse(); $response->format = Response::FORMAT_RAW; if (isset($file["ContentType"])) diff --git a/src/exceptions/JitterException.php b/src/exceptions/JitterException.php index f517beb..c768e10 100644 --- a/src/exceptions/JitterException.php +++ b/src/exceptions/JitterException.php @@ -1,11 +1,11 @@ getSettings(); if (!empty($settings)) @@ -61,51 +61,36 @@ public function clearS3BucketCache() public function generateURL(array $params): string { $ret = "/jitter/v1/transform?"; - $asset = Asset::find()->id($params["id"])->one(); - if (empty($asset)) + foreach ($params as $key => $value) { - Craft::error("Failed to find asset with an id of " . $id, __METHOD__); + $ret .= $key . "=" . $value . "&"; } - else - { - $masterImage = $asset->getCopyOfFile(); - } - if ($masterImage) - { - $isFrist = true; - foreach ($params as $key => $value) - { - if ($isFrist) - { - $ret .= $key . "=" . $value; - } - else - { - $ret .= "&" . $key . "=" . $value; - } - $isFrist = false; - } - \unlink($masterImage); - } - return $ret; + return rtrim($ret, "&"); } - public function generateSourceSet(string $id, array $images): string + public function generateSourceSet(string|int|Asset $assetOrId, array $images): string { - $masterImage = null; $ret = ""; - $baseUrl = "/jitter/v1/transform?id=" . $id; + $id = $assetOrId; + $asset = null; - $asset = Asset::find()->id($id)->one(); - if (empty($asset)) + if ($assetOrId instanceof Asset) { - Craft::error("Failed to find asset with an id of " . $id, __METHOD__); + $asset = $assetOrId; + $id = $assetOrId->id; } else { - $masterImage = $asset->getCopyOfFile(); + $asset = Asset::find()->id($id)->one(); + if (empty($asset)) + { + Craft::error("Failed to find asset with an id of " . $id, __METHOD__); + } } - if ($masterImage) + + $baseUrl = "/jitter/v1/transform?id=" . $id; + + if (!empty($asset)) { $count = 0; $maxCount = count($images); @@ -126,15 +111,15 @@ public function generateSourceSet(string $id, array $images): string if (isset($image['h'])) { $aspectRatioValues = [$asset->width, $asset->height]; - if (isset($params['ar'])) + if (isset($image['ar'])) { - $values = explode(':', $params['ar']); + $values = explode(':', $image['ar']); if (count($values) == 2) { $aspectRatioValues = [intval($values[0]), intval($values[1])]; } } - $height = intval($params['h']); + $height = intval($image['h']); $width = ($aspectRatioValues[0] / $aspectRatioValues[1]) * $height; $ret .= " " . $width . "w"; } @@ -148,18 +133,33 @@ public function generateSourceSet(string $id, array $images): string $ret .= ", "; } } - \unlink($masterImage); } return $ret; } - public function transformImage(array $params, bool $clientAcceptsWebp) + public function transformImage(array $params, Asset $asset = null): array { - $masterImage = null; - $asset = null; + $transform = JitterCore::BuildTransform($params); + $key = $this->createKey($params, $asset); $settings = $this->getSettings(); - $needsCleanup = false; - if (isset($params['id'])) + + // Caching logic + $cachedResponse = $this->checkCache($settings, $key); + if (!empty($cachedResponse)) + { + return $cachedResponse; + } + + // Transform logic + $masterImage = null; + $needsCleanup = false; + + if (!is_null($asset)) + { + $masterImage = $asset->getCopyOfFile(); + $needsCleanup = true; + } + else if (isset($params["id"])) { $asset = Asset::find()->id($params['id'])->one(); if (empty($asset)) @@ -177,28 +177,12 @@ public function transformImage(array $params, bool $clientAcceptsWebp) $masterImage = FileHelper::normalizePath(Yii::getAlias("@webroot") . "/" . ltrim($params['path'], "/")); if (!\file_exists($masterImage)) { - $this->fail(404, "Invalid image location: " . $masterImage); + $this->fail(404, "Invalid image path."); } } else { - $this->fail(400, "'id' or 'path' required"); - } - - preg_match("/(\..{1,4})$/", $masterImage, $matches); - $fallbackFormat = strtolower(ltrim($matches[0], ".")); - - $img = new Imagick($masterImage); - $width = $img->getImageWidth(); - $height = $img->getImageHeight(); - - $transform = JitterCore::BuildTransform($params, $width, $height, $fallbackFormat); - $key = $this->buildTransformUid($transform, $asset->uid ?? $masterImage); - - $cachedResponse = $this->checkCache($settings, $key); - if (!empty($cachedResponse)) - { - return $cachedResponse; + $this->fail(400, "'id' or 'path' required."); } $uid = StringHelper::UUID(); @@ -229,10 +213,9 @@ public function transformImage(array $params, bool $clientAcceptsWebp) return $file; } - private function buildTransformUid(array $transform, string $uniqueValue): string + private function buildTransformUid(string $uniqueValue, array $transform): string { - $key = $uniqueValue . json_encode($transform); - return \md5($key); + return \md5($uniqueValue) . "-" . \md5(json_encode($transform)); } private function fail(int $statusCode, string $error): void @@ -249,19 +232,24 @@ private function getTempPath(): string return $path; } - private function connectToS3(array $settings) + private function connectToS3(array $settings): S3Client { - return S3Client::factory([ + $conn = [ 'credentials' => [ 'key' => $settings['accessKey'], 'secret' => $settings['secretAccessKey'], ], 'region' => $settings['region'], 'version' => 'latest' - ]); + ]; + if (isset($settings["endpoint"])) + { + $conn["endpoint"] = $settings["endpoint"]; + } + return S3Client::factory($conn); } - private function getSettings() + private function getSettings(): ?array { $settings = null; $settingsPath = FileHelper::normalizePath(Craft::$app->path->configPath . '/jitter.php'); @@ -343,4 +331,22 @@ private function cacheImage($settings, $key, $image): void copy($image, FileHelper::normalizePath($this->getPublicPath() . "/" . $key)); } } + + private function createKey(array $params, Asset $asset): string + { + $assetIndent = null; + if (!is_null($asset)) + { + $assetIndent = $asset->id; + } + else if (isset($params["id"])) + { + $assetIndent = $params["id"]; + } + else if (isset($params["path"])) + { + $assetIndent = $params["path"]; + } + return $this->buildTransformUid($assetIndent, $params); + } } diff --git a/src/translations/en/jitter.php b/src/translations/en/jitter.php index 10d1f4f..1891952 100644 --- a/src/translations/en/jitter.php +++ b/src/translations/en/jitter.php @@ -1,21 +1,16 @@ getRequest(); - $clientAcceptsWebp = $request->accepts('image/webp'); - $params = json_decode(json_encode($params), true); + $params = json_decode(json_encode($params), true); // Convert objects to array $params['id'] = $file->id; - $file = Jitter::getInstance()->transform->transformImage($params, $clientAcceptsWebp); + $file = Jitter::getInstance()->transform->transformImage($params, $file); $url = Jitter::getInstance()->transform->generateURL($params); } catch (JitterException $e) @@ -53,9 +46,16 @@ public function transformImage(Asset $file, $params): string return $url; } + public function url(Asset $file, array $params): string + { + $params = json_decode(json_encode($params), true); // Convert objects to array + $params["id"] = $file->id; + return Jitter::getInstance()->transform->generateURL($params); + } + public function srcset(Asset $file, array $params): string { - $images = json_decode(json_encode($params), true); - return Jitter::getInstance()->transform->generateSourceSet($file->id, $images); + $params = json_decode(json_encode($params), true); // Converts array of objects to array of arrays + return Jitter::getInstance()->transform->generateSourceSet($file, $params); } }