-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
chore: update phpunit 9 => 10 and psalm 4 => 5 #368
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertDeprecationsToExceptions="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" executionOrder="defects" processIsolation="false" stopOnFailure="false"> | ||
<coverage> | ||
<include> | ||
<directory>./src/</directory> | ||
</include> | ||
<exclude> | ||
<directory suffix=".php">./src/Result/Reason</directory> | ||
</exclude> | ||
</coverage> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
executionOrder="defects" | ||
cacheDirectory=".phpunit.cache" | ||
> | ||
<coverage/> | ||
|
||
<testsuites> | ||
<testsuite name="EmailValidator Test Suite"> | ||
<directory>./tests/EmailValidator</directory> | ||
<exclude>./vendor/</exclude> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<source> | ||
<include> | ||
<directory>./src/</directory> | ||
</include> | ||
<exclude> | ||
<directory suffix=".php">./src/Result/Reason</directory> | ||
</exclude> | ||
</source> | ||
|
||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
class EmailParserTest extends TestCase | ||
{ | ||
public function emailPartsProvider() | ||
public static function emailPartsProvider() | ||
{ | ||
return [ | ||
['[email protected]', 'test', 'foo.com'], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ public function testValidMessageIDs(string $messageID) | |
$this->assertTrue($validator->isValid($messageID, new EmailLexer())); | ||
} | ||
|
||
public function validMessageIDs() : array | ||
public static function validMessageIDs() : array | ||
{ | ||
return [ | ||
['[email protected]+&%$.d'], | ||
|
@@ -38,7 +38,7 @@ public function testInvalidMessageIDs(string $messageID) | |
$this->assertFalse($validator->isValid($messageID, new EmailLexer())); | ||
} | ||
|
||
public function invalidMessageIDs() : array | ||
public static function invalidMessageIDs() : array | ||
{ | ||
return [ | ||
['example'], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ public function testEmailWithoutWarningsIsValid($email) | |
$this->assertNull($validation->getError()); | ||
} | ||
|
||
public function getValidEmailsWithoutWarnings() | ||
public static function getValidEmailsWithoutWarnings() | ||
{ | ||
return [ | ||
['[email protected]',], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ public function testValidEmails($email) | |
$this->assertTrue($this->validator->isValid($email, $this->lexer)); | ||
} | ||
|
||
public function getValidEmails() | ||
public static function getValidEmails() | ||
{ | ||
return array( | ||
['[email protected]'], | ||
|
@@ -88,7 +88,7 @@ public function testInvalidEmails($email) | |
$this->assertFalse($this->validator->isValid($email, $this->lexer)); | ||
} | ||
|
||
public function getInvalidEmails() | ||
public static function getInvalidEmails() | ||
{ | ||
return [ | ||
['[email protected] test'], | ||
|
@@ -161,7 +161,7 @@ public function testInvalidEmailsWithErrorsCheck($error, $email) | |
$this->assertEquals($error, $this->validator->getError()); | ||
} | ||
|
||
public function getInvalidEmailsWithErrors() | ||
public static function getInvalidEmailsWithErrors() | ||
{ | ||
return [ | ||
[new InvalidEmail(new NoDomainPart(), ''), 'example@'], | ||
|
@@ -203,7 +203,7 @@ public function testValidEmailsWithWarningsCheck($expectedWarnings, $email) | |
} | ||
} | ||
|
||
public function getValidEmailsWithWarnings() | ||
public static function getValidEmailsWithWarnings() | ||
{ | ||
return [ | ||
//Check if this is actually possible | ||
|
@@ -232,7 +232,7 @@ public function getValidEmailsWithWarnings() | |
]; | ||
} | ||
|
||
public function invalidUTF16Chars() | ||
public static function invalidUTF16Chars() | ||
{ | ||
return [ | ||
['example@symƒony.com'], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ public function testValidEmails($email) | |
$this->assertTrue($this->validator->isValid($email, $this->lexer)); | ||
} | ||
|
||
public function getValidEmails() | ||
public static function getValidEmails() | ||
{ | ||
return array( | ||
['â@iana.org'], | ||
|
@@ -91,7 +91,7 @@ public function testValidEmailsWithWarningsCheck($email, $expectedWarnings) | |
$this->assertEquals($expectedWarnings, $this->validator->getWarnings()); | ||
} | ||
|
||
public function getValidEmailsWithWarnings() | ||
public static function getValidEmailsWithWarnings() | ||
{ | ||
return [ | ||
['a5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@example.com', [new LocalTooLong()]], | ||
|
@@ -120,7 +120,7 @@ public function testInvalidEmails($email) | |
$this->assertFalse($this->validator->isValid($email, $this->lexer)); | ||
} | ||
|
||
public function getInvalidEmails() | ||
public static function getInvalidEmails() | ||
{ | ||
return [ | ||
['user [email protected]'], | ||
|
@@ -164,7 +164,7 @@ public function testInvalidDEmailsWithErrorsCheck($error, $email) | |
$this->assertEquals($error, $this->validator->getError()); | ||
} | ||
|
||
public function getInvalidEmailsWithErrors() | ||
public static function getInvalidEmailsWithErrors() | ||
{ | ||
return [ | ||
[new InvalidEmail(new NoLocalPart(), "@"), '@example.co.uk'], | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you explain the reasoning behind this change please?
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.
PhpUnit 10 is deprecating data providers that are not static.
sebastianbergmann/phpunit@9caafe2
https://docs.phpunit.de/en/10.0/writing-tests-for-phpunit.html#data-providers
This will trigger warnings in phpunit testruns. Some CI break with warnings.
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.
This particular change is needed to make the data provider static, that is calling this function.