1

Currently nearly the entire packagist.org-based dependency loading relies on GitHub-based repos. But GitHub users have the possibility to delete public repositories, which leads to the question:

What to do if a necessary Composer-loaded dependency does not exist anymore (or gets deleted by vandalism etc.) ? Are there archives somewhere to provide long-term service ?

Afaik packagist.org does not host any data (yet) and GitHub also does not keep public copies of deleted or renamed repositories.

Community
  • 1
  • 1
Sliq
  • 15,937
  • 27
  • 110
  • 143

2 Answers2

3

That's where Satis comes into play. With Satis you can create a local copy of either the packages you need from "packagist.org", and also create local downloaded ZIP versions of all the versions found online.

This comes with the added benefit of being hosted in your local network, so it is much faster when accessing it, and you have a local copy available whenever your online connection goes down, or Github experiences issues, or whatever.

These locally created versions are yours to backup and take care alone, and if you install something from them, that location will be persisted in the composer.lock file (it registers the URL any ZIP was downloaded from, which is not the Github API URL, but your local HTTP server hosting the Satis files).

Using Satis you can ensure a bit more that every software you use is accessible when you need it in your local environment. This comes at a little cost of maintaining a list of all the software packages you need, running the Satis update once in a while, having a local HTTP server hosting everything, and adding your Satis repo in every composer.json file you create. Note that this last step makes it impossible to use your software if they does not have access to your Satis hosted files - it's a closed user group solution.

Sven
  • 69,403
  • 10
  • 107
  • 109
2

Although it's very unlikely to happen if you use popular third party components, you will have a copy on you development/production space so if it goes down you can create a new repo and upload a copy of that library.

If a third party component is not very popular and you are concerned about its continuity you can fork it just in case

Alex Barroso
  • 839
  • 6
  • 14