The check for stringlength was done on the set key range in the class var and not the variable passed on in the method.
So if we cold call randomKey with a key character list and not the default list it failed with invalid max length
Allow parsing of more flexible interval strings including
long names (day, hour, minute, second, millisecond),
negative values, no spaces between components, and
throwing exceptions on invalid input if requested.
The following types are now allowed
- d|day|days
- h|hour|hours
- m|min|mins|minute|minutes
- s|sec|secs|second|seconds
- ms|msec|msecs|msecond|mseconds|millis|millisec|millisecs|millisecond|milliseconds
Also fix the milisecond parsing that was done completly wrong
the milliseoncds where just added after a "." as decimals without converting them at all.
Now the value is divided by 1000 and added to the existing number, and as before only if ms exist
The negative check is now included in the main parse regex, so a second regex check is no longer necessary
Spaces between values, before or anywhere are now more flexible.
Exceptions are thrown if the regex cannot parse anything, or it returns only one master entry and no matches
new "-c" switch for all checking scripts to swtich to the composer version from the phive installed version
NOTE: phpstan plugins only work in the composer version.
Default is the phive version
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
The logging line number and file was for the previous call position, not for
where the actual log entry was called
Also fix for ErrorMessage class calls with shifting the start position up depending on which method is called.
Output shows file and line where the message/log call was done and the function/class method where the log call was done
On default the level for error_log write is Emergency.
This can be changed either on class creation or via set/get methods.
If logging is skipped because the logging level does not match the main logging level the error_log write is also skipped.
Added MARK fields in the Logging class
- ksortArray and sortArray
Sort array and return sorted output in one flow. Allows for case insensitve sort, reverse sort
- selectArrayFromOption
select array blocks based on a "key": "value" match.
Can do recusrive with flat or not flat output, strict matching, case insenstivie
The flat combined character can be changed
- findArraysMissingKey
Search an array for a matching value with optional key match and return array block if in this block a key (or keys) are missing
The matching for key and value is always strict, eg 2 and '2' are different,
Found path is added with ":" separators, can be overridden by parameter
- arraySearchSimple
Allow search values to be array for multiple matching (any match)
NEW:
- remove duplicates in string
- check character string list in other character string list
- build character string from array (or nested array) values
- split string with fixed split length
UPDATE:
- split string with format
* throw exceptions for wrong paramters
* remove the "split chracters", as they get extracted from the format string