Vanilla now uses Composer
Yesterday, we merged a change to master
branch that greatly effects how folks interact with the repository: we switched to Composer.
This means it is no longer possible to simply clone the repo into a web directory and run Vanilla. In developer parlance, the source code and the runtime code have diverged. Now to build Vanilla's runtime code, you must install Composer. This is only necessary if you are running a non-official version directly from GitHub - the releases on this site will continue to work normally because we will be pre-building those for you (using Phing, if you're interested).
Composer will eventually replace the entire /library/vendors
directory, in addition to being the autoloader for /library/core
files. For dependencies without Composer support we'll make a wrapper for them.
Unfortunately, it will not be possible to directly manage addons using Composer. Our plugin structure demands that disabled addons never have their files autoloaded, which is not something Composer can support.
Why we added Composer:
- Vastly easier dependency management.
- It's had wide support in the PHP community for quite some time.
- Other Composer-based projects can now easily use Vanilla if they want.
More architectural improvements like this are coming soon.
Comments
Composer will help in the dependency management but sometime it requires some research and manually edit out some lines to resolve the dependency mess.
I'm a fan of using standards and reusing work someone else has already done! But only questions comes directly to my mind when reading this: will all those changes be applied for Vanilla 2.2 and wouldn't that have big influence on the release date?
No, nothing like this is being backported.
If those tweaks are already in master branch and in combination of what you've said here does that mean that "master" is now 2.3 and pull requests for 2.2 should be made against "release/2.2"?
Forgive me, but GitHub and Composer for me are like electricity to Catweazle...
https://www.youtube.com/watch?v=J1ho8di4ywQ
Good work! This should solve all problems with outdated dependencies.
What was the reason for this:
https://github.com/vanilla/vanilla/commit/e5b6ad ?
Could these be excluded using phing instead?
Having to download the composer files manually to build from the archive is cumbersome when you are on a machine without git. (And sometimes you don't want to clone the entire repository to quickly test something.)
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
@R_J that is correct!
@Bleistivt That could be undone now, yes. It was a predecessor to Phing working.
Yes!
grep is your friend.
btw what do you use for php version switching? phpbrew has been quite temperamental.
grep is your friend.
Personally I avoid it, but we've started distributing Vagrant images internally.
Yep that sounds a lot more stable. I think phpbrew is a good idea, but getting it working with all the servers buggy. At least with vagrant once set up switiching is easy. Besides as you are testing HHVM phpbrew would be useless for that.
grep is your friend.
Can you include this info somewhere semi-prominent, like here? Would've saved me an hour of my life...
Sorry about that. I did one better and put it at the very top: https://github.com/vanilla/vanilla/commit/9df73125fdf708797d792bb76a28317e78e3fe27
Great!.... but did you mean to add that 1 too?
Jiminey. Thanks.
Can anybody tell me the name of vanilla forum on Packagist? The search gives anything but not the vanilla forum.
@gtboy Vanilla isn't released on packagist. I am not sure if they ever plan to release on packagist. The developers are using composer to pull in the vendor packages used in Vanilla.
You can see a list of packages used in the composer file: https://github.com/vanilla/vanilla/blob/8fd0a31ffa0c134c059ca5dadcaf6683cf364ff8/composer.json
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
We don't have immediate plans to put Vanilla on Packagist, but we may in the future. Unfortunately it's not quite click-and-play to do so.
We just removed the last non-Composer dependency from
master
, so/library/vendors
will not exist in 2.5.Discussion subtitle: 15 Months To Dependency Freedom