phpstan-todo-by icon indicating copy to clipboard operation
phpstan-todo-by copied to clipboard

`// TODO php:8.5` results in `"php" version requirement ">=8.5" satisfied`

Open ruudk opened this issue 4 months ago • 3 comments

While I'm on:

php -v
PHP 8.4.11 

ruudk avatar Aug 24 '25 07:08 ruudk

Sounds like a bug. Repro and fix welcome :-)

staabm avatar Aug 24 '25 08:08 staabm

Maybe it's just this? => https://github.com/staabm/phpstan-todo-by#unexpected-php-version-requirement-xxx-satisfied-error

jdreesen avatar Aug 24 '25 22:08 jdreesen

@jdreesen That's it indeed.

I work on a library that works on PHP ^8.4. I don't want to limit newer versions, because it might just work fine. I don't like libraries that restrict newer versions for no reason.

But, I do want to add comments for myself, to indicate, that once the minimum bound goes to PHP 8.5, that I can use a newer version.

For example, I want to replace something with the new clone functionality in PHP 8.5.

So write:

// TODO: php:8.5 Use Clone with 

To me, it should then trigger, as soon as the composer.json minimum bound is ^8.5.

Or am I seeing this completely wrong 😁 ?

ruudk avatar Aug 25 '25 07:08 ruudk