Overview for 'tomasvotruba'
Written by Tomáš Votruba
/ Original link
on Mar. 29, 2021
Traversing and modifying PHP code is possible thanks to the amazing tool php-parser written by Nikita Popov. Rector can work thanks to node traverser, which can get to any node abstract syntax tree. Do you want to replace all numbers with 1000? I wrote about it in How to change PHP code with Abstra…
Written by Tomáš Votruba
/ Original link
on Mar. 22, 2021
Working with php-parser abstract syntax tree is fun. You can modify any node in the tree, change class method names or add new arguments. Such work requires abstract and deeply focused thinking. But sometimes, all we need is to get a method call name or constant value. That's completely different…
Written by Tomáš Votruba
/ Original link
on Mar. 15, 2021
Have you switched your Symfony configs from stringy YAML to typed PHP? If not, do it now. Here is at least 10 reasons why. Only then you'll start to notice a code smell that was there in every YAML configs. Just now, the code smell is too smelly to ignore.
Written by Tomáš Votruba
/ Original link
on Mar. 8, 2021
Do you want to use ECS but still stuck on an older coding standard tool? I wrote a post how to migrate from PHP_CodeSniffer and from PHP-CS-Fixer. But who has time to read the step-by-step manual and do manual work? Nobody. That's why today, we'll look at a tool that will handle the migration to EC…
Written by Tomáš Votruba
/ Original link
on Mar. 1, 2021
I'm known for using GitHub, a true paradise for any open-source project. But I don't have much experience with private projects pricing for this and other services like GitLab or Bitbucket. I assumed they all were at a similar price layer. After today's call with one of my clients, I've learned abo…
Written by Tomáš Votruba
/ Original link
on Feb. 22, 2021
Last weekend I got into reading a good old post Null Hell by Afilina, a fellow legacy archeologist. Null parameters are evil, which turns code into "maybe" and "just in case" conditions with ifs everywhere. I was wondering how difficult it is to get rid of nullable parameters in a project. I made…