602 Commits

Author SHA1 Message Date
github-actions[bot] 4d126ef1d1 Bump version: 11.0.2 → 11.0.3 2025-02-19 18:04:26 +00:00
Zach Borboa 056de7d13d Use default for Psalm ensureOverrideAttribute (#923)
* 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)
2025-02-18 21:49:22 -05:00
github-actions[bot] 214cfe01db Bump version: 11.0.1 → 11.0.2 2025-02-18 18:03:57 +00:00
Zach Borboa fd902b4b7c Fix CI (PHPUnit) (#918)
* 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
2025-02-17 18:24:42 -05:00
github-actions[bot] c8a7bc92f2 Bump version: 11.0.0 → 11.0.1 2025-01-13 18:04:13 +00:00
Zach Borboa bd793d1287 Increase Psalm strictness (#909)
* Increase Psalm strictness

* Fix static analysis errors

ERROR: RedundantCast - ../src/Curl/CaseInsensitiveArray.php:91:16 - Redundant cast to bool (see https://psalm.dev/262)
        return (bool) array_key_exists(strtolower($offset), $this->data);

ERROR: RedundantCast - ../src/Curl/CaseInsensitiveArray.php:138:16 - Redundant cast to int<0, max> (see https://psalm.dev/262)
        return (int) count($this->data);

ERROR: RedundantCast - ../src/Curl/CaseInsensitiveArray.php:187:16 - Redundant cast to bool (see https://psalm.dev/262)
        return (bool) (key($this->data) !== null);

ERROR: ForbiddenCode - ../src/Curl/Curl.php:1765:13 - Unsafe var_dump (see https://psalm.dev/002)
            var_dump($value);

ERROR: ForbiddenCode - ../src/Curl/Curl.php:1770:13 - Unsafe var_dump (see https://psalm.dev/002)
            var_dump($value);

ERROR: InvalidOperand - ../src/Curl/Curl.php:1816:35 - Cannot concatenate with a value-of<TArray> (see https://psalm.dev/058)
                return $k . '=' . $v;
2025-01-11 23:11:26 -05:00
Zach Borboa 634ee48552 Increase PHPStan strictness (#908)
* 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
------ -------------------------------------------
2025-01-11 21:51:30 -05:00
github-actions[bot] db6f650c47 Bump version: 10.0.1 → 11.0.0 2024-08-22 18:03:48 +00:00
github-actions[bot] 3fbd244703 Bump version: 10.0.0 → 10.0.1 2024-08-21 18:03:41 +00:00
Zach Borboa d6c8c2879b Use nullable type declaration as supported in versions >= PHP 7.1 (#882) 2024-08-20 22:09:03 -04:00
github-actions[bot] f08eb12db8 Bump version: 9.19.2 → 10.0.0 2024-08-20 18:03:54 +00:00
Zach Borboa 63bddcd230 Drop support for PHP 7.0 (#880) 2024-08-17 09:15:46 -04:00
teandr 1d05ac3511 Add public method getActiveCurls (#871) 2024-08-17 02:55:10 +00:00
github-actions[bot] c41efeb4ea Bump version: 9.19.1 → 9.19.2 2024-04-09 18:03:13 +00:00
Zach Borboa b2657f5744 Fix CI: Use nullable type declaration (#859)
* Use nullable type declaration

Fixes warning:
    FILE: ./src/Curl/CaseInsensitiveArray.php
    -------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------
     45 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update
        |         | the type to be explicitly nullable instead. Found implicitly nullable parameter:
        |         | $initial.
        |         | (PHPCompatibility.FunctionDeclarations.RemovedImplicitlyNullableParam.Deprecated)
    -------------------------------------------------------------------------------------------------

* Remove parameter type to fix PHP 7.0
2024-04-04 20:27:03 -04:00
github-actions[bot] 680afbcfd9 Bump version: 9.19.0 → 9.19.1 2024-02-27 18:03:38 +00:00
Zach Borboa b722b1516a Fix afterSend not being called (#848) 2024-02-24 08:32:22 -05:00
github-actions[bot] 8e9cd0caff Bump version: 9.18.2 → 9.19.0 2024-01-18 18:03:34 +00:00
Zach Borboa 5097545a05 Allow displaying curl option value without specifying value 2024-01-18 09:05:46 -05:00
Zach Borboa 93c5a18302 Fix PHP CS Fixer validation
Error occurred with a newer version of PHP CS Fixer being installed
(3.42.0 → 3.43.1).
2023-12-29 21:50:09 -05:00
Zach Borboa 69034d052f Wrap option string values in quotes when displaying diagnostic output 2023-10-21 06:05:18 -07:00
Zach Borboa 89ff44d667 Clean up 2023-09-22 17:14:30 -07:00
github-actions[bot] 2b8a93b37d Bump version: 9.18.1 → 9.18.2 2023-09-11 18:08:28 +00:00
Zach Borboa 4624486d56 Fix use of mb_strpos() causing error when polyfill is used
Error message:
    Uncaught ErrorException: iconv_strpos(): Detected an illegal character in input string in
    /var/www/site/vendor/symfony/polyfill-mbstring/Mbstring.php:536
2023-09-09 11:52:42 -07:00
github-actions[bot] e4e6664854 Bump version: 9.18.0 → 9.18.1 2023-08-29 18:02:47 +00:00
Zach Borboa a6e6110051 Update checks for decoding gzip-encoded responses 2023-08-29 07:01:18 -07:00
github-actions[bot] c5260b162b Bump version: 9.17.4 → 9.18.0 2023-08-28 18:02:58 +00:00
Zach Borboa 11bd600918 Rename ::setError() to ::afterSend() 2023-08-25 06:39:12 -07:00
Zach Borboa 5e5d284a9b Implement Curl::setError() and MultiCurl::setError() 2023-08-22 20:20:47 -07:00
github-actions[bot] d5542274ac Bump version: 9.17.3 → 9.17.4 2023-07-10 18:03:00 +00:00
Robin van der Vliet 94d8cf948f Replace isset with null coalescing operator (#800) 2023-07-06 20:41:38 -07:00
github-actions[bot] 96bb2ef69b Bump version: 9.17.2 → 9.17.3 2023-07-04 18:03:02 +00:00
Zach Borboa cd924d10c3 Update PHP_CodeSniffer ruleset: PSR2 → PSR12 2023-06-30 01:23:37 -07:00
Zach Borboa 9bd4776b73 Apply additional coding standards 2023-06-30 00:37:30 -07:00
github-actions[bot] 60055da5b5 Bump version: 9.17.1 → 9.17.2 2023-06-27 01:06:30 +00:00
Zach Borboa 2f532ab2b8 Merge branch 'master' into use-short-array-syntax 2023-06-26 02:57:15 -07:00
Zach Borboa 128a0c1ea2 Add PHP-CS-Fixer to check for unused imports 2023-06-24 19:33:48 -07:00
Robin van der Vliet c45f8e22de Use short array syntax 2023-06-23 19:50:18 +02:00
Robin van der Vliet c9ad23cf5c Increase uniqueness of Curl::id
Replace `uniqid` by `random_bytes` (#792)
2023-06-22 15:38:16 -07:00
github-actions[bot] 5672725591 Bump version: 9.17.0 → 9.17.1 2023-06-14 18:02:50 +00:00
Zach Borboa 945c8c9aad Merge pull request #791 from zachborboa/master
Improve and add tests for Curl::fastDownload()
2023-06-13 18:48:50 -07:00
github-actions[bot] 505c09484d Bump version: 9.16.1 → 9.17.0 2023-06-13 18:02:54 +00:00
Zach Borboa 76e74fdc44 Improve and add tests for Curl::fastDownload() 2023-06-13 02:52:59 -07:00
Zach Borboa 2bb2f32087 Make method to display curl option value public 2023-06-12 20:27:16 -07:00
github-actions[bot] 8223f13fce Bump version: 9.16.0 → 9.16.1 2023-06-12 18:02:52 +00:00
Zach Borboa 42a2062d6f Differentiate between internal options and user-set options 2023-06-11 19:52:58 -07:00
Zach Borboa 5427717469 Fix existing header overwritten after using MultiCurl::addCurl() 2023-06-08 19:18:32 -07:00
Zach Borboa 4c4bc8952a Create method to display a curl option value 2023-06-03 05:14:35 -07:00
github-actions[bot] 100a7f406d Bump version: 9.15.1 → 9.16.0 2023-05-25 18:02:49 +00:00
Zach Borboa 493d69de2c Merge pull request #783 from zachborboa/master
Graduate Curl::fastDownload()
2023-05-24 15:12:17 -07:00