Using composer to build out thirdparty

98 views
Skip to first unread message

Dan Rye

unread,
Jan 11, 2013, 2:43:43 PM1/11/13
to silverstripe-dev
What are the core dev's thoughts on moving framework dependencies to composer rather than being checked in under thirdparty?

I arrived at this question while switching a basic, (non SS) site to use composer, and was looking to add jquery.  It seems many people fork jquery to do this, I was contemplating sending a pull request to add composer.json for jquery.  I have no idea if they'd be receptive to that.

After doing a bit more research it seems the recomendation for frontend dependecies is NPM (node package manager).  JQuery does already have a package.json file for this purpose.

I see a couple eventual futures here... composer and packagist could be extended to support the package.json standard as well.

Anyway, I really just wanted to open up the discussion, curious what others are thinking around this.

Ingo Schommer

unread,
Jan 11, 2013, 4:47:39 PM1/11/13
to silverst...@googlegroups.com
Hello Dan,

While composer can theoretically load all kinds of modules/files,
its purpose is PHP projects. Other languages and platforms
have their own dependency managers, Rubygems, NPM, …
mostly with their own definitions schemas, and scripting support in their own language.
So I don't think you'll get very far submitting a composer.json to the jQuery project.

There's some stuff in thirdparty like Zend which we can move to composer,
although in this case we need to remove one or two customizations.
Most other libraries in there are JavaScript code.
And moving those to NPM will just complicate our setup process unnecessarily.

Here's a complete list of dependencies we *could* move to composer:
Zend
php-peg
simplepie
simpletest
spyc
zend_translate_railsyaml

Happy for you to coordinate with the module maintainers,
add a composer.json if required, and check if the version we're
using is available under composer (or thoroughly test against an updated version).

Thanks
Ingo
> --
> You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
> To post to this group, send email to silverst...@googlegroups.com.
> To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.

Dan Rye

unread,
Jan 14, 2013, 9:24:20 PM1/14/13
to silverstripe-dev
Yeah, after sending this and doing a bit more research it sounds like NPM is the way to go for this particular project.  As for SilverStripe, I'd be happy to help get these libraries moved into dependency management.  Could I get some help collecting information on the libraries under consideration?


From the little bit of looking I've done so far it looks like modifications were made in most cases, however minor.  We'll have to evaluate if the fix has already been incorporated or if we need to submit patches to these other projects.

Dan

Personal
513.226.2322

Ingo Schommer

unread,
Jan 15, 2013, 5:14:09 AM1/15/13
to silverst...@googlegroups.com
Hello Dan,

Thanks for making that overview, really helps to guide the discussion!
An upgrade to ZF2 is a bigger mission probably, even for 3.1 that might be a bit too much.
But if you want to research any API changes which would affect us, that'll help.

Composer has means to manually define composer.json for dependencies which don't
have any, but that only makes sense if we can download the dependency from ZIP,
from a stable, high availability URL. We don't want to be in a situation where we rely
on SVN checkouts or git clones etc, they will immensely slow down our "composer create-project" command
for installing non-dev versions of SilverStripe.

Technically, we could load ZF1 as a ZIP archive, but we only include certain
parts of ZF1 in our codebase, so a full ZIP download would be unnecessary bloat.

I'm the Zend_Translate_RailsYML maintainer, feel free to submit a composer.json pull request :)

For SimplePie, Spyc, Simpletest - we either need to get them to backport
a composer.json to a release branch we were relying on, or test if we can
upgrade to a later release.

Thanks
Ingo


---
Ingo Schommer | Senior Developer
SilverStripe (http://silverstripe.com)
Skype: chillu23

Ingo Schommer

unread,
Jan 22, 2013, 8:10:07 AM1/22/13
to silverst...@googlegroups.com
Hey Dan, have you made any progress with getting our PHP thirdparty libs on composer?
By the way, I've just stumbled on the fact that composer allows "installation"
Although frankly, it'll just add delays to the composer install to connect to 
a dozen different domains for ZIP downloads, and we don't even get the
benefit of slimming down our repo size (git remembers...).

Dan Rye

unread,
Jan 22, 2013, 9:34:15 AM1/22/13
to silverstripe-dev
No, I haven't taken it beyond the spreadsheet.  The lack of ZF1 was discouraging for me.  I'll revisit it this week though.  Thanks for the reminder, I need them.

Dan


To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/jYQTRhtMgSwJ.

Conrad Dobbs

unread,
Dec 2, 2014, 2:43:21 AM12/2/14
to silverst...@googlegroups.com
Is this still being considered or has it dropped off the radar completely?

Was looking at the caching code the other day as I was trying to load in a custom zend cache (unfortunately SS_Cache doesn't allow this without using a Two Level cache). As part of my nosing around I looked at whether it could be loaded through composer. It looks like all the zend components are separated into separate libraries which can be installed through composer now.

The downside is the APIs look to have changed quite a bit (at least for the cache component).

Cam Findlay

unread,
Dec 2, 2014, 8:18:22 PM12/2/14
to silverst...@googlegroups.com
Could be good to outline this request on our http://silverstripe.uservoice.com roadmap.
Reply all
Reply to author
Forward
0 new messages