contao / manager-plugin

Contao Manager Plugin
GNU Lesser General Public License v3.0
4 stars 9 forks source link

Optimize contao-provider imports #20

Closed aschempp closed 5 years ago

aschempp commented 5 years ago

The manager-plugin currently imports repositories from all ZIP artifacts that match type contao-provider. This is or can be problematic if a new version is installed, because the old one might still exist. This PR optimizes:

  1. providers will only be imported if they match the require statement in the root composer.json. Contao Manager 1.2 will set the requirements to an absolute version (the one from the last file upload), so the constraint should only ever match one ZIP file.
  2. Additionally, it will prevent multiple of the same repositories to be added. This can also happen if the same repo/credentials are required for multiple artifacts, e.g. when using Private Packagist.