All tested with PHP 8.4 and PHP 8.3 too
Major changes:
- cube root Math (cbrt) now throws InvalidArgumentException if NAN is returned instead of returning NAN
- Byte convert from string to int will throw errors if value is too large (\LengthException)
- new flag for returning string type but for this bcmath must be installed (\RuntimeException if no bcmath)
- Updated curl class and remove close handler as not needed and deprecated as of PHP 8.5
- Curl phpunit tests: convert string to JSON convert flow for return content check (to avoid per PHP version check)
- image close handler for ImageMagick removed as not needed and deprecated as of PHP 8.5
- updated all check calls too use phive tools if possible (except phpunit) and all scripts can have dynamic php version set
change the curlRequest call to options array and build the options array
there.
Remove any options check + pre build from the get/request calls
Update phpunit tests with string type body return
Removed the parseHeaders public call, headers must be set as array
Throw errors on invalid headers before sending them: Key/Value check
Add headers invalid check in phpunit
Auth headers can be set per call and will override global settings if matching
Instead of just throwing exception on 401 auth, throw exception for any
error code from 400 on
This can be turned off with the option "http_errors" set to false
Also updaed the exception content to match 400 or 500 error type with
more information attached
General Exception error codes:
Cnnn: Curl errors (FAILURE)
Rnnn: general class errors (ERROR)
Hnnn: http response errors (ERROR)
Basic interface class to CURL calls
Open:
clean up and check code is neutral
write tests, for this we need a running localhost server for tests to request to