Skip to content

Complete revamp - path repositories FTW

Compare
Choose a tag to compare
@franzliedke franzliedke released this 22 Mar 11:48
· 111 commits to master since this release

Almost ready for a 1.0 release now.

Revamp under the hood

This release marks the culmination of a lot of work, diving into Composer's innards and even sending a pull request to Composer. Thus, to enjoy this release to its fullest, make sure you're running an up-to-date version of Composer. (You can do so by running composer self-update.)

Most importantly, Studio now makes use of Composer's path repositories instead of manipulating the generated autoloader files. The benefit: Studio-managed packages are symlinked directly into the vendor directory, and version conflicts are handled completely by Composer. Let Composer do what it dos best.

Thus, besides giving you a helping hand in kickstarting new Composer packages, Studio now primarily provides a nice interface to working with path repositories. The benefit over doing it by hand: no manipulation of the composer.json file, which is shared in the repository. Instead, a local studio.json files describes your development setup and can be ignored by other maintainers or contributors of your project.

I have successfully used this approach for a while now in developing Flarum - in a setup with various core libraries and more than ten extension packages. It works really well!

Summary

  • Path repositories: As described above, this also takes care of duplicate dependencies (#14, #33, #42, #45).
  • Autoloading files: With these changes, file autoloaders now work well, too (#29).
  • composer update will now also affect managed packages' dependencies (#26).
  • Studio now works well Composer's custom installers (#36).
  • Allow creating packages as Git submodules (#31).
  • Changes:
    • Compatibility with Symfony 3.x (#20, #40, #44, #47).
    • Updates for Composer's plugin API versioning (#43, #46).
    • Clearly ask for confirmation when scrapping packages (#39).
  • Bug fixes:
    • More error checking when running studio create (#12).
    • scrap command could not handle symlinks (#23).
    • Don't crash when trying to load locations that don't exist (#38).

Thanks for your patience and to all the people who made this release possible - from issues and fruitful discussion to pull requests. 🎉