-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 dependency phpunit/phpunit to v10 #67
Conversation
979e72b
to
b013ad8
Compare
b013ad8
to
7c264f7
Compare
efc3581
to
49d0b97
Compare
49d0b97
to
51c5dbf
Compare
0bcea3f
to
7cd5bb3
Compare
| datasource | package | from | to | | ---------- | --------------- | ------ | ------ | | packagist | phpunit/phpunit | 9.6.13 | 10.4.2 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Aleksei Khudiakov <aleksey@xerkus.pro>
7cd5bb3
to
407c3f5
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. ⚠ Warning: custom changes will be lost. |
Signed-off-by: Aleksei Khudiakov <aleksey@xerkus.pro>
407c3f5
to
1909ba2
Compare
Signed-off-by: Aleksei Khudiakov <aleksey@xerkus.pro>
$consecutiveArguments[] = self::callback(static function (string $argument) use ($information): bool { | ||
return preg_match( | ||
sprintf('/%s/', preg_quote($argument, '/')), | ||
$information | ||
) !== false; | ||
}); | ||
} | ||
|
||
$consecutive = new class ($consecutiveArguments) extends Constraint { | ||
/** | ||
* @param list<Constraint> $assertions | ||
*/ | ||
public function __construct(private array $assertions) | ||
{ | ||
$this->assertions[] = new IsAnything(); | ||
} | ||
|
||
public function matches(mixed $other): bool | ||
{ | ||
$assertion = current($this->assertions); | ||
next($this->assertions); | ||
return $assertion->matches($other); | ||
} | ||
|
||
public function toString(): string | ||
{ | ||
return current($this->assertions)->toString(); | ||
} | ||
}; | ||
|
||
$this->io | ||
->expects(self::exactly(count($consecutiveArguments))) | ||
->method('write') | ||
->withConsecutive(...$consecutiveArguments); | ||
->with($consecutive); |
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 would like to draw attention to this part implementing constraint replacement for removed withConsecutive()
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 think this approach is fine: we're recording stuff, then verifying order at the end.
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 one essentially a custom constraint composing actual constraints and iterating over them on consecutive invocations. If phpunit decides to call constraint multiple times in the future for whatever reason this will break but it is fairly unlikely.
Unlike withConsecutive()
this constraint can match only one parameter but here that is exactly what is needed.
I took this approach over willReturnCallback()
since I want mock object to record assertion failures as it normally does instead of risking them getting caught by try-catch somewhere in the tested call stack.
This PR contains the following updates:
^9.5.26
->^10.0.0
Release Notes
sebastianbergmann/phpunit (phpunit/phpunit)
v10.4.2
Compare Source
v10.4.1
Compare Source
v10.4.0
Compare Source
v10.3.5
Compare Source
v10.3.4
Compare Source
v10.3.3
Compare Source
v10.3.2
Compare Source
v10.3.1
Compare Source
v10.3.0
Compare Source
v10.2.7
Compare Source
v10.2.6
Compare Source
v10.2.5
Compare Source
v10.2.4
Compare Source
v10.2.3
Compare Source
v10.2.2
Compare Source
v10.2.1
Compare Source
v10.2.0
Compare Source
v10.1.3
Compare Source
v10.1.2
Compare Source
v10.1.1
Compare Source
v10.1.0
Compare Source
v10.0.19
Compare Source
v10.0.18
Compare Source
v10.0.17
Compare Source
v10.0.16
Compare Source
v10.0.15
Compare Source
v10.0.14
Compare Source
v10.0.13
Compare Source
v10.0.12
Compare Source
v10.0.11
Compare Source
v10.0.10
Compare Source
v10.0.9
Compare Source
v10.0.8
Compare Source
v10.0.7
Compare Source
v10.0.6
Compare Source
v10.0.5
Compare Source
v10.0.4
Compare Source
v10.0.3
Compare Source
v10.0.2
Compare Source
v10.0.1
Compare Source
v10.0.0
Compare Source
v9.6.13
Compare Source
v9.6.12
Compare Source
v9.6.11
Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Read more information about the use of Renovate Bot within Laminas.