PHPnews.io

Overview for 'tomasvotruba'

How to Traverse PHPDoc and Modify It

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…




A Tool that helps you to Migrate to ECS

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…


The Best Time to Switch Gitlab to GitHub

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…


It's not Null, it's Enum

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…