Create composer.json #1241
I know package managers are the new rage! I can imagine it's annoying to have a file for each package manager under the sun. Composer is the only PHP package manager I'm aware of that is adopted by the community.
All major PHP frameworks are using it: symphony 2, laravel, zend framework 2, codeigniter etc.
Let me know if you need more details.
Sorry for the delay, and thanks for the contribution! This was actually proposed back in #195 and I shot it down because it seemed excessive, but now the PHP guys here think it's a decent idea and bootstrap let one through, so I think we can go ahead and add it in. @patforg, are you up for taking ownership of it and keeping it up to date?
I was also going to say we should work it into the versioning grunt script, but there's no version in this one or bootstrap's. Does composer not use a version?
Hi @heff,
I have no problem in keeping it up to date, it should require very little maintenance anyways.
All I have seen is a grunt-composer plugin which executes composer within grunt, but composer in itself has a way to run scripts. I could be mistaken but I don't think a grunt file would be needed.
Yeah, sorry, I meant updating the video.js grunt file. We have a grunt script that, when we make a new releases, will update the video.js version in the package.json, bower.json, and component.json. But composer.json doesn't appear to need a version? Do you know where the version of a package is tracked for composer, and is there anything we need to do in addition to adding the composer.json file?
HI Heff,
Oh got it now. I've updated the version to 4.6.4 in all 3 files.
There is a version in the composer file but if omitted it takes the versions from tags and branches in the repository.
Optionally you can register the package with packagist.org, which is the main repository of packages.
It's best if it's done by the manager of the repository in order to setup a commit hook to update the package automatically. But like I said that part is optional, but recommended.
Oh man, sorry for the confusion. I didn't mean for you to actually update those versions. That's what the grunt script is used for. Now I actually need you to undo that last change and put the versions back to where they were...sorry.
Thanks for clearing up how composer versions work though. That's pretty nice that it can just read the tags. I'll register this will packagist after I pull this in.
And published to packagist. https://packagist.org/packages/videojs/video.js
Though it doesn't appear to be picking up the tagged versions? You'll have to try to install it and see if it uses the latest version tag or just master.
Make video js available in PHP projects that uses composer.