Skip to content

Commit 94e9f35

Browse files
pl-githubtemp
authored andcommitted
fix: Drop thecodingmachine/safe < 2.0 support
1 parent 02a70b7 commit 94e9f35

24 files changed

+27
-27
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "MIT",
66
"require": {
77
"php": "^8.1",
8-
"thecodingmachine/safe": "^1.3|^2.0"
8+
"thecodingmachine/safe": "^2.0"
99
},
1010
"require-dev": {
1111
"ext-dom": "*",

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ parameters:
88
- tests/bootstrap.php
99
- src/HttpClientMock/CallbackHandler.php # needed because of unknown classes when installed with monolog 2.x
1010
- src/HttpClientMock/LegacyCallbackHandler.php # needed because of unknown classes when installed with monolog 2.x
11-
- src/ZipContents/ZipContents.php # remove after updating to thecodingmachine/safe >= 2.0
1211
ignoreErrors:
1312
- '#Constructor in .* has parameter .* with default value#'
1413
- '#In method "Brainbits\\FunctionalTestHelpers\\Snapshot\\IsXml::.*", caught "Throwable" must be rethrown. Either catch a more specific exception or add a "throw" clause in the "catch" block to propagate the exception.#'
@@ -18,6 +17,7 @@ parameters:
1817
- '#Method Brainbits\\FunctionalTestHelpers\\Tests\\Request\\RequestTraitTest::.*\(\) is protected, but since the containing class is final, it can be private#'
1918
- '#Method Brainbits\\FunctionalTestHelpers\\Tests\\Uuid\\UuidTraitTest::.*\(\) is protected, but since the containing class is final, it can be private#'
2019
- '#Method Brainbits\\FunctionalTestHelpers\\Tests\\ZipContents\\ZipContentsTraitTest::.*\(\) is protected, but since the containing class is final, it can be private#'
20+
- '#Safe\\DateTimeImmutable#'
2121
ergebnis:
2222
noNullableReturnTypeDeclaration:
2323
enabled: false

src/HttpClientMock/CallStack.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use function array_map;
1212
use function array_merge;
1313
use function count;
14-
use function Safe\sprintf;
14+
use function sprintf;
1515

1616
use const PHP_EOL;
1717

src/HttpClientMock/Exception/AddMockResponseFailed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Brainbits\FunctionalTestHelpers\HttpClientMock\MockRequestBuilder;
88
use RuntimeException;
99

10-
use function Safe\sprintf;
10+
use function sprintf;
1111

1212
use const PHP_EOL;
1313

src/HttpClientMock/Exception/InvalidMockRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use RuntimeException;
88

9-
use function Safe\sprintf;
9+
use function sprintf;
1010

1111
final class InvalidMockRequest extends RuntimeException implements HttpClientMockException
1212
{

src/HttpClientMock/Exception/NoMatchingMockRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Brainbits\FunctionalTestHelpers\HttpClientMock\MockRequestMatch;
99
use RuntimeException;
1010

11-
use function Safe\sprintf;
11+
use function sprintf;
1212

1313
use const PHP_EOL;
1414

src/HttpClientMock/Exception/NoResponseMock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Brainbits\FunctionalTestHelpers\HttpClientMock\MockRequestBuilder;
88
use RuntimeException;
99

10-
use function Safe\sprintf;
10+
use function sprintf;
1111

1212
use const PHP_EOL;
1313

src/HttpClientMock/Exception/NoUriConfigured.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use RuntimeException;
88

9-
use function Safe\sprintf;
9+
use function sprintf;
1010

1111
final class NoUriConfigured extends RuntimeException implements HttpClientMockException
1212
{

src/HttpClientMock/HttpClientMockTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
use function assert;
1919
use function class_exists;
20-
use function Safe\sprintf;
20+
use function sprintf;
2121
use function ucfirst;
2222

2323
/** @mixin TestCase */

src/HttpClientMock/MockRequestBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
use function Safe\json_encode;
3131
use function Safe\preg_match;
3232
use function Safe\simplexml_load_string;
33-
use function Safe\sprintf;
34-
use function Safe\substr;
33+
use function sprintf;
3534
use function str_contains;
3635
use function str_repeat;
3736
use function str_replace;
3837
use function strpos;
3938
use function strtolower;
39+
use function substr;
4040
use function trim;
4141
use function ucwords;
4242
use function urldecode;

0 commit comments

Comments
 (0)