* Use default for Psalm ensureOverrideAttribute
* Fix missing Override attributes
Error: ../src/Curl/CaseInsensitiveArray.php:66:5:
MissingOverrideAttribute: Method Curl\CaseInsensitiveArray::offsetset
should have the "Override" attribute (see https://psalm.dev/358)
* Add shims for PHPUnit
* Fix PHPUnit error: undefined method returnValue()
1) CurlTest\PHPCurlClassTest::testMock
Error: Call to undefined method CurlTest\PHPCurlClassTest::returnValue()
* Fix PHPUnit risky test by restoring error handler before exception thrown
There was 1 risky test:
1) CurlTest\PHPCurlClassTest::testRequiredOptionCurlOptReturnTransferEmitsWarningPHPUnit10Plus
Test code or tested code did not remove its own error handlers
* Fix psalm errors
* Add attributes for version constraint
* Temporarily pin psalm to fix ci
* Enable color
* Increase PHPStan strictness
* Fix static analysis error
------ --------------------------------------------------
Line src/Curl/MultiCurl.php
------ --------------------------------------------------
593 Variable $interval_seconds might not be defined.
🪪 variable.undefined
------ --------------------------------------------------
* Increase PHPStan strictness
* Fix static analysis errors
------ -----------------------------------------------------------------
Line scripts/bump_major_version.php
------ -----------------------------------------------------------------
8 Binary operation "+=" between string and 1 results in an error.
🪪 assignOp.invalid
------ -----------------------------------------------------------------
------ -----------------------------------------------------------------
Line scripts/bump_minor_version.php
------ -----------------------------------------------------------------
8 Binary operation "+=" between string and 1 results in an error.
🪪 assignOp.invalid
------ -----------------------------------------------------------------
------ -----------------------------------------------------------------
Line scripts/bump_patch_version.php
------ -----------------------------------------------------------------
8 Binary operation "+=" between string and 1 results in an error.
🪪 assignOp.invalid
------ -----------------------------------------------------------------
* Fix static analysis errors
------ --------------------------------------------------------------------------------------------------------------------
Line src/Curl/CaseInsensitiveArray.php
------ --------------------------------------------------------------------------------------------------------------------
132 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 42 on line 4
🪪 phpDoc.parseError
145 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 44 on line 4
🪪 phpDoc.parseError
158 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 41 on line 4
🪪 phpDoc.parseError
171 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 40 on line 4
🪪 phpDoc.parseError
197 PHPDoc tag @param has invalid value (void): Unexpected token "\n * ", expected variable at offset 43 on line 4
🪪 phpDoc.parseError
------ --------------------------------------------------------------------------------------------------------------------
* Fix static analysis errors
------ -----------------------------------------------------------------------------------
Line src/Curl/MultiCurl.php
------ -----------------------------------------------------------------------------------
937 Comparison operation "<" between float and (array|float|int) results in an error.
🪪 smaller.invalid
941 Comparison operation "<" between float and (array|float|int) results in an error.
🪪 smaller.invalid
------ -----------------------------------------------------------------------------------
* Increase PHPStan strictness
* Fix static analysis errors
------ -------------------------------------------
Line src/Curl/Decoder.php
------ -------------------------------------------
22 Offset '0' does not exist on list<mixed>.
🪪 offsetAccess.notFound
41 Offset '0' does not exist on list<mixed>.
🪪 offsetAccess.notFound
------ -------------------------------------------
* Run ci static analysis checks using scripts
* Clean up
* Move phpunit run to dedicated script
* Use run.sh and remove ci.sh
* Rename test scripts to be prefixed with "run_"
* Move static analysis runs to test script
* Clean up
FILE: ...e/runner/work/php-curl-class/php-curl-class/tests/PHPCurlClass/UrlTest.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
14 | WARNING | The $escape parameter must be passed when calling fgetcsv() as
| | its default value will change in a future PHP version.
| | (PHPCompatibility.ParameterValues.RemovedProprietaryCSVEscaping.DeprecatedParamNotPassed)
15 | WARNING | The $escape parameter must be passed when calling fgetcsv() as
| | its default value will change in a future PHP version.
| | (PHPCompatibility.ParameterValues.RemovedProprietaryCSVEscaping.DeprecatedParamNotPassed)
--------------------------------------------------------------------------------
Error message:
++ phpcs_to_use=vendor/bin/phpcs
++ vendor/bin/phpcs --version
PHP_CodeSniffer version 3.7.2 (stable) by Squiz (http://www.squiz.net)
++ vendor/bin/phpcs --extensions=php '--ignore=*/vendor/*' --standard=tests/ruleset.xml -p -s .
W........................................................... 60 / 116 (52%)
........................................................ 116 / 116 (100%)
FILE: ...me/runner/work/php-curl-class/php-curl-class/examples/custom.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
1 | WARNING | IMPORTANT: Please be advised that for the most
| | reliable PHPCompatibility results, PHP 7.2 or higher
| | should be used. Support for lower versions will be
| | dropped in the foreseeable future. You are currently
| | using PHP 7.0.33-65+ubuntu22.04.1+deb.sury.org+1.
| | Please upgrade your PHP installation to version 7.2 or
| | higher.
| |
| | To disable this notice, add
| | --exclude=PHPCompatibility.Upgrade.LowPHP to your
| | command or add <exclude
| | name="PHPCompatibility.Upgrade.LowPHP.BelowRecommended_7_2"/>
| | to your custom ruleset.
| |
| | Thank you for using PHPCompatibility!
| | (PHPCompatibility.Upgrade.LowPHP.BelowRecommended_7_2)
----------------------------------------------------------------------
This change attempts to determine which underlying constants were
bitmasked together to reach the resulting value passed to curl_setopt()
using Curl::setOpt().