New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the codebase to PHP 8.1 #6747
base: 5.1
Are you sure you want to change the base?
Conversation
private function absolutePath(string $path): string | ||
{ | ||
if ((str_starts_with($path, '/')) or (strpos($path, ':') === 1)) { // absolute path | ||
return $path; | ||
} | ||
return Configuration::outputDir() . $path; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this function since it seems that it is not used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What version is it going to be? 5.2.0? 6.0.0?
I think that 5.1 branch should stay compatible with PHP 8.0 in cases there is some critical bug that must be fixed.
@@ -36,7 +36,7 @@ public function testFunctionForStrippingClassNames() | |||
$matches = []; | |||
$this->assertSame(1, preg_match('#\\\?(\w*?Helper)$#', '\\Codeception\\Module\\UserHelper', $matches)); | |||
$this->assertSame('UserHelper', $matches[1]); | |||
$this->assertSame(1, preg_match('#\\\?(\w*?Helper)$#', 'UserHelper', $matches)); | |||
$this->assertSame(1, preg_match('#\\\?(\w*?Helper)$#', 'UserHelper', $matches)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must be an accident :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it was, well seen, thank you.
if (method_exists($this->filter->getFilter(), 'isExcluded')) { | ||
//php-code-coverage 9+ | ||
$filterMethod = 'isExcluded'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getFilterMethod
wrapper can be eliminated,
php-code-coverage 9.0 is used by PHPUnit ^9.3 and Codeception 5 has never supported anything older than 9.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@Naktibalda In my PR for the command folder I also had to move the minimum version of Symfony to 5.4. I don't plan to add any breaking changes, I'm just going to remove inconsistencies in the code where I find them or rewrite small pieces of code for some simpler or more modern alternative from a Symfony or PHP version point of view. |
I cherry-picked the commit from my other PR (#6746) to demonstrate that the tests run correctly.
I will delete it as soon as it is merged.
This PR should be merged with the Squash and merge strategy.