Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Talk CakeFest 2021 - IdeHelper and IDE producti...

Mark Sch.
October 08, 2021

Talk CakeFest 2021 - IdeHelper and IDE productivity

Mark Sch.

October 08, 2021
Tweet

More Decks by Mark Sch.

Other Decks in Technology

Transcript

  1. About Mark Scherer @dereuromark • Senior Software Developer & Tooling

    Architect at Spryker Systems GmbH in Berlin, Germany • CakePHP Core Developer for 11+ years • Plugin specialist and Tooling expert
  2. Agenda • CakePHP 4 and PHPStorm • IdeHelper ◦ IDE

    usability and speed up tips for maximum rapid developing in CakePHP ◦ Annotations ◦ PHPStan/Psalm compatibility ◦ Autocomplete/Typehinting
  3. CakePHP 4 and PHPStorm • By default very high support

    • Plugins recommended ◦ https:/ /plugins.jetbrains.com/plugin/9927-deep-assoc-completion see https:/ /github.com/dereuromark/cakephp-ide-helper/wiki/PHPStorm 4
  4. CakePHP 4 and PHPStorm • Settings => Inspections ◦ Code

    style: uncheck Unnecessary fully qualified name (we need this for doc blocks) ◦ General: Static method called as dynamic, uncheck if you don't want to be alerted about PHPUnit code smells. • Settings => Code Style ◦ Code Conversion => Array Declaration Style: Force short declaration style ◦ Code Conversion => Array Declaration Style: Add comma after last element in multiline array see https:/ /github.com/dereuromark/cakephp-ide-helper/wiki/PHPStorm 5
  5. IdeHelper 6 • Annotate • Code Complete / Meta File

    https:/ /github.com/dereuromark/cakephp-ide-helper + (optional) https:/ /github.com/dereuromark/cakephp-ide-helper-extra
  6. Code Complete / Meta File 8 • Generate meta files

    for IDE • Very specific format/content usually
  7. Code Complete / Meta File • Magic string autocomplete from

    start to end • Route path handling ◦ UrlHelper::urlFromPath() ◦ HtmlHelper::linkFromPath() ◦ urlArray() convenience function 9
  8. Coding Session IdeHelper task as real life solution: - Icons

    in templates https:/ /github.com/dereuromark/cakephp-ide-helper-extra -> src/Tools/Generator/Task/FormatIconBootstrapTask.php 10