Skip to content

Commit

Permalink
Fix PHP 7 compatibility issue. #69
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikkel committed Jul 3, 2024
1 parent 2fed4b8 commit bd90ace
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Retcon Changelog

## 2.8.1 - 2024-07-03
### Fixed
- Fixed a PHP 7 compatibility issue introduced in Retcon 2.8.0, affecting Craft 3 installs using the `retconSrcset` or `retconTransform` filters. [#69](https://github.com/mmikkel/Retcon-Craft/issues/69)

## 2.8.0 - 2024-06-28
### Improved
- Improves support for Imager X named transforms for the `retconSrcset` filter. [#69](https://github.com/mmikkel/Retcon-Craft/issues/69)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mmikkel/retcon",
"description": "Powerful Twig filters for mutating and querying HTML",
"type": "craft-plugin",
"version": "2.8.0",
"version": "2.8.1",
"keywords": [
"craft",
"cms",
Expand Down
6 changes: 2 additions & 4 deletions src/helpers/RetconHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

use aelvan\imager\Imager;

use mmikkel\retcon\models\RetconTransformedImage;

use spacecatninja\imagerx\ImagerX;

use mmikkel\retcon\models\RetconSettings;
use mmikkel\retcon\models\RetconTransformedImage;
use mmikkel\retcon\Retcon;

use Craft;
Expand All @@ -28,7 +27,6 @@
use craft\helpers\StringHelper;
use craft\helpers\Template as TemplateHelper;
use craft\helpers\UrlHelper;

use craft\redactor\FieldData as RedactorFieldData;
use craft\htmlfield\HtmlFieldData;

Expand Down Expand Up @@ -140,7 +138,7 @@ public static function getImageTransform($transform)
* @throws \craft\errors\ImageException
* @throws \spacecatninja\imagerx\exceptions\ImagerException
*/
public static function getTransformedImage(string $src, $transform, ?array $imagerTransformDefaults = null, ?array $imagerConfigOverrides = null): RetconTransformedImage|array|null
public static function getTransformedImage(string $src, $transform, ?array $imagerTransformDefaults = null, ?array $imagerConfigOverrides = null)
{

// TODO: In Retcon 3.0, we should try to get the asset via RetconHelper::getAssetFromRef(), and transform that directly
Expand Down

0 comments on commit bd90ace

Please sign in to comment.