pharmokan

phpstorm todo

Oct 29th, 2020 (edited)
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. go to implementation [alt+click]
  2. go to usage [ctrl+click]
  3. go to file [ctrl+shift+o]
  4. go to anywhere [shift + shift] ( rebind to ctrl +r )
  5. expand selection [alt + up]
  6. unexpand selection [alt + down ]
  7. go to last edit point [ctrl+shift+backspace]
  8. duplicate line [ctrl+d]
  9. delete line [ctrl+backspace]
  10. find in Path [ctrl+shift+f]
  11. refactoring [ctrl+shift+a]
  12.  
  13.  
  14. settings:
  15. php mess detector [https://www.jetbrains.com/help/phpstorm/using-php-mess-detector.html#installing-configuring-mess-detector]
  16. typehints on
  17. docker image instead of executable
  18. https://devdocs.magento.com/guides/v2.4/test/unit/unit_test_execution_phpstorm.html
  19.  
  20.  
  21. setup:
  22. phpunit docker magento
  23. php mess detector docker
  24. magento docker phpstorm
  25. magento phpstorm extension
  26.  
  27. look @ order attribute extension github
  28.  
  29. ===========
  30. docker hijack cmd that installs magento and vendor composer
  31. container that installs php 7.3 && mysql
  32. interpreter and everything else = on docker
  33. volume mount in docker compose
  34.  
  35. ===========
  36. abstract class provides a lot of hook-into methods at certain (events interceptors observers) that initially return just $this for chaining, the functions exist, but business logic inside method/function is just 'return $this' that you can just
  37.  
  38. ============
  39. without compiling everytime change test -- anser: di static deploy
  40.  
  41. you implement interface class
  42.  
  43. extend class: override methods, exclude methods you dont want to override but still can call them from parent class inheritance.
  44.  
  45. <?php
  46.  
  47. class Foo
  48. {
  49. public function printItem($string)
  50. {
  51. echo 'Foo: ' . $string . PHP_EOL;
  52. }
  53.  
  54. public function printPHP()
  55. {
  56. echo 'PHP is great.' . PHP_EOL;
  57. }
  58. }
  59.  
  60. class Bar extends Foo
  61. {
  62. public function printItem($string)
  63. {
  64. echo 'Bar: ' . $string . PHP_EOL;
  65. }
  66. }
  67.  
  68. $foo = new Foo();
  69. $bar = new Bar();
  70. $foo->printItem('baz'); // Output: 'Foo: baz'
  71. $foo->printPHP(); // Output: 'PHP is great'
  72. $bar->printItem('baz'); // Output: 'Bar: baz'
  73. $bar->printPHP(); // Output: 'PHP is great'
  74.  
  75. ?>
  76.  
  77. =========
  78. use "plugin" getFinalPrice mutate to 20% off if cart qty > 4
  79. use di.xml to inject intercept
  80.  
  81.  
  82. =====
  83. hotkey enter definition
  84. hotkey scroll by function scope up/down
  85.  
  86. =====
  87. report module install upgrade schema create new instance and save of a report (createReportFactory or something )
  88.  
  89. =
  90. https://magento.stackexchange.com/questions/158555/magento-2-update-the-price-value-in-shopping-cart-page
  91.  
  92. =
  93. order attribute shipping instructions use this class (search for examples in github)
  94. page 163 of the pdf
  95. https://github.com/magento/magento2/blob/2.3/app/code/Magento/Sales/Setup/SalesSetup.php
  96.  
Add Comment
Please, Sign In to add comment