Skip to content

Commit 5aadcac

Browse files
NovaeZFastlyImageOptimizer Migration ibexa 4
1 parent 524079e commit 5aadcac

File tree

4 files changed

+13
-28
lines changed

4 files changed

+13
-28
lines changed

components/FastlyImageOptimizerBundle/bundle/NovaeZFastlyImageOptimizerBundle.php

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace Novactive\Bundle\eZFastlyImageOptimizerBundle;
1414

1515
use LogicException;
16+
use Novactive\Bundle\eZFastlyImageOptimizerBundle\DependencyInjection\NovaeZFastlyImageOptimizerExtension;
1617
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
1718
use Symfony\Component\HttpKernel\Bundle\Bundle;
1819

@@ -21,25 +22,15 @@ class NovaeZFastlyImageOptimizerBundle extends Bundle
2122
public function getContainerExtension(): ?ExtensionInterface
2223
{
2324
if (null === $this->extension) {
24-
$extension = $this->createContainerExtension();
25-
26-
if (null !== $extension) {
25+
$extension = new NovaeZFastlyImageOptimizerExtension();
2726
if (!$extension instanceof ExtensionInterface) {
28-
throw new LogicException(
29-
sprintf(
30-
'Extension %s must implement '.ExtensionInterface::class,
31-
\get_class($extension)
32-
)
33-
);
27+
$fqdn = \get_class($extension);
28+
$message = 'Extension %s must implement %s.';
29+
throw new LogicException(sprintf($message, $fqdn, ExtensionInterface::class));
3430
}
3531
$this->extension = $extension;
36-
} else {
37-
$this->extension = false;
3832
}
39-
}
4033

41-
if ($this->extension) {
42-
return $this->extension;
43-
}
34+
return $this->extension;
4435
}
4536
}

components/FastlyImageOptimizerBundle/bundle/Resources/config/services.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ services:
77
Novactive\Bundle\eZFastlyImageOptimizerBundle\Twig\Extension: ~
88
Novactive\Bundle\eZFastlyImageOptimizerBundle\Core\AliasGenerator:
99
arguments:
10-
- "@ezpublish.fieldType.ezimage.variation_service"
11-
- "@ezpublish.config.resolver"
10+
- "@ibexa.field_type.ezimage.variation_service"
11+
- "@ibexa.config.resolver"
1212
- "@logger"

components/FastlyImageOptimizerBundle/bundle/Resources/views/content_fields.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#}
88
{% block ezimage_field %}
99
{% apply spaceless %}
10-
{% if not ez_field_is_empty( content, field ) %}
10+
{% if not ibexa_field_is_empty( content, field ) %}
1111
<figure {{ block( 'field_attributes' ) }}>
1212
{% set imageAlias = nova_ezfastlyio_alias( field, versionInfo, parameters.alias|default( 'original' ) ) %}
1313
{% set src = imageAlias ? asset( imageAlias.uri ) : "//:0" %}
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "novactive/ezfastlyiobundle",
3-
"description": "Novactive eZ Fastly Image Optimizer Bundle is an eZPlatform bundle for Images optimizations and manipulations.",
4-
"keywords": ["images", "ezpublish", "novactive", "ezplatform"],
3+
"description": "Novactive eZ Fastly Image Optimizer Bundle is an Ibexa bundle for Images optimizations and manipulations.",
4+
"keywords": ["images", "ibexa", "novactive"],
55
"homepage": "https://github.com/Novactive/NovaeZFastlyImageOptimizerBundle",
6-
"type": "ezplatform-bundle",
6+
"type": "ibexa-bundle",
77
"authors": [
88
{
99
"name": "Novactive",
@@ -15,17 +15,11 @@
1515
"MIT"
1616
],
1717
"require": {
18-
"php": "^7.3"
18+
"php": "^7.3 || ^8.0"
1919
},
2020
"autoload": {
2121
"psr-4": {
2222
"Novactive\\Bundle\\eZFastlyImageOptimizerBundle\\": "bundle"
2323
}
24-
},
25-
"extra": {
26-
"thanks": {
27-
"name": "ezsystems/ezplatform",
28-
"url": "https://github.com/ezsystems/ezplatform"
29-
}
3024
}
3125
}

0 commit comments

Comments
 (0)