Skip to content

Remove unused Zend libraries #374

Closed
Closed
@colinmollenhour

Description

@colinmollenhour

As ZF1 is basically a dead project and there is a lot of code in lib/Zend that is not used by Magento and highly unlikely to ever be used by anyone using Magento, and that the code is easily available to those that want it I propose we remove Zend libraries that are not used by Magento core code from the repository. The presence of this code encourages it's use and to some may imply that it is supported code. Since it is neither supported nor it's use encouraged I think it does much more harm than good. Lastly, it is just a bunch of cruft that slows down IDEs, CI, code searching, etc. For example, everything under Zend_Service. These are extremely buggy even when they were supported and largely obsolete.

I propose that each subdirectory directly under lib/Zend be checked to see if it is used in app/code or lib/Varien and if not it should be considered for removal (only not removed if there is a really good reason) and then of course all Magento functionality tested. In addition it would make sense to also remove some subdirectories of libraries that are in use, such as unused adapters in Zend/Db/Adapter.

Reducing the Zend code down to only what is actually used would make it much easier to audit security and search for bugs and such. As of now there is so much code in lib/Zend that really thoroughly inspecting it is impractical.

This does have a potential to break third-party extensions that are dependent on libs that get removed but this can easily be detected and fixed by packaging the needed libs directly with the extension.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions