Skip to content

Commit

Permalink
Update compat files from Requests v2.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Oct 11, 2024
1 parent ef847a4 commit 1db6b98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"rmccue/requests": "^1.8 || ^2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"friendsofphp/php-cs-fixer": "^3.64",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^8 || ^9 || ^10",
"yoast/phpunit-polyfills": "^2"
Expand Down
6 changes: 2 additions & 4 deletions v1-compat/InvalidArgument.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<?php
/**
* @source https://github.com/WordPress/Requests/blob/v2.0.0/src/Exception/InvalidArgument.php
*/

namespace WpOrg\Requests\Exception;

Expand All @@ -12,6 +9,7 @@
*
* @package Requests\Exceptions
* @since 2.0.0
* @source https://github.com/WordPress/Requests/blob/v2.0.12/src/Exception/InvalidArgument.php
*/
final class InvalidArgument extends InvalidArgumentException {

Expand All @@ -32,7 +30,7 @@ public static function create($position, $name, $expected, $received) {
return new self(
sprintf(
'%s::%s(): Argument #%d (%s) must be of type %s, %s given',
isset($stack[1]['class']) ? $stack[1]['class'] : '',
$stack[1]['class'],

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.0 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.1 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.3 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.2 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 7.4 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.4 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 7.4 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.0 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.3 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.1 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.2 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.

Check failure on line 33 in v1-compat/InvalidArgument.php

View workflow job for this annotation

GitHub Actions / Tests (PHP 8.4 with latest lib versions)

Offset 'class' does not exist on array{function: string, line?: int, file?: string, class?: class-string, type?: '->'|'::', args?: array, object?: object}.
$stack[1]['function'],
$position,
$name,
Expand Down

0 comments on commit 1db6b98

Please sign in to comment.