Commit Graph

5 Commits

Author SHA1 Message Date
Zach Borboa fcc64db030 Fix run.sh to forward CLI args to phpunit and error on unhandled phpunit versions 2026-04-06 23:12:35 -04:00
Zach Borboa 45a7b1b671 Add methods like Curl::setGet() for each HTTP request method (#936)
* Adding methods like Curl::setGet() for each HTTP request method

Adding these methods to separate the request initialization from the
execution.

Methods added:
Curl::setDelete()
Curl::setGet()
Curl::setHead()
Curl::setOptions()
Curl::setPatch()
Curl::setPost()
Curl::setPut()
Curl::setSearch()

* Fix loading local test servers

Error message:
    +++ declare -A pids
    run_phpunit.sh: line 77: declare: -A: invalid option
    declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

Error message:
    +++ server_count=7
    +++ pids=()
    run_phpunit.sh: line 85: "7" - 1: syntax error: operand expected (error token is ""7" - 1")

* Clean up
2025-03-23 05:00:39 -04: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
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
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