diff --git a/composer.json b/composer.json index 04d046f..d2b13c6 100644 --- a/composer.json +++ b/composer.json @@ -28,15 +28,15 @@ "laminas/laminas-http": ">=2.2" }, "require-dev": { - "friendsofphp/php-cs-fixer": "3.51.0", + "friendsofphp/php-cs-fixer": "3.64.0", "guzzlehttp/guzzle": "^7.8.1", "laminas/laminas-uri": ">=2.2", "pear/http_request2": "2.6.0", "phpmd/phpmd": "2.15.0", - "phpstan/phpstan": "1.10.59", - "phpunit/phpunit": "10.5.11", + "phpstan/phpstan": "1.12.7", + "phpunit/phpunit": "10.5.36", "phing/phing": "3.0", - "squizlabs/php_codesniffer": "3.9.0" + "squizlabs/php_codesniffer": "3.10.3" }, "autoload": { "psr-0": { diff --git a/src/VuFindHttp/HttpService.php b/src/VuFindHttp/HttpService.php index 1aef0e8..27c0568 100644 --- a/src/VuFindHttp/HttpService.php +++ b/src/VuFindHttp/HttpService.php @@ -31,6 +31,7 @@ use function get_class; use function in_array; +use function sprintf; use function strlen; /** diff --git a/tests/unit-tests/src/VuFindTest/HttpServiceTest.php b/tests/unit-tests/src/VuFindTest/HttpServiceTest.php index fbfa760..8db8500 100644 --- a/tests/unit-tests/src/VuFindTest/HttpServiceTest.php +++ b/tests/unit-tests/src/VuFindTest/HttpServiceTest.php @@ -31,6 +31,8 @@ use VuFindHttp\HttpService as Service; +use function sprintf; + /** * Proxy service unit test. * diff --git a/tests/vufind.php-cs-fixer.php b/tests/vufind.php-cs-fixer.php index 25898bc..361906b 100644 --- a/tests/vufind.php-cs-fixer.php +++ b/tests/vufind.php-cs-fixer.php @@ -5,8 +5,8 @@ ->in(__DIR__ . '/../src'); $rules = [ - '@PHP80Migration' => true, - '@PHPUnit84Migration:risky' => true, + '@PHP81Migration' => true, + '@PHPUnit100Migration:risky' => true, '@PSR12' => true, 'align_multiline_comment' => true, 'binary_operator_spaces' => [ @@ -44,8 +44,8 @@ 'no_php4_constructor' => true, 'no_singleline_whitespace_before_semicolons' => true, 'no_spaces_around_offset' => true, + 'no_unneeded_braces' => true, 'no_unneeded_control_parentheses' => true, - 'no_unneeded_curly_braces' => true, 'no_unneeded_final_method' => true, 'no_unreachable_default_argument_value' => true, 'no_unused_imports' => true, @@ -75,4 +75,5 @@ return $config->setCacheFile($cacheDir . '/.code.cache') ->setRiskyAllowed(true) ->setRules($rules) - ->setFinder($finder); + ->setFinder($finder) + ->setParallelConfig(\PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());