Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Tomas Votruba:
Rector: Part 2 - Maturity of PHP Ecosystem and Founding Fathers
Feb 26, 2018 @ 11:23:30

Tomas Votruba has posted the second part of his Reactor series on his site today. In part one he covered some of the basics of the Ractor package (a CLI tool that provides some handy helper functions for Symfony applications). In part two he covers some of the "founding fathers" and packages that he built the package on top of.

You already know What Rector does and How it works from part 1.

It's not that PHP didn't need to be updated until 2017. I surely could delegate hundreds of upgrade-hours for my whole career. So why Now?

The post then talks about the idea of "codemod" functionality like the PHP CS Fixer that changes code to bring it up to PSR-2 compliance. It then covers the package that's one of the keys to the Reactor project, the nikic/PHP-Parser package. He talks about the read/write functionality, an example of a change it might make and finishes by thanking the "founding fathers" that made those packages available.

tagged: reactor part2 series ecosystem phpcodesniffer phpcsfixer ast nikicphpparser refactor

Link: https://www.tomasvotruba.cz/blog/2018/02/26/rector-part-2-maturity-of-php-ecocystem-and-founding-fathers/

How to configure PHPStorm to use PHP-CS-Fixer
Apr 25, 2017 @ 10:47:46

On the Hackernoon site there's a recent tutorial showing you how to hook the PHP-CS-Fixer tool into PhpStorm for easy execution during development rather than after.

The PHPStorm IDE by JetBrains is probably one of my favorite editors. It has its flaws (constant indexing…) but overall its a great tool for me. However, my focus today is not on PHPStorm per say but rather how to add the awesome functionality of using project page. Depending on your platform you will need to make some decisions, namely how you configure the rules of PHP-CS-Fixer. I am currently on Windows but I will try to make sure these instructions work in both *nix and Windows environments.

He then walks you through some prerequisites (both pieces of software installed basically) and the decisions to make based on your platform. He then provides screenshots and descriptions showing where to go in the PhpStorm IDE to add the PHP-CS-Fixer as a new "Tool", the working directory to use and how to set up a keymap to execute the tool. He includes an example of the output when things are correctly configured and working together.

tagged: configure phpstorm phpcs phpcsfixer tool tutorial install combine setup ide

Link: https://hackernoon.com/how-to-configure-phpstorm-to-use-php-cs-fixer-1844991e521f