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

3cbf953e7a83c2405cfbfe952be9e265?s=128

christianjul

April 19, 2013
Tweet

More Decks by christianjul

Other Decks in Technology

Transcript

  1. None
  2. Maintaining your TYPO3 Flow Installation

  3. Welcome

  4. Christian Jul Jensen

  5. Thank you!

  6. None
  7. Composer Intro

  8. Composer Intro Composer & Flow

  9. Composer Intro Composer & Flow Working with Composer

  10. Composer Intro Composer & Flow Working with Composer Challenges

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

    typical scenario
  12. Composer Intro Composer & Flow Working with Composer Challenges A

    typical scenario Roll your own Repo
  13. Composer Intro Composer & Flow Working with Composer Challenges A

    typical scenario Roll your own Repo A suggested workflow
  14. Composer

  15. Composer

  16. None
  17. Dependency Manager

  18. Dependency Manager

  19. Dependency Manager

  20. Dependency Manager Distributed

  21. Dependency Manager Distributed Widely adopted

  22. { "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
  23. None
  24. File structure

  25. $> composer create-project typo3/flow-base-distribution

  26. Flow & Composer

  27. Composer Flow

  28. Composer Flow Dependency Management Package Management

  29. Composer Flow Dependency Management Package Management Fetching and Installing (Have

    our own structure)
  30. Composer Flow Dependency Management Package Management Fetching and Installing (Have

    our own structure) Autoload Configuration Autoloading
  31. 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)
  32. 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
  33. File structure

  34. Yeah… but I think submodules was nice

  35. Working with Composer

  36. Install / Update

  37. Install / Update .lock

  38. The challenges

  39. Composer: The not-so-good parts • New software • Lack of

    enterprise experience • Some overhead • Some convention clashes • Some repetitive work
  40. A typical scenario

  41. Framework Flow Fluid … Applications App Util … Libraries Doct

    Yaml … composer.lock composer.json Maintained by Composer Build … A typical Flow installation Maintained by you
  42. "repositories": [ { "type": "git", "url": "ssh://git@bitbucket.org/christianjul/taplist.git" } ], Adding

    your own repos
  43. "repositories": [ { "type": "git", "url": "ssh://git@bitbucket.org/christianjul/taplist.git" }, { "type":

    "hg", "url": "ssh://hg@bitbucket.org/anotherguy/a-thing.git" } ], Adding your own repos
  44. "repositories": [ { "type": "git", "url": "ssh://git@bitbucket.org/christianjul/taplist.git" }, { "type":

    "hg", "url": "ssh://hg@bitbucket.org/anotherguy/a-thing.git" } ], Satis
  45. "repositories": [ { "type": "composer", "url": "http://path.to/mysatis" } ], Using

    satis in your project
  46. A suggested workflow git pull composer install code git commit

    git push composer update your/package git commit git push
  47. Thank you! jul.net · @christianjul

  48. Questions? jul.net · @christianjul

  49. http://bit.ly/helpmeicantupdateflow

  50. Questions? jul.net · @christianjul

  51. Pelle

  52. Pelle You can hire my dad!

  53. Thank you! jul.net · @christianjul

  54. 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
  55. 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/                }        ] }
  56. Use the fork, Luke!

  57. {        "repositories":  [        

           {                        "type":  "vcs",                        "url":  "https://github.com/m4dh4ck0r/typo3-­‐flow"                }        ],        "require":  {                "typo3/flow":  "dev-­‐master"        } Use the fork, Luke!
  58. {        "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"        }
  59. "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
  60. {        "extra":  {        

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