Skip to content

Conversation

@Chris53897
Copy link

@Chris53897 Chris53897 commented Dec 4, 2025

PHPStan run for PHP 8.5 has a lot of warnings.
That is the reason it is disabled.

If PHP min is changed to 7.4, PHPStan could be bumped to version 2.

@mstruebing
Copy link
Member

Hey thank you for this PR! 🚀
I'm not opposed to merging this but would it be in scope of this PR to fix the warnings?

If not, if it's only warnings, should we still enable to be a least aware that there is something to do?

run: composer test
-
name: Run phpstan
if: ${{ matrix.php-version <= 8.4 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this it good idea, it should pass all PHP versions. Rather fix the issues.

@Chris53897
Copy link
Author

Chris53897 commented Dec 4, 2025 via email

@mstruebing
Copy link
Member

mstruebing commented Dec 4, 2025

Just had a look at the official PHP support site, 7.4 and even 8.0 are end of life already.

we shouldn’t worry to much about supporting unsupported PHP versions on my opinion.

https://www.php.net/supported-versions.php

what do you think @janedbal ?

@janedbal
Copy link
Contributor

janedbal commented Dec 5, 2025

We can drop old PHP if it causes issues. But it does not. PHPStan 1.12.32 works well on PHP 8.5, just upgrade it.

@Chris53897
Copy link
Author

Sorry i did not noticed that it used composer install and composer.lock needs to be regnerated.
I am not sure how to handle the warning

@mstruebing
Copy link
Member

mstruebing commented Dec 5, 2025

Something like the following could work:

$isArgvSet = array_key_exists('argv', get_defined_vars());
$args = $isArgvSet ? $argv : [];
$result = Cli::run($args);

Note: I did not do PHP for a lot of years, so there might be better ways and I did not test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants