Skip to content

Conversation

andypost
Copy link
Contributor

@andypost andypost commented Jul 23, 2024

https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

This is only file that needs fixes, tested using

docker run --rm -v $(pwd):/mnt -w /mnt php:8.4.0alpha2-cli-alpine find . -type f -name '*.php' -exec php -l {} \; 

Description

Suggested changelog entry

Related issues/external references

Fixes #

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

PR checklist

  • I have checked there is no other PR open for the same change.
  • I have read the Contribution Guidelines.
  • I grant the project the right to include and distribute the code under the BSD-3-Clause license (and I have the right to grant these rights).
  • I have added tests to cover my changes.
  • I have verified that the code complies with the projects coding standards.
  • [Required for new sniffs] I have added XML documentation for the sniff.
@derrabus
Copy link

This change is incompatible with PHP < 7.1.

@jrfnl
Copy link
Member

jrfnl commented Jul 23, 2024

Closing as invalid.

The PHPCS test suite was already fixed months ago in #404. This file is only used with PHP < 7.1 and PHPUnit < 7, so should NOT be changed.

// PHPUnit 7 made the TestSuite run() method incompatible with
// older PHPUnit versions due to return type hints, so maintain
// two different suite objects.
$phpunit7 = false;
if (class_exists('\PHPUnit\Runner\Version') === true) {
$version = \PHPUnit\Runner\Version::id();
if (version_compare($version, '7.0', '>=') === true) {
$phpunit7 = true;
}
}
if ($phpunit7 === true) {
include_once 'TestSuite7.php';
} else {
include_once 'TestSuite.php';
}

@jrfnl jrfnl closed this Jul 23, 2024
@andypost andypost deleted the patch-1 branch July 23, 2024 08:54
@andypost
Copy link
Contributor Author

Thank you, I missed that this file is not involved in never testing

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

3 participants