-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Many dependencies are out of date #8070
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
Comments
We're reviewing our development process now. And I agree that we need a formal procedure for dependency update. |
It's worth adding that the particular issue described above can be fixed by upgrading "require": {
// ...
"zendframework/zend-stdlib": "2.7.7. as 2.4.11"
}, The version alias is necessary because Magento is requiring a different version of that package. I have been using this for a while and noticed no regressions. |
Some of these outdated dependencies are seriously creating dependency hell now and they will continue to do so in the future. For example, because of I am not expecting this to be fixed for 2.1 anymore, but please try and make this a change that makes it into 2.2. |
@TiEul |
@orlangur Correct me if I am wrong, but if you check the composer.json of Magento 2, you can see it's in the |
OMG :) Nice catch, you are right, it is in It was in I'll check for any other dependencies wrongly moved out of |
Hi again, guys! :)
Recently I found out that there is a better way to keep dependencies secure than just try to update all of them as frequently as possible or to monitor security lists. SensioLabsInsight has such control point: "Projects must not depend on dependencies with known security issues". It is not too expensive (probably even some special agreement is possible considering the scale of Magento 2 product). Ideally would be to integrate it for PRs the way similar to |
I like the idea by @orlangur, this would be a start. What would everybody think about this? My suggestion with proceeding here is 1. re-run the outdated check against 2.2 and 2. splitting up this issue into more granular issues. Also we may have to accept (didn't check for this) that M2 could use another library in a current version which depends on outdated libraries. |
Hey @orlangur, Magento 2.2 was just released but it looks like a lot of dependencies were not updated or only updated months ago while newer stable releases already exist. Do you have any clue if any plans were made or discussed some other place to get these updated more frequently? Going back to my example from March, is there a reason why |
HI @maxbucknell Thank you for your report. We have the task in our backlog for components update. it would be really helpful if you can submit a pull request for the components which you would like to update. It would be better to have separate PRs for each component so that we can track and test in individually. Closing this issue. |
Preconditions
For example, today I was trying to compile static assets on an Alpine Linux Docker container. I was unable to, because there is a bug in
zendframework/zend-stdlib
around usage of theGLOB_BRACE
constant, which may or may not be defined depending on the environment, and isn't defined in Alpine Linux.Environment Details
Using an Alpine Linux PHP Docker container, with the required extensions for running Magento:
Steps to Reproduce
Run
bin/magento set:sta:dep
.Expected Result
The command executes successfully.
Actual Result
The following:
Additional
Of course, I have more to say about this. This is obviously not a bug with Magento, it is a bug with the Zend Framework, and admittedly an edge case. I almost didn't raise this, because I can't imagine it rates highly as a priority.
The catch is that this issue was raised with them, and fixed about 8 months ago. The irony here is that the original issue was created by somebody using Magento!
The problem now is that Magento is not requiring a recent enough version of
zendframework/zend-stdlib
to take advantage of this wonderful fix that lets me run Magento on a sub 50MB Docker image. So, I would like to open a wider conversation about how we keep dependencies up to date.Yes we should use the lock file, and yes we should be cautious about unpinned dependencies and Magento is doing everything right so far. But the fact that the version of the Zend Framework currently required by Magento is
2.4.6
tells me that this was set in August 2015, and then not revisited. This is a failing. Perhaps there is a reason for staying on2.4
, and of course updates should be tested rigorously to check for breaking changes, but I don't think anyone knows for sure that the latest version of the Zend Framework causes issues. I don't think anyone has tried.It's not just the Zend Framework, either. We can run the handy Composer command,
composer outdated
. On2.1.3
, I obtain this output:I think this is important. The first rule of staying secure online is "Keep your software updated". Magento implores us to update our version of Magento regularly, and I think it's worth Magento doing the same with its dependencies.
I don't want to just send in a pull request that updates all of these, because that doesn't help anyone. But I do believe there should be some process attached to reviewing this list and updating on a case by case basis.
The text was updated successfully, but these errors were encountered: