Commit Graph

2035 Commits

Author SHA1 Message Date
dependabot[bot] 99c97ea0e5 ⬆ Bump tj-actions/changed-files from 45 to 46 (#935)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 45 to 46.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v45...v46)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-16 16:57:27 -04:00
Zach Borboa 9bd62516c2 Add badge for dependabot status 2025-03-12 06:21:48 -04:00
Zach Borboa af2cd43dd4 Fix dependabot error fecthing package manifest
Error message:
Error during file fetching; aborting: /package.json not found
dependency_file_not_found
2025-03-12 06:02:39 -04:00
github-actions[bot] 01a0e43fb6 Bump version: 11.0.4 → 11.0.5 11.0.5 2025-03-11 18:04:20 +00:00
Zach Borboa 3ff5d53552 Bump prismjs version 2025-03-08 21:16:14 -05:00
Zach Borboa 168e8624d4 Enable version updates for npm (#933) 2025-03-08 14:31:02 -05:00
Zach Borboa 41cc699798 Display summary of warnings (#932) 2025-03-08 13:44:18 -05:00
Zach Borboa 8d83782c06 Use PHPStan bleeding edge (#931) 2025-03-08 10:45:51 -05:00
Zach Borboa a64fad2a9d Fix psalm install error on future php releases (#930)
* Skip running psalm on future PHP releases

* Clean up indentation
2025-03-08 09:18:08 -05:00
Zach Borboa 58962a054e Fix PHPStan static analysis errors (#929)
* Increase PHPStan memory limit on local development

* Add emjois to test warnings and test errors

* Fix PHPStan static analysis errors

Error messages:
 ------ ------------------------------------------------------------------------------------------------------
  Line   src/Curl/Curl.php
 ------ ------------------------------------------------------------------------------------------------------
  123    Cannot unset property Curl\Curl::$curlErrorCodeConstant because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  124    Cannot unset property Curl\Curl::$curlErrorCodeConstants because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  125    Cannot unset property Curl\Curl::$curlOptionCodeConstants because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  126    Cannot unset property Curl\Curl::$effectiveUrl because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  127    Cannot unset property Curl\Curl::$rfc2616 because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  128    Cannot unset property Curl\Curl::$rfc6265 because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  129    Cannot unset property Curl\Curl::$totalTime because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  564    Cannot unset property Curl\Curl::$curlErrorCodeConstant because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  565    Cannot unset property Curl\Curl::$effectiveUrl because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
  566    Cannot unset property Curl\Curl::$totalTime because it might have hooks in a subclass.
         🪪  unset.possiblyHookedProperty
 ------ ------------------------------------------------------------------------------------------------------
2025-03-08 08:34:45 -05:00
github-actions[bot] 7dc4b9ca4f Merge pull request #928 from php-curl-class-helper/create-pull-request/patch
⬆ Update pre-commit dependencies
2025-02-27 18:33:01 +00:00
github-actions[bot] b96527cfc6 Update pre-commit dependencies 2025-02-27 18:05:04 +00:00
github-actions[bot] a56f446367 Merge pull request #927 from php-curl-class/dependabot/pip/pygithub-2.6.1
⬆ Bump pygithub from 2.6.0 to 2.6.1
2025-02-24 11:03:10 +00:00
dependabot[bot] 28bb643db8 ⬆ Bump pygithub from 2.6.0 to 2.6.1
Bumps [pygithub](https://github.com/pygithub/pygithub) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/pygithub/pygithub/releases)
- [Changelog](https://github.com/PyGithub/PyGithub/blob/v2.6.1/doc/changes.rst)
- [Commits](https://github.com/pygithub/pygithub/compare/v2.6.0...v2.6.1)

---
updated-dependencies:
- dependency-name: pygithub
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 10:34:53 +00:00
github-actions[bot] 6162edf0eb Bump version: 11.0.3 → 11.0.4 11.0.4 2025-02-20 20:42:49 +00:00
Zach Borboa 2cc50bd15e Actually increase psalm strictness (#926) 2025-02-19 22:13:10 -05:00
Zach Borboa 4cf4635e25 Increase psalm strictness (#925)
* Fix PossiblyUndefinedArrayOffset

ERROR: PossiblyUndefinedArrayOffset - ../src/Curl/Curl.php:1890:28 -
Possibly undefined array key (see https://psalm.dev/167)
                list($key, $value) = explode(':', $raw_headers[$i], 2);

* Fix PossiblyUndefinedArrayOffset

ERROR: PossiblyUndefinedArrayOffset - ../src/Curl/Curl.php:1034:28 -
Possibly undefined array key (see https://psalm.dev/167)
                list($key, $value) = explode(':', $header, 2);

* Fix PossiblyUndefinedArrayOffset

ERROR: PossiblyUndefinedArrayOffset - ../src/Curl/MultiCurl.php:465:28 -
Possibly undefined array key (see https://psalm.dev/167)
                list($key, $value) = explode(':', $header, 2);

* Fix PossiblyInvalidOperand

ERROR: PossiblyInvalidOperand - ../src/Curl/Curl.php:1407:69 - Cannot
concatenate with a int<0, max>|string (see https://psalm.dev/163)
                    echo 'Response content length (calculated): ' . $response_calculated_length . "\n";

* Fix PossiblyInvalidArgument

ERROR: PossiblyInvalidArgument - ../src/Curl/BaseCurl.php:408:34 -
Argument 2 of define expects array<array-key, mixed>|null|scalar, but
possibly different type false|resource provided (see
https://psalm.dev/092)
                define('STDERR', fopen('php://stderr', 'wb'));

* Fix ArgumentTypeCoercion

ERROR: ArgumentTypeCoercion - ../src/Curl/MultiCurl.php:956:16 -
Argument 1 of usleep expects int<0, max>, but parent type int provided
(see https://psalm.dev/193)
        usleep((int) $sleep_seconds * 1000000);

* Fix PossiblyFalseArgument

ERROR: PossiblyFalseArgument - ../src/Curl/MultiCurl.php:131:50 -
Argument 2 of file_put_contents cannot be false, possibly
array<array-key, string>|resource|string value expected (see
https://psalm.dev/104)
                    file_put_contents($filename, stream_get_contents($fh));

* Fix PossiblyFalseArgument

ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:437:49 - Argument 2
of stream_copy_to_stream cannot be false, possibly resource value
expected (see https://psalm.dev/104)
                stream_copy_to_stream($tmpfile, $fh);

ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:438:24 - Argument 1
of fclose cannot be false, possibly resource value expected (see
https://psalm.dev/104)
                fclose($fh);

* Fix PossiblyFalseArgument

ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:463:49 - Argument 2
of stream_copy_to_stream cannot be false, possibly resource value
expected (see https://psalm.dev/104)
            stream_copy_to_stream($file_handle, $main_file_handle);

ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:468:16 - Argument 1
of fclose cannot be false, possibly resource value expected (see
https://psalm.dev/104)
        fclose($main_file_handle);

* Fix PossiblyFalseArgument

ERROR: PossiblyFalseArgument - ../src/Curl/Curl.php:1891:36 - Argument 1
of count cannot be false, possibly Countable|array<array-key, mixed>
value expected (see https://psalm.dev/104)
        $raw_headers_count = count($raw_headers);

ERROR: PossiblyInvalidArrayAccess - ../src/Curl/Curl.php:1893:24 -
Cannot access array value on non-array variable $raw_headers of type
false (see https://psalm.dev/109)
            if (strpos($raw_headers[$i], ':') !== false) {

* Fix PossiblyInvalidArgument

ERROR: PossiblyInvalidArgument - ../src/Curl/Curl.php:1868:30 - Argument
2 of define expects array<array-key, mixed>|null|scalar, but possibly
different type false|resource provided (see https://psalm.dev/092)
            define('STDOUT', fopen('php://stdout', 'w'));

* Update psalm baseline
2025-02-19 21:40:56 -05:00
github-actions[bot] 4d126ef1d1 Bump version: 11.0.2 → 11.0.3 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 11.0.2 2025-02-18 18:03:57 +00:00
Zach Borboa ece27e4dba Lift restriction on Psalm version (#922) 2025-02-17 22:09:30 -05:00
Zach Borboa d05e75aa14 Check for composer installation failure (#924) 2025-02-17 20:34:41 -05:00
Zach Borboa 3348afbb1d Add pull request title flair (#921) 2025-02-17 20:21:47 -05:00
github-actions[bot] 869c7f8874 Merge pull request #920 from php-curl-class-helper/create-pull-request/patch
Update pre-commit dependencies
2025-02-18 00:23:16 +00:00
Zach Borboa 86eb0d1059 Merge branch 'master' into create-pull-request/patch 2025-02-17 18:53:56 -05:00
github-actions[bot] 81900710d0 Merge pull request #919 from php-curl-class/dependabot/pip/pygithub-2.6.0
⬆ Bump pygithub from 2.5.0 to 2.6.0
2025-02-17 23:53:19 +00:00
dependabot[bot] 277ece464f ⬆ Bump pygithub from 2.5.0 to 2.6.0
Bumps [pygithub](https://github.com/pygithub/pygithub) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/pygithub/pygithub/releases)
- [Changelog](https://github.com/PyGithub/PyGithub/blob/main/doc/changes.rst)
- [Commits](https://github.com/pygithub/pygithub/compare/v2.5.0...v2.6.0)

---
updated-dependencies:
- dependency-name: pygithub
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 23:26:06 +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] f9494a3e62 Update pre-commit dependencies 2025-02-17 18:04:47 +00:00
github-actions[bot] 2386b2a063 Merge pull request #917 from php-curl-class/dependabot/pip/scripts/cryptography-44.0.1
Bump cryptography from 43.0.1 to 44.0.1 in /scripts
2025-02-11 19:29:21 +00:00
dependabot[bot] cd97df1fc1 Bump cryptography from 43.0.1 to 44.0.1 in /scripts
Bumps [cryptography](https://github.com/pyca/cryptography) from 43.0.1 to 44.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/43.0.1...44.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-11 19:00:37 +00:00
github-actions[bot] 49f5b645b0 Merge pull request #916 from php-curl-class-helper/create-pull-request/patch
Update pre-commit dependencies
2025-01-29 18:33:53 +00:00
github-actions[bot] 736c692faa Update pre-commit dependencies 2025-01-29 18:04:54 +00:00
github-actions[bot] bd68ef889f Merge pull request #915 from php-curl-class-helper/create-pull-request/patch
Update pre-commit dependencies
2025-01-28 18:32:06 +00:00
github-actions[bot] 2e56602b04 Update pre-commit dependencies 2025-01-28 18:04:48 +00:00
github-actions[bot] 492432cb36 Merge pull request #914 from php-curl-class/dependabot/github_actions/dependabot/fetch-metadata-2.3.0
⬆ Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0
2025-01-27 09:40:53 +00:00
dependabot[bot] e713a1ef7a ⬆ Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 09:12:21 +00:00
Zach Borboa 8259795c46 Fix CI tests (psalm) (#913)
* Display psalm version being run

* Update exclusions

* Use separate configuration for PHP 7.4

* Remove temporary workaround
2025-01-26 19:22:36 -05:00
github-actions[bot] c8a7bc92f2 Bump version: 11.0.0 → 11.0.1 11.0.1 2025-01-13 18:04:13 +00:00
Zach Borboa 8cbaf60cf0 Move pre-commit configuration out of root directory (#911) 2025-01-12 15:59:05 -05:00
Zach Borboa 29cca2e48b Move some configs out of the root directory (#910)
* Move flake8 configuration out of root directory

* Move PHPStan configuration out of root directory
2025-01-12 12:39:31 -05: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
Zach Borboa 87fc9b3796 Use separate scripts to ci tests (#907)
* 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
2025-01-10 21:44:05 -05:00
Zach Borboa 55e95572fc Add flair to version bump pull requests (#906) 2025-01-10 18:35:10 -05:00
Zach Borboa ffda7c386a Add PHPStan for static analysis (#905) 2025-01-10 17:47:54 -05:00
Zach Borboa a11ecf6d7b Clean up (#904) 2025-01-09 22:30:06 -05:00
github-actions[bot] b9e9259791 Merge pull request #902 from php-curl-class/dependabot/pip/gitpython-3.1.44
Bump gitpython from 3.1.43 to 3.1.44
2025-01-02 09:30:13 +00:00
dependabot[bot] 7df3e04406 Bump gitpython from 3.1.43 to 3.1.44
Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.43 to 3.1.44.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.43...3.1.44)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-02 09:09:26 +00:00
Zach Borboa 7b22d3541d Update badge styles (#901) 2024-12-17 21:32:25 -05:00