liip / LiipImagineBundle

Symfony Bundle to assist in image manipulation using the imagine library
http://liip.ch
MIT License
1.66k stars 378 forks source link

Fix Symfony 6.1 deprecations #1472

Closed willemverspyck closed 2 years ago

willemverspyck commented 2 years ago
Q A
Branch? 2.x
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
License MIT
Doc

Since Symfony 6.1 setting the $defaultName is deprecated. Prefer to use "AsCommand" attribute, but that not supported yet in PHP ^7.1, so I moved it to the "setName" method.

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-81.5%) to 0.0% when pulling 5c267bb8faaff1db8d2c199775f357194f8bb7e5 on willemverspyck:2.x into f1466f4c5ff561752593d0a71e8e3dd3deabc8dc on liip:2.x.

dbu commented 2 years ago

i merged the 2.x branch into the upcoming 3.x branch. that one has a more restrictive minimal php version requirement - if you have the time it would be great if you can do another PR for the 3.x branch to use the AsCommand attribute.

willemverspyck commented 2 years ago

Thanks @dbu. I can add the attributes to version 3, but I see it still supports PHP 7.4 and attributes only work for PHP 8 and higher. Will support for PHP 7.4 be dropped for version 3?

dbu commented 2 years ago

ah dang. given that symfony 6 only supports php 8, i think the bundle should do the same. can you also do that change in the PR to the 3.x branch?

willemverspyck commented 2 years ago

I did the changes to the 3.x branche and removed support of PHP 7.4. Also removed support of Symfony 4.4, because the attribute "AsCommand" is supported since Symfony 5.3. Not sure if you want these changes for 3.x.