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

Maintaining your Flow / Neos installation best practices for the use of composer, git and friends

Maintaining your Flow / Neos installation best practices for the use of composer, git and friends

With the introduction of Composer as dependency manager in TYPO3 Flow 2.0, the structure of a Flow-project has changed, most notably from using Git-submodules to manage packages, to letting Composer do that.

This leads to a number of questions: What is the best way to set up your SCM structure? How do you make sure that all team members has the same version of dependent libraries? When do you use your SCM or Composer to update packages? and probably a lot more.

This talk will take you through some of the pitfalls and best-practices of maintaining and cooperating on TYPO3 Flow projects

christianjul

April 19, 2013
Tweet

More Decks by christianjul

Other Decks in Technology

Transcript

  1. Composer Intro Composer & Flow Working with Composer Challenges A

    typical scenario Roll your own Repo A suggested workflow
  2. { "name": "typo3/welcome", "type": "typo3-flow-framework", "description": "This package provides a

    start screen for the…", "license": "LGPL-3.0+", "require": { "typo3/flow": "*" }, "autoload": { "psr-0": { "TYPO3\\Welcome": "Classes" } } } Composer manifests
  3. Composer Flow Dependency Management Package Management Fetching and Installing (Have

    our own structure) Autoload Configuration Autoloading
  4. Composer Flow Dependency Management Package Management Fetching and Installing (Have

    our own structure) Autoload Configuration Autoloading Knows 3rd party packages Use installed code (PSR-0)
  5. Composer Flow Dependency Management Package Management Fetching and Installing (Have

    our own structure) Autoload Configuration Autoloading Knows 3rd party packages Use installed code (PSR-0) Update packages
  6. Composer: The not-so-good parts • New software • Lack of

    enterprise experience • Some overhead • Some convention clashes • Some repetitive work
  7. Framework Flow Fluid … Applications App Util … Libraries Doct

    Yaml … composer.lock composer.json Maintained by Composer Build … A typical Flow installation Maintained by you
  8. A suggested workflow git pull composer install code git commit

    git push composer update your/package git commit git push
  9. Trickbag $COMPOSER_HOME/config.json allows you to set defaults for config options

    in all your projects *nix: /home/example/.composer/config.json OSX: /Users/example/.composer/config.json Windows: C:\Users\example\AppData\Roaming\Composer\config.json
  10. Trickbag $COMPOSER_HOME/config.json allows you to set defaults for config options

    in all your projects *nix: /home/example/.composer/config.json OSX: /Users/example/.composer/config.json Windows: C:\Users\example\AppData\Roaming\Composer\config.json {        "repositories":  [                {                        "type":  "composer",                        "url":  "https://satis.example.org/                }        ] }
  11. {        "repositories":  [        

           {                        "type":  "vcs",                        "url":  "https://github.com/m4dh4ck0r/typo3-­‐flow"                }        ],        "require":  {                "typo3/flow":  "dev-­‐master"        } Use the fork, Luke!
  12. {        "repositories":  [        

           {                        "type":  "vcs",                        "url":  "https://github.com/m4dh4ck0r/typo3-­‐flow"                }        ],        "require":  {                "typo3/flow":  "dev-­‐master"        } Use the fork, Luke! {        "repositories":  [                {                        "type":  "vcs",                        "url":  "https://github.com/m4dh4ck0r/typo3-­‐flow"                }        ],        "require":  {                "typo3/flow":  "dev-­‐my-­‐patch  as  2.0.0"        }
  13. "repositories":  [        {        

           "type":  "package",                "package":  {                        "name":  "vendor/package",                        "version":  "1.0.0",                        "dist":  {                                "url":  "http://example.org/package.zip",                                "type":  "zip"                        },                        "source":  {                                "url":  "git://example.org/package.git",                                "type":  "git",                                "reference":  "tag  name,  branch  name  or  commit  hash"                        }                }        } ], "require":  {        "vendor/package":  "1.0.0" } Using non-composerified projects
  14. {        "extra":  {        

           "installer-­‐paths":  {                        "Packages/IntegrationServices/{$name}":  "my/package"                }        } } Custom install path https://github.com/composer/installers#custom-install-paths