All Notable changes to support
will be documented in this file
- support for PHP8
- Updated dependencies
- Updated dependencies
- added str_contains_array
- now str_contains is provided by Symfony\Polyfill\Php80 but the function is maintained for backwards compatibility.
- sanitize_filename now use str_contains_array function
- fix array_get() and array_set().
- getFileMimeType(): get the mime type string of a file using more strategies or return FALSE if it fails.
- getFileMimeTypeByFileInfo(): get File MimeType string using the newer PHP finfo functions.
- getFileMimeTypeByOSFileCommand(): get File MimeType string using the OS' file command. AFAIK that's only available on *NIX systems.
- getImageMimeTypeByExif_imagetype(): get image MimeType string of image using exif_imagetype.
- slugify: remove degrees and math power char.
- fixed test for XMLTest and Vat Validator
- added compatibility with Nesbot/Carbon 2.x
- firstStringBetween(): Returns the first string there is between the strings from the parameter start and end.
- format_money(): Fix white space when no simbol passed.
- small refactor (remove unused code) in getCoutryCodeByVatNumberTest.
- getCoutryCodeByVatNumberTest($val, $fallback): Try to extract EU country code in Vat number return $fallback if it fails.
- small refactor
- isPiva and IsVatNumber was removed in favour to new functions: isEuVatNumber, isVATRegisteredInVies, isITVat.
- isVATRegisteredInVies() : Validate a European VAT number using the EU commission VIES service to verify if VAT number is authorized to carry out intra-Community operations must use the service.
- isITVat() : Check Italian Vat Number (Partita IVA).
- isEuVatNumber() : Check if a valid EU vat given against specific EU country vat rules (at the moment only for italy) and optionally check the EU VIES service.
- isMobile(): Fix when some bot has no $_SERVER['HTTP_USER_AGENT'].
- isNullOrEmpty(): Fix when subject is not a scalar.
- isNullOrEmpty(): Fix when int or double or bool arg passed instead of string.
- curl(): Fix $url when methods is GET and url passed with querystring.
- gzCompressFile(): GZIPs a file on disk (appending .gz to the name) without read all source file in memory.
- bytes2HumanSize(): add param int $decimals [optional] default 0. Sets the number of decimal points.
- decbin32(): to ensure that the binary strings are padded with zeros out to 32 characters.
- ipInRange(): Function to determine if an IP is located in a specific range as specified via several alternative formats.
- isRequestFromCloudFlare(): check if request (by given $_SERVER) is a cloudflare request.
- isCloudFlareIp(): check if given ip is a valid cloudflare ip.
- FIX unterminated entity reference php in SimpleXMLElement->addChild. See http://stackoverflow.com/questions/17027043/unterminated-entity-reference-php.
- ADD $prepend option in format_money and format_euro. If $prepend true (default) prefix with $simbol, otherwise suffix with $simbol.
- FIX in normalizeUtf8String() when Normalizer class not exists.
- isIntegerZero() : Check if the value (int, float or string) is a integer and equals to zero.
- isIntegerNegative() : Check if the value (int, float or string) is a integer and less than zero.
- isIntegerNegativeOrZero() : Check if the value (int, float or string) is a integer and less than zero or equals to zero.
- isIntBool() : Check if the value is a integer/string 0 or 1.
- isNumeric() : Determine if the provided value contains only numeric characters with or without(default) sign.
- isNumericWithSign() : Determine if the provided value contains only numeric characters with sign.
- isNumericWithoutSign() : Determine if the provided value contains only numeric characters without sign.
- isDateZeroIta() : Check if string is 00/00/0000
- isTimeZeroIta() : Check if string is 00:00:00
- isDateTimeZeroIta() : Check if string is '00/00/0000 00:00:00'
- isDateOrDateZeroIta() : Check if string is dd/mm/YYYY and valid date or 00/00/0000
- isDateTimeOrDateTimeZeroIta() : Check if string is 'dd/mm/YYYY HH:ii:ss' and valid date or '00/00/0000 00:00:00'
- get_os_architecture() : Get the OS architecture 32 or 64 bit.
- is_32bit() : Check if the OS architecture is 32bit.
- is_64bit() : Check if the OS architecture is 64bit.
- sanitize_phone() : Sanitize the string by removing illegal characters from phone numbers.
- Update gravatar API.
- template.
- normalizerUtf8Safe() : small refactor, using array_walk insted of loop.
- normalizerUtf8Safe() : Normalize uft8 to various form with php normalizer function if exists, otherwise return original string.
- small changes and refactor (scrutinizer advice).
- slugify() : Generate a URL friendly "slug" from a given string.
- array_remove_columns() : Remove given column from the subarrays of a two dimensional array.
- array_remove_first_columns() : Remove first column from the subarrays of a two dimensional array.
- array_remove_last_columns() : Remove last column from the subarrays of a two dimensional array.
- getConsoleColorTagForStatusCode() : Get the color tag for the given status code to be use in symfony/laravel console.
- normalizeUtf8String() : now has more power and run with or without PHP Normalizer class.
- isIPv4Compatibility() : Check if a string is a valid IP v4 compatibility (ffff:ffff:ffff:ffff.192.168.0.15).
- anonimizeIpv4() : masquerade last digit of IPv4 address.
- anonimizeIpv4Compatibility() : masquerade last digit of IPv4 compatibility address.
- anonimizeIpv6() : masquerade last digit of IPv6 address.
- anonimizeIpWithInet() : masquerade last digit of IP address with inet php function.
- expandIPv6Notation(): * Replace '::' with appropriate number of ':0'
- anonimizeIp(): now support ipv6 and ipv4 compatibility.
- starts_with
- starts_with_insensitive
- array_get
SANITIZE:
- she() : Escape Shell argument.
- one unit test.
STRING:
- str_word_count_utf8 ARRAY:
- insert_at_top HELPER:
- windows_os
STRING:
- str_replace_multiple_space now accept new optional argument to replace VALIDATION:
- isTimeIso: check if string format is ok but number is out of range of valid date (i.e.: 24:88:99 is now return false).
VALIDATION:
- isDateZeroIso
- isTimeZeroIso
- isDateTimeZeroIso
- isDateOrDateZeroIso
- isDateTimeOrDateTimeZeroIso
ADDED functions:
- template
- randomChance
- getExceptionTraceAsString
- csse
- attre
- isPercent
- getClassNameFromFile
- getNamespaceFromFile
- getPhpDefinitionsFromFile
FIXED:
- dateItaToIso
ADDED functions:
- isInRange
- isDay
- isMonth
- isJewishLeapYear
- betweenDateIso
- betweenDateIta add more tests.
CHANGES functions:
- refactor of arrayToObject and arrayToObject tests.
ADD functions:
- cal_days_in_month
- cal_days_in_current_month
- days_in_month
- days_in_current_month
ADD functions:
- ampm
- ampm2Number
- fuzzySpan
- unixTimestamp2dos
- dos2unixTimestamp
- isImageExtension
- getImageExtensions
- starts_with_insensitive
- str_contains_insensitive
- str_finish_insensitive
- ends_with_insensitive
- getReferer
- getCurrentUrlPageName
- getCurrentUrlQuerystring
- getCurrentUrlDirName
- etCurrentUrlDirAbsName
- str_html_compress
- isZlibOutputCompressionActive
- isZlibLoaded
- isClientAcceptGzipEncoding
- compressHtmlPage
- get_http_response_code
- url_exists
- isNullOrEmptyArrayKey
- isNotNullOrEmptyArrayKey
- isNotNullOrEmptyArray
- startLayoutCapture
- endLayoutCapture
- get_var_dump_output
- logToFile
- curl_internal_server_behind_load_balancer
- isHttps now support HTTP_X_FORWARDED_PROTO
- isNullOrEmpty now have a withTrim option
- isNotNullOrEmpty now have a withTrim option
- curl(): add more power to curl function!
- ADD new functions: constants, objectToArray, getFaviconUrl, str_limit now have an option to preserve words, number to word and time to word functions, isMail now ha an option to check MX record is valid, .
- ADD many unit test.
- CHANGE small refactoring.
- CHANGE readme: add a full list of functions and constants.
- FIX rgb2hex.
- CHANGE add if(!function_exists()) for some existing laravel functions and others to skip conflict.
- ADD PHP 7.1 support.
- ADD sanitize helpers.
- ADD new validation helpers.
- ADD new helpers.
- CHANGE small changes and refactor.
- ADD IP helpers.
- ADD getClientIp() by small refactor of Synfony functions with unit test.
- CHANGE mark OBSOLETE getIPVisitor().
- ADD isVATRegisteredInVies().Validate a European VAT number using the EU commission VIES service with soap.
- ADD xml2array() and array2xml().
- ADD generateRandomPassword().
- ADD some new helpers.
- ADD sensiolabs_security_checker in scrutinizer config.
- FIX in xmlUrl2array.
- COMMENT ocular code-coverage:upload to scritinizer in travis config.
- FIX isFloatingPoint()
- ADD more helpers.
- Initial release