Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Composer & WordPress

Composer & WordPress

Slides from a MWUG talk given on Wednesday the 16th

Tom J Nowell

October 16, 2013
Tweet

More Decks by Tom J Nowell

Other Decks in Programming

Transcript

  1. Is it Valid? ~/www/test › composer validate ./composer.json is valid,

    but with a few warnings See http://getcomposer.org/doc/04-schema.md for details on the schema No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
  2. composer.json { "name" : "tomjn/myproject", "description": "A handy description.", "license":

    "GPL-2.0+", "require" : { "johnpbloch/wordpress": "3.6.1", "php": ">=5.3" } }
  3. ~/www/test › composer install Loading composer repositories with package information

    Installing dependencies (including require-dev) - Installing johnpbloch/wordpress-core- installer (0.2.0) Downloading: 100% - Installing johnpbloch/wordpress (3.6.1) Downloading: 100% Writing lock file Generating autoload files
  4. { "name" : "tomjn/myproject", "description": "A handy description.", "license": "GPL-2.0+",

    "repositories": [ { "type": "package", "package": { "name": "wordpress/twentythirteen", "version": "1.0", "type": "wordpress-theme", "source": { "url": "http://themes.svn.wordpress.org/", "type": "svn", "reference": "twentythirteen/1.0/" }, "require": { "composer/installers": "~1.0" } } } ], "require" : { "johnpbloch/wordpress": "3.6.1", "wordpress/twentythirteen": "1.0", "php": ">=5.3" } }
  5. ~/www/test › composer update Loading composer repositories with package information

    Updating dependencies (including require-dev) - Installing wordpress/twentythirteen (1.0) Checking out twentythirteen/1.0/ Writing lock file Generating autoload files
  6. { "name" : "tomjn/myproject", "description" : "A handy description.", "license"

    : "GPL-2.0+", "repositories": [ { "type": "composer", "url": "http://wpackagist.org" }, { "type": "package", "package": { "name": "wordpress/twentythirteen", …………………………………………….. "require" : { "johnpbloch/wordpress": "3.6.1", "wordpress/twentythirteen": "1.0", "wpackagist/akismet": "*", "php": ">=5.3" } }
  7. ~/www/test › composer update Loading composer repositories with package information

    Updating dependencies (including require-dev) - Installing wpackagist/akismet (trunk) Downloading: 100% Writing lock file Generating autoload files