-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to symfony/filesystem 5.4 and migrate webmozart/path-util usage #3957
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if 4.9 should use Symfony 5 components?
The filesystem component is a small component that does not introduce any dependencies (besides polyfills), so it's IMHO the best option. For reference, also see the discussion in contao/image#86 (comment). |
6bfc020
to
0e47851
Compare
I had to remove the |
@@ -81,7 +81,7 @@ | |||
"symfony/dom-crawler": "4.4.*", | |||
"symfony/event-dispatcher": "4.4.*", | |||
"symfony/expression-language": "4.4.*", | |||
"symfony/filesystem": "4.4.*", | |||
"symfony/filesystem": "^5.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"symfony/filesystem": "^5.4", | |
"symfony/filesystem": "4.4.* || 5.4.*", |
I would have just widened this requirement and kept using the webmozart lib, to maximize compatibility with extensions. But I’m fine either way, @contao/developers WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO we must get rid of the abandoned library anyways in the remaining lifetime of 4.9 (and so do all extension developers), so I'd vote for removing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we never got rid of abandoned libraries in any LTS. We still use lexik and other stuff. There's no reason to change this 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optionally allowing version 5.4 in this special case would be OK for me. Then our users could require symfony/filesystem
in version 5 if no other extension explicitly requires version 4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot do this, I'm afraid, since there have been breaking changes between version 4 and 5 of the component.
Filesystem::dumpFile()
andappendToFile()
don't accept arrays anymore.- The minimum PHP version has been raised from PHP 7.1 to PHP 7.2.
- The method arguments now use type hints.
Also, everyone requiring "symfony/filesystem": "4.4*"
would not be able to update their installation anymore.
Is there anything that needs to be adjusted in this PR?
This is correct. But it's the same as anyone requiring dbal in It's not about pushing the boundaries but taking steps where needed. |
Contao 4.9 is already PHP 7.2 Line 18 in 7b8aada
|
Just realized this as well. This change only affects |
Pull request for widening the constraint for I would like to keep this pull request open as we have to merge this anyway as soon as the path-util library is incompatible with a new PHP version or has a security issue. |
This PR requires the
symfony/filesystem
component in version 5.4 and drops the abandoned webmozart/path-util for Contao 4.9.see contao/image#86 (comment)