Skip to content

Commit cc67578

Browse files
committed
[LazyImage] Deprecate the package
1 parent c160eae commit cc67578

File tree

14 files changed

+38
-3
lines changed

14 files changed

+38
-3
lines changed

src/LazyImage/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.27.0
4+
5+
- Deprecate the package
6+
37
## 2.17.0
48

59
- Add support for `intervention/image` 3.0+

src/LazyImage/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Symfony UX LazyImage
22

3+
> [!WARNING]
4+
> **Deprecated**: This package has been **deprecated** in 2.x and will be removed in the next major version.
5+
6+
The package has been deprecated in favor of [modern techniques to improve image loading performance](https://web.dev/learn/images/performance-issues) natively supported
7+
by all major browsers (`<img loading="lazy">`).
8+
9+
To keep using BlurHash functionality, you can use the package [kornrunner/php-blurhash](https://github.com/kornrunner/php-blurhash).
10+
11+
---
12+
313
Symfony UX LazyImage is a Symfony bundle providing utilities to improve
414
image loading performance. It is part of [the Symfony UX initiative](https://ux.symfony.com/).
515

src/LazyImage/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@
3131
"php": ">=8.1",
3232
"symfony/config": "^5.4|^6.0|^7.0",
3333
"symfony/http-kernel": "^5.4|^6.0|^7.0",
34-
"symfony/dependency-injection": "^5.4|^6.0|^7.0"
34+
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
35+
"symfony/deprecation-contracts": "^2.5|^3"
3536
},
3637
"require-dev": {
3738
"intervention/image": "^2.5|^3.0",
3839
"kornrunner/blurhash": "^1.1",
3940
"symfony/cache-contracts": "^2.2",
4041
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
41-
"symfony/phpunit-bridge": "^5.2|^6.0|^7.0",
42+
"symfony/phpunit-bridge": "^6.4|^7.0",
4243
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
4344
"symfony/var-dumper": "^5.4|^6.0|^7.0"
4445
},

src/LazyImage/doc/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Symfony UX LazyImage
77
`modern techniques to improve image loading performance`_ natively supported
88
by all major browsers.
99

10+
.. warning::
11+
12+
**Deprecated: This package has been deprecated in 2.x and will be removed in the next major version.**
13+
1014
Symfony UX LazyImage is a Symfony bundle providing utilities to improve
1115
image loading performance. It is part of `the Symfony UX initiative`_.
1216

src/LazyImage/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ini name="intl.error_level" value="0" />
1515
<ini name="memory_limit" value="-1" />
1616
<env name="SHELL_VERBOSITY" value="-1" />
17-
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
17+
<server name="SYMFONY_DEPRECATIONS_HELPER" value="ignoreFile=./tests/baseline-ignore&amp;max[self]=0&amp;max[direct]=0"/>
1818
</php>
1919

2020
<testsuites>

src/LazyImage/src/BlurHash/BlurHash.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
use kornrunner\Blurhash\Blurhash as BlurhashEncoder;
1919
use Symfony\Contracts\Cache\CacheInterface;
2020

21+
trigger_deprecation('symfony/ux-lazy-image', '2.27.0', 'The package is deprecated and will be removed in 3.0.');
22+
2123
/**
2224
* @author Titouan Galopin <[email protected]>
2325
*

src/LazyImage/src/BlurHash/BlurHashInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\UX\LazyImage\BlurHash;
1313

14+
trigger_deprecation('symfony/ux-lazy-image', '2.27.0', 'The package is deprecated and will be removed in 3.0.');
15+
1416
/**
1517
* @author Titouan Galopin <[email protected]>
1618
*/

src/LazyImage/src/DependencyInjection/Configuration.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
1515
use Symfony\Component\Config\Definition\ConfigurationInterface;
1616

17+
trigger_deprecation('symfony/ux-lazy-image', '2.27.0', 'The package is deprecated and will be removed in 3.0.');
18+
1719
/**
1820
* @author Hugo Alliaume <[email protected]>
1921
*

src/LazyImage/src/DependencyInjection/LazyImageExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
use Symfony\UX\LazyImage\Twig\BlurHashExtension;
2626
use Symfony\UX\LazyImage\Twig\BlurHashRuntime;
2727

28+
trigger_deprecation('symfony/ux-lazy-image', '2.27.0', 'The package is deprecated and will be removed in 3.0.');
29+
2830
/**
2931
* @author Titouan Galopin <[email protected]>
3032
*

src/LazyImage/src/LazyImageBundle.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
use Symfony\Component\HttpKernel\Bundle\Bundle;
1515

16+
trigger_deprecation('symfony/ux-lazy-image', '2.27.0', 'The package is deprecated and will be removed in 3.0.');
17+
1618
/**
1719
* @author Titouan Galopin <[email protected]>
1820
*

src/LazyImage/src/Twig/BlurHashExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Twig\Extension\AbstractExtension;
1515
use Twig\TwigFunction;
1616

17+
trigger_deprecation('symfony/ux-lazy-image', '2.27.0', 'The package is deprecated and will be removed in 3.0.');
18+
1719
/**
1820
* @author Titouan Galopin <[email protected]>
1921
*

src/LazyImage/src/Twig/BlurHashRuntime.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Symfony\UX\LazyImage\BlurHash\BlurHashInterface;
1515
use Twig\Extension\RuntimeExtensionInterface;
1616

17+
trigger_deprecation('symfony/ux-lazy-image', '2.27.0', 'The package is deprecated and will be removed in 3.0.');
18+
1719
/**
1820
* @author Hugo Alliaume <[email protected]>
1921
*/

src/LazyImage/tests/baseline-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
%Since symfony/ux-lazy-image 2\.27\.0: The package is deprecated and will be removed in 3\.0\.%

ux.symfony.com/tests/baseline-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
%Since symfony/ux-typed 2\.27\.0: The package is deprecated and will be removed in 3\.0\.%
2+
%Since symfony/ux-lazy-image 2\.27\.0: The package is deprecated and will be removed in 3\.0\.%

0 commit comments

Comments
 (0)