Magento with Composer
Upcoming SlideShare
Loading in...5
×
 

Magento with Composer

on

  • 275 views

San Francisco Magento Meetup 2014/04

San Francisco Magento Meetup 2014/04

Statistics

Views

Total Views
275
Slideshare-icon Views on SlideShare
275
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Magento with Composer Magento with Composer Presentation Transcript

    • Composer Magento with Fabrizio Branca (@fbrnc) - San Francisco Magento Meetup – April 7, 2014
    • the problem Intro
    • htdocs <Name> <theme> layout template code design etc locale <area> core community local <area> <language> modules <package> <Namespace> <package> *.xml *.csv <theme> app skin lib Module2 default layout template code design etc locale frontend local frontend de_DE modules base My base My_Module2.xml My_Module2.csv default app skin etc, Block, … js, css, img, … my_module2 my_module2 Magento My_Module My_Module2 Module default layout template code design etc locale frontend local frontend de_DE modules base My base My_Module.xml My_Module.csv default app skin etc, Block, … js, css, img, … my_module my_module
    • htdocs Module default layout template code design etc locale local frontend de_DE modules My base *.xml app My_Module2.xml My_Module2.csv my_module2 My_Module.xml My_Module.csv etc, Block, … my_module Module2 etc, Block, … my_module2 my_module
    • Magento 2
    • pub Module code My app Magento My_Module My_Module2 view Controller etc i18n Block … Module2 view Controller etc i18n Block … Magento 2
    • the requirements Intro
    • • Reuse modules • Share modules • Easy and clean uninstall without leftovers • Non-destructive (no deletion of files) • Clean Magento vanilla code • Work collaboratively on projects • Restrict access to modules for team members • Independent versioning scheme of modules • Independent version control origin the requirements
    • a solution Intro
    • modman by @colinmollenhour
    • htdocs code core community local app app/code/…/My/Module .modman My_Module app/design/… skin/frontend/… app/etc/modules/My_Module.xml modman app/code/…/My/Module My_Module2 app/design/… skin/frontend/… app/etc/modules/My_Module.xml modman <theme> layout template design etc locale <area> <language> modules <package> *.xml modman
    • “wiring” Intro modman “connects” existing modules to the Magento core, but how do we manage them?
    • htdocs code core community local app app/code/…/My/Module .modman My_Module app/design/… skin/frontend/… app/etc/modules/My_Module.xml modman app/code/…/My/Module My_Module2 app/design/… skin/frontend/… app/etc/modules/My_Module.xml modman <theme> layout template design etc locale <area> <language> modules <package> *.xml Components tools n98-magerun.phar phpunit.phar modman EnvSettingsTool composer.phar htdocs .modman Configuration Installer (Metadata, Doc,…) My_Module My_Module2 app,… and usually there’s even more stuff… These should come from different origins
    • svn:externals Git submodules Phing/Ant Custom scripts Composer Components Options works fine, but needs some getting used to it
    • Composer Intro in a nutshell…
    • Composer“Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.” phar file json configuration supports Git, SVN, tar,… and mix’n’match package management Dependency management (including fine-grained control over specific versions,…) Autoloader
    • Fabrizio’s lightweightapproach Approach @fbrnc
    • Keeping it Simple!
    • AOEpeople/composer-installers "replace": { "magento-hackathon/magento-composer-installer":"*" } “inspired” by composer/installers “magento-module” “magento-source” handles package types
    • <?php namespace AoepeopleComposerInstallers; class MagentoInstaller extends BaseInstaller { protected $locations = array( 'module' => '.modman/{$name}/', 'source' => 'htdocs/' ); } AOEpeople/composer-installers
    • • Fully compatible with magento-hackathon/magento-composer-installer • Adds support for type “magento-source” • Only puts packages into place • Native modman script is used to deploy modules • Wrapped in a simple installer script AOEpeople/composer-installers
    • { "minimum-stability":"dev", "require":{ "aoepeople/composer-installers": "*", "fbrnc/aoe_scheduler": "*", "fbrnc/aoe_cachecleaner": "*", "aoemedia/magento_enterprise": "1.13.1.0", "aoemedia/envsettingstool": "*" }, "config": { "bin-dir": "bin" } } AOEpeople/composer-installers replaces Hackathon Installer some modules Vanilla Magento Source Tools,…
    • htdocs code core community local app app/code/…/My/Module .modman My_Module app/design/… skin/frontend/… app/etc/modules/My_Module.xml modman app/code/…/My/Module My_Module2 app/design/… skin/frontend/… app/etc/modules/My_Module.xml modman <theme> layout template design etc locale <area> <language> modules <package> *.xml Components
    • https://github.com/AOEpeople/Magento_SampleProject
    • Thank you! Any questions?