• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Dependency management in PHP & ZendFramework 2
 

Dependency management in PHP & ZendFramework 2

on

  • 4,525 views

Talk about dependency management in PHP and ZendFramework2. Use Composer with ZF2 project.

Talk about dependency management in PHP and ZendFramework2. Use Composer with ZF2 project.
Created for ZfConf 2012 Russia. http://www.zfconf.ru/2012/

Statistics

Views

Total Views
4,525
Views on SlideShare
4,310
Embed Views
215

Actions

Likes
2
Downloads
40
Comments
0

4 Embeds 215

http://doda.jp 171
http://cms.doda.jp 30
https://cms.doda.jp 13
https://doda.jp 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-NonCommercial LicenseCC Attribution-NonCommercial License

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

    Dependency management in PHP & ZendFramework 2 Dependency management in PHP & ZendFramework 2 Presentation Transcript

    • Dependency PHPManagement Zend Framework 2 Kirill chEbba Chebunin Creara
    • Actual PHP Problems  Code Quality − Design Patterns  Standards − PSR  Complete Solutions − Libraries − Modules, Bundles, Plugins − ToolsZFConf 2012 (c) Kirill chEbba Chebunin
    • Dependency ManagementZFConf 2012 (c) Kirill chEbba Chebunin
    • The ProblemZFConf 2012 (c) Kirill chEbba Chebunin
    • The ProblemZFConf 2012 (c) Kirill chEbba Chebunin
    • The ProblemZFConf 2012 (c) Kirill chEbba Chebunin
    • Solutions  Python: easy_install, pip  Ruby: gems  Java: maven, ivy  C#(.NET): NuGet, NuPack  PHP: PEAR/PyrusZFConf 2012 (c) Kirill chEbba Chebunin
    • Solutions. PHP Frameworks  Symfony2 − Git Submodules − bin/vendors − Composer  Zend Framework2 − Pyrus − Modules?ZFConf 2012 (c) Kirill chEbba Chebunin
    • ComposerZFConf 2012 (c) Kirill chEbba Chebunin
    • Composer  PEAR. Why NOT?  Composer. Why? − Created for Dependency management − Separate storage & Package metadata − Support existing infrastructure − Dist & Source − Extendable − Autoload SupportZFConf 2012 (c) Kirill chEbba Chebunin
    • Composer. Architecture  Package  Repository – package meta data − Composer, Pear, VCS, etc  Downloader − Archive, VCS, Pear  Installer − Library, Project  Autoload − PSR-0, ClassMapZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + ComposerZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Pear composer.json "repositories": [ { "type": "pear", "url": "http://packages.zendframework.com" } ]ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Pear "require": { "php": ">=5.3.2", "pear-zf2/Zend_Mvc": "2.0.0beta3", "pear-zf2/Zend_Di": "2.0.0beta3", "pear-zf2/Zend_Code": "2.0.0beta3", "pear-zf2/Zend_Config": "2.0.0beta3", "pear-zf2/Zend_EventManager": "2.0.0beta3", "pear-zf2/Zend_Filter": "2.0.0beta3", "pear-zf2/Zend_Http": "2.0.0beta3", "pear-zf2/Zend_Loader": "2.0.0beta3", "pear-zf2/Zend_Module": "2.0.0beta3", "pear-zf2/Zend_Registry": "2.0.0beta3", "pear-zf2/Zend_Stdlib": "2.0.0beta3", "pear-zf2/Zend_Uri": "2.0.0beta3", "pear-zf2/Zend_Validator": "2.0.0beta3", "pear-zf2/Zend_View": "2.0.0beta3" }ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Pear public/index.php //require_once //(getenv(ZF2_PATH) ?: vendor/ZendFramework/library) // ./Zend/Loader/AutoloaderFactory.php; //ZendLoaderAutoloaderFactory::factory(); require_once vendor/.composer/autoload.php;ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Pear /path/to/project$ composer installZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. PearZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Pear Problems:  Missed dependencies in zf2 channel  Missed versions in zf2 channel  No package groups support in Composer Zend_Framework#StandardZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Composercomposer.json"repositories": [ { "type": "composer", "url": "https://raw.github.com/chEbba/Zf2Composer/master" }]ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Composer "require": { "php": ">=5.3.2", "pear-zf2/Zend_Mvc": "2.0.0beta3", "pear-zf2/Zend_EventManager": "2.0.0beta3", "pear-zf2/Zend_Module": "2.0.0beta3", "pear-zf2/Zend_View": "2.0.0beta3" }ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. ComposerZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. ModuleZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Modulecomposer.json "name": "zendframework/zend-developer-tools", "description": "ZF2 module for developer and debug tools.", "keywords": ["zend", "zf", "module", "developer", "tools"], "homepage": "https://github.com/zendframework/ZendDeveloperTools", "type": "library", "license": "New BSD License", "authors": [ { "name": "Zend Technologies USA", "email": "info@zendframework.com", "homepage": "http://zendframework.com" } ],ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Modulecomposer.json "name": "zendframework/zend-developer-tools", "description": "ZF2 module for developer and debug tools.", "keywords": ["zend", "zf", "module", "developer", "tools"], "homepage": "https://github.com/zendframework/ZendDeveloperTools", "type": "library", "license": "New BSD License", "authors": [ { "name": "Zend Technologies USA", "email": "info@zendframework.com", "homepage": "http://zendframework.com" } ],ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Module "version": "1.0.0-pr1", "require":{ "php":">=5.3.2", "pear-zf2/zend_mvc": "2.0.0beta3", "pear-zf2/zend_eventmanager": "2.0.0beta3", "pear-zf2/zend_http": "2.0.0beta3", "pear-zf2/zend_stdlib": "2.0.0beta3", "pear-zf2/zend_view": "2.0.0beta3" }, "autoload":{ "classmap":[""] }ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Modulehttp://packagist.org/packages/submitZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Modulecomposer.json"require": { "php": ">=5.3.2", "pear-zf2/Zend_Mvc": "2.0.0beta3", "pear-zf2/Zend_EventManager": "2.0.0beta3", "pear-zf2/Zend_Module": "2.0.0beta3", "pear-zf2/Zend_View": "2.0.0beta3", "zendframework/zend_developer_tools": "1.0.0-alpha1"}ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Moduleapplication.config.php modules => array( Application, ZendDeveloperTools )ZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. Pear /path/to/project$ composer updateZFConf 2012 (c) Kirill chEbba Chebunin
    • ZF2 + Composer. ComposerZFConf 2012 (c) Kirill chEbba Chebunin
    • Links  https://github.com/chEbba/Zf2Composer/  https://github.com/zendframework/ZendSkeletonApplication/  https://github.com/zendframework/ZendDeveloperTools/  https://github.com/stefankleff/ZendDeveloperTools/  http://getcomposer.org/  http://packagist.org/  http://packages.zendframework.com/  http://modules.zendframework.com/ZFConf 2012 (c) Kirill chEbba Chebunin
    • Questions? Use Complete Solutions, BITCH! Github: chEbba Twitter: @iamchEbba Mail: iam@chebba.org Made by CoylZFConf 2012 (c) Kirill chEbba Chebunin