contao / image

Contao Image Library
12 stars 5 forks source link

Use symfony/filesystem instead of webmozart/path-util #86

Closed aschempp closed 2 years ago

aschempp commented 2 years ago

Composer told me

Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.

so I checked

composer why webmozart/path-util
contao/image  1.1.1  requires  webmozart/path-util (^2.0)  
ausi commented 2 years ago

Using the Symfony filesystem component would make contao/image incompatible with Contao 4.9 (because it requires Symfony 4.4).

ausi commented 2 years ago

The best solution is probably to update Contao 4.9 to "symfony/filesystem": "4.4.*, 5.4.*". As the filesystem component is pretty stable this should not introduce issues I think.

@contao/developers WDYT?

aschempp commented 2 years ago

Why not allow filesystem 4.4 in this component?

leofeyer commented 2 years ago

Because the path class has only been added in Symfony 5.4: https://symfony.com/blog/new-in-symfony-5-4-filesystem-path-class

aschempp commented 2 years ago

The best solution is probably to update Contao 4.9 to "symfony/filesystem": "4.4.*, 5.4.*". As the filesystem component is pretty stable this should not introduce issues I think.

Ok, but then this wouldn't help since 4.4 is allowed and the method wouldn't be there? The best I can think if would be to release a new minor version with filesystem 5.x requirement, which will not be installed in Contao 4.9 automatically due to dependency conflict. We could still release bugfixes for the current version if necessary for 4.9 then, and 4.9 will not get new features anyway.

ausi commented 2 years ago

The best solution is probably to update Contao 4.9 to "symfony/filesystem": "4.4.*, 5.4.*". As the filesystem component is pretty stable this should not introduce issues I think.

Ok, but then this wouldn't help since 4.4 is allowed and the method wouldn't be there?

Contao 4.9 would then have "symfony/filesystem": "4.4.*, 5.4.*" and contao/image would have "symfony/filesystem": "^5.4, ^6.0".

aschempp commented 2 years ago

🤷 that would work but makes no sense to me, since Contao cannot be used without contao/image it would be a forced requirement anyway.

ausi commented 2 years ago

since Contao cannot be used without contao/image it would be a forced requirement anyway.

Contao can be used with one of the older versions of contao/image that are still compatible with symfony/filesystem 4.4, they will all stay the same as they currently are. I don’t see anything “forced” here...

m-vo commented 2 years ago

And I don't see a problem why the filesystem component could not be required in at least version 5.4 in any supported Contao version. It's a super small component with no other dependencies.

ausi commented 2 years ago

Closed in favor of #89