Skip to content

Conversation

@spaze
Copy link
Contributor

@spaze spaze commented Nov 28, 2025

Tests are green now for all PHP versions.

Had to ignore one more PHPStan error because substr() doesn't return false anymore on PHP 8.x. The ignore can be removed once PHP 7.4 support is dropped.

PHPCS throws "Cannot assign null to property SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff::$namespacesRequiredToUse of type array in [...]php_codesniffer/src/Ruleset.php:1669"

Having it empty equals to not setting it at all, I think:
https://github.com/slevomat/coding-standard/blob/master/doc/namespaces.md#slevomatcodingstandardnamespacesreferenceusednamesonly-
@spaze spaze marked this pull request as draft November 28, 2025 23:41
…ned false

PHPStan says:

> Strict comparison using === between non-empty-string and false will always evaluate to false.

but not on PHP 7.4. Removing the `=== false` comparison then throws errors on PHP 7.4. Another option would be to drop 7.4 support :-)
@spaze spaze force-pushed the spaze/php-tests branch 2 times, most recently from 2de4730 to 33ced32 Compare November 29, 2025 00:05
@spaze spaze marked this pull request as ready for review November 29, 2025 00:07
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.

1 participant