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

Transforming Magento (NomadMage 2017)

Transforming Magento (NomadMage 2017)

Christopher Pitt

April 19, 2017
Tweet

More Decks by Christopher Pitt

Other Decks in Programming

Transcript

  1. HI

  2. class Sprocket { public $name = new Translatable(static::class); public function

    turn($spanner = factory("spanner")) { return $spanner->use($this); } }
  3. class Sprocket { use \Pre\PropertyLoaders\PropertyLoadersTrait; private $name; private function loadNameProperty()

    { $this->name = new Translatable(static::class); } public function turn($spanner = null) { if (is_null($spanner)) { $spanner = factory("spanner"); } return $spanner->use($this); } }
  4. REASONS TO USE: ▸ You like the syntax I've shown

    ▸ You repeat code ▸ You repeat code
  5. REASONS TO USE: ▸ New syntax could be clearer and

    more concise ▸ You want features from other languages ▸ You want to support old PHP
  6. REASONS NOT TO USE: ▸ No IDE support ▸ You

    have to teach developers new syntax ▸ You have to learn how .gitignore files work
  7. HOW TO GET THOSE REASONS OFF THE PLANE: [HUMANELY] ▸

    Pay someone to develop IDE support (or do it yourself) ▸ Help me make the docs better ▸ Learn how .gitignore files work