Skip to content
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

Delete original package directory #31

Merged
merged 3 commits into from
Dec 23, 2019

Conversation

coenjacobs
Copy link
Owner

Some packages, including twig/twig, have some safeguard mechanisms in place that prevent an older version (1.x) and a newer version (3.x) of the same package to be active. This is done by checking if the new version of the class is available, before loading the old version of the class.

Use case where this was found: A plugin using Mozart to bundle Twig (on 3.x, preferably), while the theme used Twig 1.x without Mozart. Even though the replace went fine and the prefixed/namespaced classes of Twig are being used in the plugin, the version of Twig being loaded by the theme then still detected the new Twig version inside the /vendor directory which is being autoloaded. So, this pull request deletes the packages from the /vendor directory after they have been moved to the new directory.

This has been brought to my attention by @Willemijnr, who has been using my package in one of our Level Level projects - so props to her! 🎉

@coenjacobs coenjacobs merged commit a5fd932 into master Dec 23, 2019
@coenjacobs coenjacobs deleted the delete-origin-package-directory branch December 23, 2019 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant