Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lara_crass's avatar

lara_crass liked a comment+100 XP

3mos ago

PHP Bits: Ep 1, Visual Debt

There are two sides to this.

I agree with the concept that is being introduced and think that sometimes things are done on a purist idea of these are the 'rules' and we should do it this way.

Some of the examples, as others have pointed out, actually go beyond what is nice and become a key part of what a modern application needs. Data types have been optional for a long time and PHP has probably suffered because of this. Removing them because you can is like saying 'we've managed without seat belts in cars for years - hey why bother!' (IMHO).

lara_crass's avatar

lara_crass liked a comment+100 XP

3mos ago

PHP Bits: Ep 1, Visual Debt

I strongly disagree on removing the type hinting. You shouldn't have to extrapolate from the code in the function what to pass it and what you'll get back. By removing these type hints you're doing the exact opposite of your stated goal for this lesson.

The type hinting reduces the cognitive overhead of determining parameter and return types, which is especially useful in large and complex applications, which are where reducing cognitive overhead matters the most. Further, it reduces programmer error and enables modern IDEs to offer better inspections to catch errors while writing.

lara_crass's avatar

lara_crass liked a comment+100 XP

3mos ago

Insert data during migration

I know that this is a very old post, but I want to share my point. Beyond the discussion of whether it's a good or bad practice, let's think together. In the migration process, perhaps you want to reverse the changes. So, by writing the insertion commands inside the migration, you can write some logic to reverse the changes. What you can't do in Seed in a practical way.