summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/deprecated
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/thecodingmachine/safe/deprecated')
-rw-r--r--vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php11
-rw-r--r--vendor/thecodingmachine/safe/deprecated/Exceptions/LibeventException.php11
-rw-r--r--vendor/thecodingmachine/safe/deprecated/Exceptions/MssqlException.php11
-rw-r--r--vendor/thecodingmachine/safe/deprecated/Exceptions/MysqliException.php11
-rw-r--r--vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php15
-rw-r--r--vendor/thecodingmachine/safe/deprecated/Exceptions/StatsException.php11
-rw-r--r--vendor/thecodingmachine/safe/deprecated/apc.php238
-rw-r--r--vendor/thecodingmachine/safe/deprecated/array.php301
-rw-r--r--vendor/thecodingmachine/safe/deprecated/datetime.php36
-rw-r--r--vendor/thecodingmachine/safe/deprecated/functionsList.php71
-rw-r--r--vendor/thecodingmachine/safe/deprecated/libevent.php496
-rw-r--r--vendor/thecodingmachine/safe/deprecated/mssql.php426
-rw-r--r--vendor/thecodingmachine/safe/deprecated/mysqli.php22
-rw-r--r--vendor/thecodingmachine/safe/deprecated/password.php127
-rw-r--r--vendor/thecodingmachine/safe/deprecated/stats.php108
-rw-r--r--vendor/thecodingmachine/safe/deprecated/strings.php677
16 files changed, 0 insertions, 2572 deletions
diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php
deleted file mode 100644
index f344490d8..000000000
--- a/vendor/thecodingmachine/safe/deprecated/Exceptions/ApcException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class ApcException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/LibeventException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/LibeventException.php
deleted file mode 100644
index e1df31b77..000000000
--- a/vendor/thecodingmachine/safe/deprecated/Exceptions/LibeventException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class LibeventException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/MssqlException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/MssqlException.php
deleted file mode 100644
index 814bd4e0b..000000000
--- a/vendor/thecodingmachine/safe/deprecated/Exceptions/MssqlException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class MssqlException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/MysqliException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/MysqliException.php
deleted file mode 100644
index 4cadf6ca1..000000000
--- a/vendor/thecodingmachine/safe/deprecated/Exceptions/MysqliException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class MysqliException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php
deleted file mode 100644
index 9c183b8e4..000000000
--- a/vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-namespace Safe\Exceptions;
-
-/**
- * @deprecated This exception is deprecated
- */
-class PasswordException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/StatsException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/StatsException.php
deleted file mode 100644
index f8a7f45c2..000000000
--- a/vendor/thecodingmachine/safe/deprecated/Exceptions/StatsException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class StatsException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/apc.php b/vendor/thecodingmachine/safe/deprecated/apc.php
deleted file mode 100644
index 7930432c6..000000000
--- a/vendor/thecodingmachine/safe/deprecated/apc.php
+++ /dev/null
@@ -1,238 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\ApcException;
-
-/**
- * Retrieves cached information and meta-data from APC's data store.
- *
- * @param string $cache_type If cache_type is "user",
- * information about the user cache will be returned.
- *
- * If cache_type is "filehits",
- * information about which files have been served from the bytecode cache
- * for the current request will be returned. This feature must be enabled at
- * compile time using --enable-filehits.
- *
- * If an invalid or no cache_type is specified, information about
- * the system cache (cached files) will be returned.
- * @param bool $limited If limited is TRUE, the
- * return value will exclude the individual list of cache entries. This
- * is useful when trying to optimize calls for statistics gathering.
- * @return array Array of cached data (and meta-data)
- * @throws ApcException
- *
- */
-function apc_cache_info(string $cache_type = '', bool $limited = false): array
-{
- error_clear_last();
- $result = \apc_cache_info($cache_type, $limited);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * apc_cas updates an already existing integer value if the
- * old parameter matches the currently stored value
- * with the value of the new parameter.
- *
- * @param string $key The key of the value being updated.
- * @param int $old The old value (the value currently stored).
- * @param int $new The new value to update to.
- * @throws ApcException
- *
- */
-function apc_cas(string $key, int $old, int $new): void
-{
- error_clear_last();
- $result = \apc_cas($key, $old, $new);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
-}
-
-
-/**
- * Stores a file in the bytecode cache, bypassing all filters.
- *
- * @param string $filename Full or relative path to a PHP file that will be compiled and stored in
- * the bytecode cache.
- * @param bool $atomic
- * @return mixed Returns TRUE on success.
- * @throws ApcException
- *
- */
-function apc_compile_file(string $filename, bool $atomic = true)
-{
- error_clear_last();
- $result = \apc_compile_file($filename, $atomic);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Decreases a stored integer value.
- *
- * @param string $key The key of the value being decreased.
- * @param int $step The step, or value to decrease.
- * @param bool|null $success Optionally pass the success or fail boolean value to
- * this referenced variable.
- * @return int Returns the current value of key's value on success
- * @throws ApcException
- *
- */
-function apc_dec(string $key, int $step = 1, ?bool &$success = null): int
-{
- error_clear_last();
- $result = \apc_dec($key, $step, $success);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * define is notoriously slow. Since the main benefit of
- * APC is to increase the performance of scripts/applications, this mechanism
- * is provided to streamline the process of mass constant definition. However,
- * this function does not perform as well as anticipated.
- *
- * For a better-performing solution, try the
- * hidef extension from PECL.
- *
- * @param string $key The key serves as the name of the constant set
- * being stored. This key is used to retrieve the
- * stored constants in apc_load_constants.
- * @param array $constants An associative array of constant_name =&gt; value
- * pairs. The constant_name must follow the normal
- * constant naming rules.
- * value must evaluate to a scalar value.
- * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive;
- * i.e. CONSTANT and Constant
- * represent different values. If this parameter evaluates to FALSE the
- * constants will be declared as case-insensitive symbols.
- * @throws ApcException
- *
- */
-function apc_define_constants(string $key, array $constants, bool $case_sensitive = true): void
-{
- error_clear_last();
- $result = \apc_define_constants($key, $constants, $case_sensitive);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
-}
-
-
-/**
- * Deletes the given files from the opcode cache.
- *
- * @param mixed $keys The files to be deleted. Accepts a string,
- * array of strings, or an APCIterator
- * object.
- * @return mixed Returns TRUE on success.
- * Or if keys is an array, then
- * an empty array is returned on success, or an array of failed files
- * is returned.
- * @throws ApcException
- *
- */
-function apc_delete_file($keys)
-{
- error_clear_last();
- $result = \apc_delete_file($keys);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Removes a stored variable from the cache.
- *
- * @param string|string[]|\APCIterator $key The key used to store the value (with
- * apc_store).
- * @throws ApcException
- *
- */
-function apc_delete($key): void
-{
- error_clear_last();
- $result = \apc_delete($key);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
-}
-
-
-/**
- * Increases a stored number.
- *
- * @param string $key The key of the value being increased.
- * @param int $step The step, or value to increase.
- * @param bool|null $success Optionally pass the success or fail boolean value to
- * this referenced variable.
- * @return int Returns the current value of key's value on success
- * @throws ApcException
- *
- */
-function apc_inc(string $key, int $step = 1, ?bool &$success = null): int
-{
- error_clear_last();
- $result = \apc_inc($key, $step, $success);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Loads a set of constants from the cache.
- *
- * @param string $key The name of the constant set (that was stored with
- * apc_define_constants) to be retrieved.
- * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive;
- * i.e. CONSTANT and Constant
- * represent different values. If this parameter evaluates to FALSE the
- * constants will be declared as case-insensitive symbols.
- * @throws ApcException
- *
- */
-function apc_load_constants(string $key, bool $case_sensitive = true): void
-{
- error_clear_last();
- $result = \apc_load_constants($key, $case_sensitive);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
-}
-
-
-/**
- * Retrieves APC's Shared Memory Allocation information.
- *
- * @param bool $limited When set to FALSE (default) apc_sma_info will
- * return a detailed information about each segment.
- * @return array Array of Shared Memory Allocation data; FALSE on failure.
- * @throws ApcException
- *
- */
-function apc_sma_info(bool $limited = false): array
-{
- error_clear_last();
- $result = \apc_sma_info($limited);
- if ($result === false) {
- throw ApcException::createFromPhpError();
- }
- return $result;
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/array.php b/vendor/thecodingmachine/safe/deprecated/array.php
deleted file mode 100644
index 691ea7394..000000000
--- a/vendor/thecodingmachine/safe/deprecated/array.php
+++ /dev/null
@@ -1,301 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\ArrayException;
-
-/**
- * array_replace_recursive replaces the values of
- * array with the same values from all the following
- * arrays. If a key from the first array exists in the second array, its value
- * will be replaced by the value from the second array. If the key exists in the
- * second array, and not the first, it will be created in the first array.
- * If a key only exists in the first array, it will be left as is.
- * If several arrays are passed for replacement, they will be processed
- * in order, the later array overwriting the previous values.
- *
- * array_replace_recursive is recursive : it will recurse into
- * arrays and apply the same process to the inner value.
- *
- * When the value in the first array is scalar, it will be replaced
- * by the value in the second array, may it be scalar or array.
- * When the value in the first array and the second array
- * are both arrays, array_replace_recursive will replace
- * their respective value recursively.
- *
- * @param array $array The array in which elements are replaced.
- * @param array $replacements Arrays from which elements will be extracted.
- * @return array Returns an array.
- * @throws ArrayException
- *
- */
-function array_replace_recursive(array $array, array ...$replacements): array
-{
- error_clear_last();
- if ($replacements !== []) {
- $result = \array_replace_recursive($array, ...$replacements);
- } else {
- $result = \array_replace_recursive($array);
- }
- if ($result === null) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
-
-/**
- * array_replace replaces the values of
- * array with values having the same keys in each of the following
- * arrays. If a key from the first array exists in the second array, its value
- * will be replaced by the value from the second array. If the key exists in the
- * second array, and not the first, it will be created in the first array.
- * If a key only exists in the first array, it will be left as is.
- * If several arrays are passed for replacement, they will be processed
- * in order, the later arrays overwriting the previous values.
- *
- * array_replace is not recursive : it will replace
- * values in the first array by whatever type is in the second array.
- *
- * @param array $array The array in which elements are replaced.
- * @param array $replacements Arrays from which elements will be extracted.
- * Values from later arrays overwrite the previous values.
- * @return array Returns an array.
- * @throws ArrayException
- *
- */
-function array_replace(array $array, array ...$replacements): array
-{
- error_clear_last();
- if ($replacements !== []) {
- $result = \array_replace($array, ...$replacements);
- } else {
- $result = \array_replace($array);
- }
- if ($result === null) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
-
-/**
- * array_flip returns an array in flip
- * order, i.e. keys from array become values and values
- * from array become keys.
- *
- * Note that the values of array need to be valid
- * keys, i.e. they need to be either integer or
- * string. A warning will be emitted if a value has the wrong
- * type, and the key/value pair in question will not be included
- * in the result.
- *
- * If a value has several occurrences, the latest key will be
- * used as its value, and all others will be lost.
- *
- * @param array $array An array of key/value pairs to be flipped.
- * @return array Returns the flipped array on success.
- * @throws ArrayException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function array_flip(array $array): array
-{
- error_clear_last();
- $result = \array_flip($array);
- if ($result === null) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
-
-/**
- * This function sorts an array such that array indices maintain their
- * correlation with the array elements they are associated with.
- *
- * This is used mainly when sorting associative arrays where the actual
- * element order is significant.
- *
- * @param array $array The input array.
- * @param int $sort_flags You may modify the behavior of the sort using the optional parameter
- * sort_flags, for details see
- * sort.
- * @throws ArrayException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function arsort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \arsort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-/**
- * This function sorts an array such that array indices maintain
- * their correlation with the array elements they are associated
- * with. This is used mainly when sorting associative arrays where
- * the actual element order is significant.
- *
- * @param array $array The input array.
- * @param int $sort_flags You may modify the behavior of the sort using the optional
- * parameter sort_flags, for details
- * see sort.
- * @throws ArrayException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- */
-function asort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \asort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-/**
- * Sorts an array by key in reverse order, maintaining key to data
- * correlations. This is useful mainly for associative arrays.
- *
- * @param array $array The input array.
- * @param int $sort_flags You may modify the behavior of the sort using the optional parameter
- * sort_flags, for details see
- * sort.
- * @throws ArrayException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function krsort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \krsort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-/**
- * Sorts an array by key, maintaining key to data correlations. This is
- * useful mainly for associative arrays.
- *
- * @param array $array The input array.
- * @param int $sort_flags You may modify the behavior of the sort using the optional
- * parameter sort_flags, for details
- * see sort.
- * @throws ArrayException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function ksort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \ksort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-/**
- * This function sorts an array. Elements will be arranged from
- * lowest to highest when this function has completed.
- *
- * @param array $array The input array.
- * @param int $sort_flags The optional second parameter sort_flags
- * may be used to modify the sorting behavior using these values:
- *
- * Sorting type flags:
- *
- *
- * SORT_REGULAR - compare items normally;
- * the details are described in the comparison operators section
- *
- *
- * SORT_NUMERIC - compare items numerically
- *
- *
- * SORT_STRING - compare items as strings
- *
- *
- *
- * SORT_LOCALE_STRING - compare items as
- * strings, based on the current locale. It uses the locale,
- * which can be changed using setlocale
- *
- *
- *
- *
- * SORT_NATURAL - compare items as strings
- * using "natural ordering" like natsort
- *
- *
- *
- *
- * SORT_FLAG_CASE - can be combined
- * (bitwise OR) with
- * SORT_STRING or
- * SORT_NATURAL to sort strings case-insensitively
- *
- *
- *
- * @throws ArrayException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- */
-function sort(array &$array, int $sort_flags = SORT_REGULAR): void
-{
- error_clear_last();
- $result = \sort($array, $sort_flags);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-/**
- * This function will sort an array by its values using a user-supplied
- * comparison function. If the array you wish to sort needs to be sorted by
- * some non-trivial criteria, you should use this function.
- *
- * @param array $array The input array.
- * @param callable $value_compare_func The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
- * Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647.
- *
- * Returning non-integer values from the comparison
- * function, such as float, will result in an internal cast to
- * integer of the callback's return value. So values such as
- * 0.99 and 0.1 will both be cast to an integer value of 0, which will
- * compare such values as equal.
- * @throws ArrayException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function usort(array &$array, callable $value_compare_func): void
-{
- error_clear_last();
- $result = \usort($array, $value_compare_func);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
-}
-
-/**
- * Creates an array by using the values from the
- * keys array as keys and the values from the
- * values array as the corresponding values.
- *
- * @param array $keys Array of keys to be used. Illegal values for key will be
- * converted to string.
- * @param array $values Array of values to be used
- * @return array Returns the combined array, FALSE if the number of elements
- * for each array isn't equal.
- * @throws ArrayException
- * @deprecated
- *
- */
-function array_combine(array $keys, array $values): array
-{
- error_clear_last();
- $result = \array_combine($keys, $values);
- if ($result === false) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/datetime.php b/vendor/thecodingmachine/safe/deprecated/datetime.php
deleted file mode 100644
index 1bcb32275..000000000
--- a/vendor/thecodingmachine/safe/deprecated/datetime.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\DatetimeException;
-
-/**
- * Identical to the date function except that
- * the time returned is Greenwich Mean Time (GMT).
- *
- * @param string $format The format of the outputted date string. See the formatting
- * options for the date function.
- * @param int $timestamp The optional timestamp parameter is an
- * integer Unix timestamp that defaults to the current
- * local time if a timestamp is not given. In other
- * words, it defaults to the value of time.
- * @return string Returns a formatted date string. If a non-numeric value is used for
- * timestamp, FALSE is returned and an
- * E_WARNING level error is emitted.
- * @throws DatetimeException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function gmdate(string $format, int $timestamp = null): string
-{
- error_clear_last();
- if ($timestamp !== null) {
- $result = \gmdate($format, $timestamp);
- } else {
- $result = \gmdate($format);
- }
- if ($result === false) {
- throw DatetimeException::createFromPhpError();
- }
- return $result;
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/functionsList.php b/vendor/thecodingmachine/safe/deprecated/functionsList.php
deleted file mode 100644
index b75d7abb2..000000000
--- a/vendor/thecodingmachine/safe/deprecated/functionsList.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-return [
- 'apc_cache_info',
- 'apc_cas',
- 'apc_compile_file',
- 'apc_dec',
- 'apc_define_constants',
- 'apc_delete',
- 'apc_delete_file',
- 'apc_inc',
- 'apc_load_constants',
- 'apc_sma_info',
- 'arsort',
- 'array_replace',
- 'array_replace_recursive',
- 'array_combine',
- 'array_flip',
- 'asort',
- 'event_add',
- 'event_base_loopbreak',
- 'event_base_loopexit',
- 'event_base_new',
- 'event_base_priority_init',
- 'event_base_reinit',
- 'event_base_set',
- 'event_buffer_base_set',
- 'event_buffer_disable',
- 'event_buffer_enable',
- 'event_buffer_new',
- 'event_buffer_priority_set',
- 'event_buffer_set_callback',
- 'event_buffer_write',
- 'event_del',
- 'event_new',
- 'event_priority_set',
- 'event_set',
- 'event_timer_set',
- 'gmdate',
- 'imagepsencodefont',
- 'imagepsextendfont',
- 'imagepsfreefont',
- 'imagepsslantfont',
- 'krsort',
- 'ksort',
- 'mssql_bind',
- 'mssql_close',
- 'mssql_connect',
- 'mssql_data_seek',
- 'mssql_field_length',
- 'mssql_field_name',
- 'mssql_field_seek',
- 'mssql_field_type',
- 'mssql_free_result',
- 'mssql_free_statement',
- 'mssql_init',
- 'mssql_pconnect',
- 'mssql_query',
- 'mssql_select_db',
- 'mysqli_get_client_stats',
- 'password_hash',
- 'sort',
- 'stats_covariance',
- 'stats_standard_deviation',
- 'stats_stat_correlation',
- 'stats_stat_innerproduct',
- 'stats_variance',
- 'substr',
- 'usort',
- 'vsprintf',
-];
diff --git a/vendor/thecodingmachine/safe/deprecated/libevent.php b/vendor/thecodingmachine/safe/deprecated/libevent.php
deleted file mode 100644
index 574f0a67b..000000000
--- a/vendor/thecodingmachine/safe/deprecated/libevent.php
+++ /dev/null
@@ -1,496 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\LibeventException;
-
-/**
- * event_add schedules the execution of the event
- * when the event specified in event_set occurs or in at least the time
- * specified by the timeout argument. If
- * timeout was not specified, not timeout is set. The
- * event must be already initalized by event_set
- * and event_base_set functions. If the
- * event already has a timeout set, it is replaced by
- * the new one.
- *
- * @param resource $event Valid event resource.
- * @param int $timeout Optional timeout (in microseconds).
- * @throws LibeventException
- *
- */
-function event_add($event, int $timeout = -1): void
-{
- error_clear_last();
- $result = \event_add($event, $timeout);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Abort the active event loop immediately. The behaviour is similar to
- * break statement.
- *
- * @param resource $event_base Valid event base resource.
- * @throws LibeventException
- *
- */
-function event_base_loopbreak($event_base): void
-{
- error_clear_last();
- $result = \event_base_loopbreak($event_base);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * The next event loop iteration after the given timer expires will complete
- * normally, then exit without blocking for events again.
- *
- * @param resource $event_base Valid event base resource.
- * @param int $timeout Optional timeout parameter (in microseconds).
- * @throws LibeventException
- *
- */
-function event_base_loopexit($event_base, int $timeout = -1): void
-{
- error_clear_last();
- $result = \event_base_loopexit($event_base, $timeout);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Returns new event base, which can be used later in event_base_set,
- * event_base_loop and other functions.
- *
- * @return resource event_base_new returns valid event base resource on
- * success.
- * @throws LibeventException
- *
- */
-function event_base_new()
-{
- error_clear_last();
- $result = \event_base_new();
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Sets the number of different event priority levels.
- *
- * By default all events are scheduled with the same priority
- * (npriorities/2).
- * Using event_base_priority_init you can change the number
- * of event priority levels and then set a desired priority for each event.
- *
- * @param resource $event_base Valid event base resource.
- * @param int $npriorities The number of event priority levels.
- * @throws LibeventException
- *
- */
-function event_base_priority_init($event_base, int $npriorities): void
-{
- error_clear_last();
- $result = \event_base_priority_init($event_base, $npriorities);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Some event mechanisms do not survive across fork. The
- * event_base needs to be reinitialized with this
- * function.
- *
- * @param resource $event_base Valid event base resource that needs to be re-initialized.
- * @throws LibeventException
- *
- */
-function event_base_reinit($event_base): void
-{
- error_clear_last();
- $result = \event_base_reinit($event_base);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Associates the event_base with the
- * event.
- *
- * @param resource $event Valid event resource.
- * @param resource $event_base Valid event base resource.
- * @throws LibeventException
- *
- */
-function event_base_set($event, $event_base): void
-{
- error_clear_last();
- $result = \event_base_set($event, $event_base);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Assign the specified bevent to the
- * event_base.
- *
- * @param resource $bevent Valid buffered event resource.
- * @param resource $event_base Valid event base resource.
- * @throws LibeventException
- *
- */
-function event_buffer_base_set($bevent, $event_base): void
-{
- error_clear_last();
- $result = \event_buffer_base_set($bevent, $event_base);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Disables the specified buffered event.
- *
- * @param resource $bevent Valid buffered event resource.
- * @param int $events Any combination of EV_READ and
- * EV_WRITE.
- * @throws LibeventException
- *
- */
-function event_buffer_disable($bevent, int $events): void
-{
- error_clear_last();
- $result = \event_buffer_disable($bevent, $events);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Enables the specified buffered event.
- *
- * @param resource $bevent Valid buffered event resource.
- * @param int $events Any combination of EV_READ and
- * EV_WRITE.
- * @throws LibeventException
- *
- */
-function event_buffer_enable($bevent, int $events): void
-{
- error_clear_last();
- $result = \event_buffer_enable($bevent, $events);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Libevent provides an abstraction layer on top of the regular event API.
- * Using buffered event you don't need to deal with the I/O manually, instead
- * it provides input and output buffers that get filled and drained
- * automatically.
- *
- * @param resource $stream Valid PHP stream resource. Must be castable to file descriptor.
- * @param mixed $readcb Callback to invoke where there is data to read, or NULL if
- * no callback is desired.
- * @param mixed $writecb Callback to invoke where the descriptor is ready for writing,
- * or NULL if no callback is desired.
- * @param mixed $errorcb Callback to invoke where there is an error on the descriptor, cannot be
- * NULL.
- * @param mixed $arg An argument that will be passed to each of the callbacks (optional).
- * @return resource event_buffer_new returns new buffered event resource
- * on success.
- * @throws LibeventException
- *
- */
-function event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg = null)
-{
- error_clear_last();
- if ($arg !== null) {
- $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg);
- } else {
- $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb);
- }
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Assign a priority to the bevent.
- *
- * @param resource $bevent Valid buffered event resource.
- * @param int $priority Priority level. Cannot be less than zero and cannot exceed maximum
- * priority level of the event base (see event_base_priority_init).
- * @throws LibeventException
- *
- */
-function event_buffer_priority_set($bevent, int $priority): void
-{
- error_clear_last();
- $result = \event_buffer_priority_set($bevent, $priority);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Sets or changes existing callbacks for the buffered event.
- *
- * @param resource $event Valid buffered event resource.
- * @param mixed $readcb Callback to invoke where there is data to read, or NULL if
- * no callback is desired.
- * @param mixed $writecb Callback to invoke where the descriptor is ready for writing,
- * or NULL if no callback is desired.
- * @param mixed $errorcb Callback to invoke where there is an error on the descriptor, cannot be
- * NULL.
- * @param mixed $arg An argument that will be passed to each of the callbacks (optional).
- * @throws LibeventException
- *
- */
-function event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg = null): void
-{
- error_clear_last();
- if ($arg !== null) {
- $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg);
- } else {
- $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb);
- }
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Writes data to the specified buffered event. The data is appended to the
- * output buffer and written to the descriptor when it becomes available for
- * writing.
- *
- * @param resource $bevent Valid buffered event resource.
- * @param string $data The data to be written.
- * @param int $data_size Optional size parameter. event_buffer_write writes
- * all the data by default.
- * @throws LibeventException
- *
- */
-function event_buffer_write($bevent, string $data, int $data_size = -1): void
-{
- error_clear_last();
- $result = \event_buffer_write($bevent, $data, $data_size);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Cancels the event.
- *
- * @param resource $event Valid event resource.
- * @throws LibeventException
- *
- */
-function event_del($event): void
-{
- error_clear_last();
- $result = \event_del($event);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Creates and returns a new event resource.
- *
- * @return resource event_new returns a new event resource on success.
- * @throws LibeventException
- *
- */
-function event_new()
-{
- error_clear_last();
- $result = \event_new();
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Assign a priority to the event.
- *
- * @param resource $event Valid event resource.
- * @param int $priority Priority level. Cannot be less than zero and cannot exceed maximum
- * priority level of the event base (see
- * event_base_priority_init).
- * @throws LibeventException
- *
- */
-function event_priority_set($event, int $priority): void
-{
- error_clear_last();
- $result = \event_priority_set($event, $priority);
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Prepares the event to be used in event_add. The event
- * is prepared to call the function specified by the callback
- * on the events specified in parameter events, which
- * is a set of the following flags: EV_TIMEOUT,
- * EV_SIGNAL, EV_READ,
- * EV_WRITE and EV_PERSIST.
- *
- * If EV_SIGNAL bit is set in parameter events,
- * the fd is interpreted as signal number.
- *
- * After initializing the event, use event_base_set to
- * associate the event with its event base.
- *
- * In case of matching event, these three arguments are passed to the
- * callback function:
- *
- *
- * fd
- *
- *
- * Signal number or resource indicating the stream.
- *
- *
- *
- *
- * events
- *
- *
- * A flag indicating the event. Consists of the following flags:
- * EV_TIMEOUT, EV_SIGNAL,
- * EV_READ, EV_WRITE
- * and EV_PERSIST.
- *
- *
- *
- *
- * arg
- *
- *
- * Optional parameter, previously passed to event_set
- * as arg.
- *
- *
- *
- *
- *
- * @param resource $event Valid event resource.
- * @param mixed $fd Valid PHP stream resource. The stream must be castable to file
- * descriptor, so you most likely won't be able to use any of filtered
- * streams.
- * @param int $events A set of flags indicating the desired event, can be
- * EV_READ and/or EV_WRITE.
- * The additional flag EV_PERSIST makes the event
- * to persist until event_del is called, otherwise
- * the callback is invoked only once.
- * @param mixed $callback Callback function to be called when the matching event occurs.
- * @param mixed $arg Optional callback parameter.
- * @throws LibeventException
- *
- */
-function event_set($event, $fd, int $events, $callback, $arg = null): void
-{
- error_clear_last();
- if ($arg !== null) {
- $result = \event_set($event, $fd, $events, $callback, $arg);
- } else {
- $result = \event_set($event, $fd, $events, $callback);
- }
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
-
-
-/**
- * Prepares the timer event to be used in event_add. The
- * event is prepared to call the function specified by the
- * callback when the event timeout elapses.
- *
- * After initializing the event, use event_base_set to
- * associate the event with its event base.
- *
- * In case of matching event, these three arguments are passed to the
- * callback function:
- *
- *
- * fd
- *
- *
- * Signal number or resource indicating the stream.
- *
- *
- *
- *
- * events
- *
- *
- * A flag indicating the event. This will always be
- * EV_TIMEOUT for timer events.
- *
- *
- *
- *
- * arg
- *
- *
- * Optional parameter, previously passed to
- * event_timer_set as arg.
- *
- *
- *
- *
- *
- * @param resource $event Valid event resource.
- * @param callable $callback Callback function to be called when the matching event occurs.
- * @param mixed $arg Optional callback parameter.
- * @throws LibeventException
- *
- */
-function event_timer_set($event, callable $callback, $arg = null): void
-{
- error_clear_last();
- if ($arg !== null) {
- $result = \event_timer_set($event, $callback, $arg);
- } else {
- $result = \event_timer_set($event, $callback);
- }
- if ($result === false) {
- throw LibeventException::createFromPhpError();
- }
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/mssql.php b/vendor/thecodingmachine/safe/deprecated/mssql.php
deleted file mode 100644
index 234ef56b1..000000000
--- a/vendor/thecodingmachine/safe/deprecated/mssql.php
+++ /dev/null
@@ -1,426 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\MssqlException;
-
-/**
- * Binds a parameter to a stored procedure or a remote stored procedure.
- *
- * @param resource $stmt Statement resource, obtained with mssql_init.
- * @param string $param_name The parameter name, as a string.
- *
- * You have to include the @ character, like in the
- * T-SQL syntax. See the explanation included in
- * mssql_execute.
- * @param mixed $var The PHP variable you'll bind the MSSQL parameter to. It is passed by
- * reference, to retrieve OUTPUT and RETVAL values after
- * the procedure execution.
- * @param int $type One of: SQLTEXT,
- * SQLVARCHAR, SQLCHAR,
- * SQLINT1, SQLINT2,
- * SQLINT4, SQLBIT,
- * SQLFLT4, SQLFLT8,
- * SQLFLTN.
- * @param bool $is_output Whether the value is an OUTPUT parameter or not. If it's an OUTPUT
- * parameter and you don't mention it, it will be treated as a normal
- * input parameter and no error will be thrown.
- * @param bool $is_null Whether the parameter is NULL or not. Passing the NULL value as
- * var will not do the job.
- * @param int $maxlen Used with char/varchar values. You have to indicate the length of the
- * data so if the parameter is a varchar(50), the type must be
- * SQLVARCHAR and this value 50.
- * @throws MssqlException
- *
- */
-function mssql_bind($stmt, string $param_name, &$var, int $type, bool $is_output = false, bool $is_null = false, int $maxlen = -1): void
-{
- error_clear_last();
- $result = \mssql_bind($stmt, $param_name, $var, $type, $is_output, $is_null, $maxlen);
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
-}
-
-
-/**
- * Closes the link to a MS SQL Server database that's associated with the
- * specified link identifier. If the link identifier isn't specified, the
- * last opened link is assumed.
- *
- * Note that this isn't usually necessary, as non-persistent open
- * links are automatically closed at the end of the script's
- * execution.
- *
- * @param resource $link_identifier A MS SQL link identifier, returned by
- * mssql_connect.
- *
- * This function will not close persistent links generated by
- * mssql_pconnect.
- * @throws MssqlException
- *
- */
-function mssql_close($link_identifier = null): void
-{
- error_clear_last();
- if ($link_identifier !== null) {
- $result = \mssql_close($link_identifier);
- } else {
- $result = \mssql_close();
- }
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
-}
-
-
-/**
- * mssql_connect establishes a connection to a
- * MS SQL server.
- *
- * The link to the server will be closed as soon as the execution of
- * the script ends, unless it's closed earlier by explicitly calling
- * mssql_close.
- *
- * @param string $servername The MS SQL server. It can also include a port number, e.g.
- * hostname:port (Linux), or
- * hostname,port (Windows).
- * @param string $username The username.
- * @param string $password The password.
- * @param bool $new_link If a second call is made to mssql_connect with the
- * same arguments, no new link will be established, but instead, the link
- * identifier of the already opened link will be returned. This parameter
- * modifies this behavior and makes mssql_connect
- * always open a new link, even if mssql_connect was
- * called before with the same parameters.
- * @return resource Returns a MS SQL link identifier on success.
- * @throws MssqlException
- *
- */
-function mssql_connect(string $servername = null, string $username = null, string $password = null, bool $new_link = false)
-{
- error_clear_last();
- if ($new_link !== false) {
- $result = \mssql_connect($servername, $username, $password, $new_link);
- } elseif ($password !== null) {
- $result = \mssql_connect($servername, $username, $password);
- } elseif ($username !== null) {
- $result = \mssql_connect($servername, $username);
- } elseif ($servername !== null) {
- $result = \mssql_connect($servername);
- } else {
- $result = \mssql_connect();
- }
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * mssql_data_seek moves the internal row
- * pointer of the MS SQL result associated with the specified result
- * identifier to point to the specified row number, first row being
- * number 0. The next call to mssql_fetch_row
- * would return that row.
- *
- * @param resource $result_identifier The result resource that is being evaluated.
- * @param int $row_number The desired row number of the new result pointer.
- * @throws MssqlException
- *
- */
-function mssql_data_seek($result_identifier, int $row_number): void
-{
- error_clear_last();
- $result = \mssql_data_seek($result_identifier, $row_number);
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
-}
-
-
-/**
- * Returns the length of field no. offset in
- * result.
- *
- * @param resource $result The result resource that is being evaluated. This result comes from a
- * call to mssql_query.
- * @param int $offset The field offset, starts at 0. If omitted, the current field is used.
- * @return int The length of the specified field index on success.
- * @throws MssqlException
- *
- */
-function mssql_field_length($result, int $offset = -1): int
-{
- error_clear_last();
- $result = \mssql_field_length($result, $offset);
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns the name of field no. offset in
- * result.
- *
- * @param resource $result The result resource that is being evaluated. This result comes from a
- * call to mssql_query.
- * @param int $offset The field offset, starts at 0. If omitted, the current field is used.
- * @return string The name of the specified field index on success.
- * @throws MssqlException
- *
- */
-function mssql_field_name($result, int $offset = -1): string
-{
- error_clear_last();
- $result = \mssql_field_name($result, $offset);
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Seeks to the specified field offset. If the next call to
- * mssql_fetch_field won't include a field
- * offset, this field would be returned.
- *
- * @param resource $result The result resource that is being evaluated. This result comes from a
- * call to mssql_query.
- * @param int $field_offset The field offset, starts at 0.
- * @throws MssqlException
- *
- */
-function mssql_field_seek($result, int $field_offset): void
-{
- error_clear_last();
- $result = \mssql_field_seek($result, $field_offset);
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
-}
-
-
-/**
- * Returns the type of field no. offset in
- * result.
- *
- * @param resource $result The result resource that is being evaluated. This result comes from a
- * call to mssql_query.
- * @param int $offset The field offset, starts at 0. If omitted, the current field is used.
- * @return string The type of the specified field index on success.
- * @throws MssqlException
- *
- */
-function mssql_field_type($result, int $offset = -1): string
-{
- error_clear_last();
- $result = \mssql_field_type($result, $offset);
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * mssql_free_result only needs to be called
- * if you are worried about using too much memory while your script
- * is running. All result memory will automatically be freed when
- * the script ends. You may call mssql_free_result
- * with the result identifier as an argument and the associated
- * result memory will be freed.
- *
- * @param resource $result The result resource that is being freed. This result comes from a
- * call to mssql_query.
- * @throws MssqlException
- *
- */
-function mssql_free_result($result): void
-{
- error_clear_last();
- $result = \mssql_free_result($result);
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
-}
-
-
-/**
- * mssql_free_statement only needs to be called
- * if you are worried about using too much memory while your script
- * is running. All statement memory will automatically be freed when
- * the script ends. You may call mssql_free_statement
- * with the statement identifier as an argument and the associated
- * statement memory will be freed.
- *
- * @param resource $stmt Statement resource, obtained with mssql_init.
- * @throws MssqlException
- *
- */
-function mssql_free_statement($stmt): void
-{
- error_clear_last();
- $result = \mssql_free_statement($stmt);
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
-}
-
-
-/**
- * Initializes a stored procedure or a remote stored procedure.
- *
- * @param string $sp_name Stored procedure name, like ownew.sp_name or
- * otherdb.owner.sp_name.
- * @param resource $link_identifier A MS SQL link identifier, returned by
- * mssql_connect.
- * @return resource Returns a resource identifier "statement", used in subsequent calls to
- * mssql_bind and mssql_executes.
- * @throws MssqlException
- *
- */
-function mssql_init(string $sp_name, $link_identifier = null)
-{
- error_clear_last();
- if ($link_identifier !== null) {
- $result = \mssql_init($sp_name, $link_identifier);
- } else {
- $result = \mssql_init($sp_name);
- }
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * mssql_pconnect acts very much like
- * mssql_connect with two major differences.
- *
- * First, when connecting, the function would first try to find a
- * (persistent) link that's already open with the same host,
- * username and password. If one is found, an identifier for it
- * will be returned instead of opening a new connection.
- *
- * Second, the connection to the SQL server will not be closed when
- * the execution of the script ends. Instead, the link will remain
- * open for future use (mssql_close will not
- * close links established by mssql_pconnect).
- *
- * This type of links is therefore called 'persistent'.
- *
- * @param string $servername The MS SQL server. It can also include a port number. e.g.
- * hostname:port.
- * @param string $username The username.
- * @param string $password The password.
- * @param bool $new_link If a second call is made to mssql_pconnect with
- * the same arguments, no new link will be established, but instead, the
- * link identifier of the already opened link will be returned. This
- * parameter modifies this behavior and makes
- * mssql_pconnect always open a new link, even if
- * mssql_pconnect was called before with the same
- * parameters.
- * @return resource Returns a positive MS SQL persistent link identifier on success.
- * @throws MssqlException
- *
- */
-function mssql_pconnect(string $servername = null, string $username = null, string $password = null, bool $new_link = false)
-{
- error_clear_last();
- if ($new_link !== false) {
- $result = \mssql_pconnect($servername, $username, $password, $new_link);
- } elseif ($password !== null) {
- $result = \mssql_pconnect($servername, $username, $password);
- } elseif ($username !== null) {
- $result = \mssql_pconnect($servername, $username);
- } elseif ($servername !== null) {
- $result = \mssql_pconnect($servername);
- } else {
- $result = \mssql_pconnect();
- }
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * mssql_query sends a query to the currently active
- * database on the server that's associated with the specified link
- * identifier.
- *
- * @param string $query An SQL query.
- * @param resource $link_identifier A MS SQL link identifier, returned by
- * mssql_connect or
- * mssql_pconnect.
- *
- * If the link identifier isn't specified, the last opened link is
- * assumed. If no link is open, the function tries to establish a link
- * as if mssql_connect was called, and use it.
- * @param int $batch_size The number of records to batch in the buffer.
- * @return mixed Returns a MS SQL result resource on success, TRUE if no rows were
- * returned.
- * @throws MssqlException
- *
- */
-function mssql_query(string $query, $link_identifier = null, int $batch_size = 0)
-{
- error_clear_last();
- if ($batch_size !== 0) {
- $result = \mssql_query($query, $link_identifier, $batch_size);
- } elseif ($link_identifier !== null) {
- $result = \mssql_query($query, $link_identifier);
- } else {
- $result = \mssql_query($query);
- }
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * mssql_select_db sets the current active
- * database on the server that's associated with the specified link
- * identifier.
- *
- * Every subsequent call to mssql_query will be
- * made on the active database.
- *
- * @param string $database_name The database name.
- *
- * To escape the name of a database that contains spaces, hyphens ("-"),
- * or any other exceptional characters, the database name must be
- * enclosed in brackets, as is shown in the example, below. This
- * technique must also be applied when selecting a database name that is
- * also a reserved word (such as primary).
- * @param resource $link_identifier A MS SQL link identifier, returned by
- * mssql_connect or
- * mssql_pconnect.
- *
- * If no link identifier is specified, the last opened link is assumed.
- * If no link is open, the function will try to establish a link as if
- * mssql_connect was called, and use it.
- * @throws MssqlException
- *
- */
-function mssql_select_db(string $database_name, $link_identifier = null): void
-{
- error_clear_last();
- if ($link_identifier !== null) {
- $result = \mssql_select_db($database_name, $link_identifier);
- } else {
- $result = \mssql_select_db($database_name);
- }
- if ($result === false) {
- throw MssqlException::createFromPhpError();
- }
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/mysqli.php b/vendor/thecodingmachine/safe/deprecated/mysqli.php
deleted file mode 100644
index 13839c6c7..000000000
--- a/vendor/thecodingmachine/safe/deprecated/mysqli.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\MysqliException;
-
-/**
- * Returns client per-process statistics.
- *
- * @return array Returns an array with client stats if success, FALSE otherwise.
- * @throws MysqliException
- *
- */
-function mysqli_get_client_stats(): array
-{
- error_clear_last();
- $result = \mysqli_get_client_stats();
- if ($result === false) {
- throw MysqliException::createFromPhpError();
- }
- return $result;
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/password.php b/vendor/thecodingmachine/safe/deprecated/password.php
deleted file mode 100644
index 87d85a7b7..000000000
--- a/vendor/thecodingmachine/safe/deprecated/password.php
+++ /dev/null
@@ -1,127 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\PasswordException;
-
-/**
- * password_hash creates a new password hash using a strong one-way hashing
- * algorithm. password_hash is compatible with crypt.
- * Therefore, password hashes created by crypt can be used with
- * password_hash.
- *
- *
- *
- *
- * PASSWORD_DEFAULT - Use the bcrypt algorithm (default as of PHP 5.5.0).
- * Note that this constant is designed to change over time as new and stronger algorithms are added
- * to PHP. For that reason, the length of the result from using this identifier can change over
- * time. Therefore, it is recommended to store the result in a database column that can expand
- * beyond 60 characters (255 characters would be a good choice).
- *
- *
- *
- *
- * PASSWORD_BCRYPT - Use the CRYPT_BLOWFISH algorithm to
- * create the hash. This will produce a standard crypt compatible hash using
- * the "$2y$" identifier. The result will always be a 60 character string.
- *
- *
- *
- *
- * PASSWORD_ARGON2I - Use the Argon2i hashing algorithm to create the hash.
- * This algorithm is only available if PHP has been compiled with Argon2 support.
- *
- *
- *
- *
- * PASSWORD_ARGON2ID - Use the Argon2id hashing algorithm to create the hash.
- * This algorithm is only available if PHP has been compiled with Argon2 support.
- *
- *
- *
- *
- *
- *
- *
- * salt (string) - to manually provide a salt to use when hashing the password.
- * Note that this will override and prevent a salt from being automatically generated.
- *
- *
- * If omitted, a random salt will be generated by password_hash for
- * each password hashed. This is the intended mode of operation.
- *
- *
- *
- * The salt option has been deprecated as of PHP 7.0.0. It is now
- * preferred to simply use the salt that is generated by default.
- *
- *
- *
- *
- *
- * cost (integer) - which denotes the algorithmic cost that should be used.
- * Examples of these values can be found on the crypt page.
- *
- *
- * If omitted, a default value of 10 will be used. This is a good
- * baseline cost, but you may want to consider increasing it depending on your hardware.
- *
- *
- *
- *
- *
- *
- *
- * memory_cost (integer) - Maximum memory (in kibibytes) that may
- * be used to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_MEMORY_COST.
- *
- *
- *
- *
- * time_cost (integer) - Maximum amount of time it may
- * take to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_TIME_COST.
- *
- *
- *
- *
- * threads (integer) - Number of threads to use for computing
- * the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_THREADS.
- *
- *
- *
- *
- * @param string $password The user's password.
- *
- * Using the PASSWORD_BCRYPT as the
- * algorithm, will result
- * in the password parameter being truncated to a
- * maximum length of 72 characters.
- * @param int|string|null $algo A password algorithm constant denoting the algorithm to use when hashing the password.
- * @param array $options An associative array containing options. See the password algorithm constants for documentation on the supported options for each algorithm.
- *
- * If omitted, a random salt will be created and the default cost will be
- * used.
- * @return string Returns the hashed password.
- *
- * The used algorithm, cost and salt are returned as part of the hash. Therefore,
- * all information that's needed to verify the hash is included in it. This allows
- * the password_verify function to verify the hash without
- * needing separate storage for the salt or algorithm information.
- * @throws PasswordException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function password_hash(string $password, $algo, array $options = null): string
-{
- error_clear_last();
- if ($options !== null) {
- $result = \password_hash($password, $algo, $options);
- } else {
- $result = \password_hash($password, $algo);
- }
- if ($result === false) {
- throw PasswordException::createFromPhpError();
- }
- return $result;
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/stats.php b/vendor/thecodingmachine/safe/deprecated/stats.php
deleted file mode 100644
index aca984859..000000000
--- a/vendor/thecodingmachine/safe/deprecated/stats.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\StatsException;
-
-/**
- * Returns the covariance of a and b.
- *
- * @param array $a The first array
- * @param array $b The second array
- * @return float Returns the covariance of a and b.
- * @throws StatsException
- *
- */
-function stats_covariance(array $a, array $b): float
-{
- error_clear_last();
- $result = \stats_covariance($a, $b);
- if ($result === false) {
- throw StatsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns the standard deviation of the values in a.
- *
- * @param array $a The array of data to find the standard deviation for. Note that all
- * values of the array will be cast to float.
- * @param bool $sample Indicates if a represents a sample of the
- * population; defaults to FALSE.
- * @return float Returns the standard deviation on success; FALSE on failure.
- * @throws StatsException
- *
- */
-function stats_standard_deviation(array $a, bool $sample = false): float
-{
- error_clear_last();
- $result = \stats_standard_deviation($a, $sample);
- if ($result === false) {
- throw StatsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns the Pearson correlation coefficient between arr1 and arr2.
- *
- * @param array $arr1 The first array
- * @param array $arr2 The second array
- * @return float Returns the Pearson correlation coefficient between arr1 and arr2.
- * @throws StatsException
- *
- */
-function stats_stat_correlation(array $arr1, array $arr2): float
-{
- error_clear_last();
- $result = \stats_stat_correlation($arr1, $arr2);
- if ($result === false) {
- throw StatsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns the inner product of arr1 and arr2.
- *
- * @param array $arr1 The first array
- * @param array $arr2 The second array
- * @return float Returns the inner product of arr1 and arr2.
- * @throws StatsException
- *
- */
-function stats_stat_innerproduct(array $arr1, array $arr2): float
-{
- error_clear_last();
- $result = \stats_stat_innerproduct($arr1, $arr2);
- if ($result === false) {
- throw StatsException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * Returns the variance of the values in a.
- *
- * @param array $a The array of data to find the standard deviation for. Note that all
- * values of the array will be cast to float.
- * @param bool $sample Indicates if a represents a sample of the
- * population; defaults to FALSE.
- * @return float Returns the variance on success; FALSE on failure.
- * @throws StatsException
- *
- */
-function stats_variance(array $a, bool $sample = false): float
-{
- error_clear_last();
- $result = \stats_variance($a, $sample);
- if ($result === false) {
- throw StatsException::createFromPhpError();
- }
- return $result;
-}
diff --git a/vendor/thecodingmachine/safe/deprecated/strings.php b/vendor/thecodingmachine/safe/deprecated/strings.php
deleted file mode 100644
index de0c2e606..000000000
--- a/vendor/thecodingmachine/safe/deprecated/strings.php
+++ /dev/null
@@ -1,677 +0,0 @@
-<?php
-
-namespace Safe;
-
-use Safe\Exceptions\StringsException;
-
-/**
- * Returns a string produced according to the formatting string
- * format.
- *
- * @param string $format The format string is composed of zero or more directives:
- * ordinary characters (excluding %) that are
- * copied directly to the result and conversion
- * specifications, each of which results in fetching its
- * own parameter.
- *
- * A conversion specification follows this prototype:
- * %[argnum$][flags][width][.precision]specifier.
- *
- * An integer followed by a dollar sign $,
- * to specify which number argument to treat in the conversion.
- *
- *
- * Flags
- *
- *
- *
- * Flag
- * Description
- *
- *
- *
- *
- * -
- *
- * Left-justify within the given field width;
- * Right justification is the default
- *
- *
- *
- * +
- *
- * Prefix positive numbers with a plus sign
- * +; Default only negative
- * are prefixed with a negative sign.
- *
- *
- *
- * (space)
- *
- * Pads the result with spaces.
- * This is the default.
- *
- *
- *
- * 0
- *
- * Only left-pads numbers with zeros.
- * With s specifiers this can
- * also right-pad with zeros.
- *
- *
- *
- * '(char)
- *
- * Pads the result with the character (char).
- *
- *
- *
- *
- *
- *
- * An integer that says how many characters (minimum)
- * this conversion should result in.
- *
- * A period . followed by an integer
- * who's meaning depends on the specifier:
- *
- *
- *
- * For e, E,
- * f and F
- * specifiers: this is the number of digits to be printed
- * after the decimal point (by default, this is 6).
- *
- *
- *
- *
- * For g and G
- * specifiers: this is the maximum number of significant
- * digits to be printed.
- *
- *
- *
- *
- * For s specifier: it acts as a cutoff point,
- * setting a maximum character limit to the string.
- *
- *
- *
- *
- *
- * If the period is specified without an explicit value for precision,
- * 0 is assumed.
- *
- *
- *
- *
- * Specifiers
- *
- *
- *
- * Specifier
- * Description
- *
- *
- *
- *
- * %
- *
- * A literal percent character. No argument is required.
- *
- *
- *
- * b
- *
- * The argument is treated as an integer and presented
- * as a binary number.
- *
- *
- *
- * c
- *
- * The argument is treated as an integer and presented
- * as the character with that ASCII.
- *
- *
- *
- * d
- *
- * The argument is treated as an integer and presented
- * as a (signed) decimal number.
- *
- *
- *
- * e
- *
- * The argument is treated as scientific notation (e.g. 1.2e+2).
- * The precision specifier stands for the number of digits after the
- * decimal point since PHP 5.2.1. In earlier versions, it was taken as
- * number of significant digits (one less).
- *
- *
- *
- * E
- *
- * Like the e specifier but uses
- * uppercase letter (e.g. 1.2E+2).
- *
- *
- *
- * f
- *
- * The argument is treated as a float and presented
- * as a floating-point number (locale aware).
- *
- *
- *
- * F
- *
- * The argument is treated as a float and presented
- * as a floating-point number (non-locale aware).
- * Available as of PHP 5.0.3.
- *
- *
- *
- * g
- *
- *
- * General format.
- *
- *
- * Let P equal the precision if nonzero, 6 if the precision is omitted,
- * or 1 if the precision is zero.
- * Then, if a conversion with style E would have an exponent of X:
- *
- *
- * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
- * Otherwise, the conversion is with style e and precision P − 1.
- *
- *
- *
- *
- * G
- *
- * Like the g specifier but uses
- * E and f.
- *
- *
- *
- * o
- *
- * The argument is treated as an integer and presented
- * as an octal number.
- *
- *
- *
- * s
- *
- * The argument is treated and presented as a string.
- *
- *
- *
- * u
- *
- * The argument is treated as an integer and presented
- * as an unsigned decimal number.
- *
- *
- *
- * x
- *
- * The argument is treated as an integer and presented
- * as a hexadecimal number (with lowercase letters).
- *
- *
- *
- * X
- *
- * The argument is treated as an integer and presented
- * as a hexadecimal number (with uppercase letters).
- *
- *
- *
- *
- *
- *
- * General format.
- *
- * Let P equal the precision if nonzero, 6 if the precision is omitted,
- * or 1 if the precision is zero.
- * Then, if a conversion with style E would have an exponent of X:
- *
- * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
- * Otherwise, the conversion is with style e and precision P − 1.
- *
- * The c type specifier ignores padding and width
- *
- * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results
- *
- * Variables will be co-erced to a suitable type for the specifier:
- *
- * Type Handling
- *
- *
- *
- * Type
- * Specifiers
- *
- *
- *
- *
- * string
- * s
- *
- *
- * integer
- *
- * d,
- * u,
- * c,
- * o,
- * x,
- * X,
- * b
- *
- *
- *
- * double
- *
- * g,
- * G,
- * e,
- * E,
- * f,
- * F
- *
- *
- *
- *
- *
- * @param mixed $params
- * @return string Returns a string produced according to the formatting string
- * format.
- * @throws StringsException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function sprintf(string $format, ...$params): string
-{
- error_clear_last();
- if ($params !== []) {
- $result = \sprintf($format, ...$params);
- } else {
- $result = \sprintf($format);
- }
- if ($result === false) {
- throw StringsException::createFromPhpError();
- }
- return $result;
-}
-
-/**
- * Returns the portion of string specified by the
- * start and length parameters.
- *
- * @param string $string The input string.
- * @param int $start If start is non-negative, the returned string
- * will start at the start'th position in
- * string, counting from zero. For instance,
- * in the string 'abcdef', the character at
- * position 0 is 'a', the
- * character at position 2 is
- * 'c', and so forth.
- *
- * If start is negative, the returned string
- * will start at the start'th character
- * from the end of string.
- *
- * If string is less than
- * start characters long, FALSE will be returned.
- *
- *
- * Using a negative start
- *
- *
- * ]]>
- *
- *
- * @param int $length If length is given and is positive, the string
- * returned will contain at most length characters
- * beginning from start (depending on the length of
- * string).
- *
- * If length is given and is negative, then that many
- * characters will be omitted from the end of string
- * (after the start position has been calculated when a
- * start is negative). If
- * start denotes the position of this truncation or
- * beyond, FALSE will be returned.
- *
- * If length is given and is 0,
- * FALSE or NULL, an empty string will be returned.
- *
- * If length is omitted, the substring starting from
- * start until the end of the string will be
- * returned.
- * @return string Returns the extracted part of string;, or
- * an empty string.
- * @throws StringsException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- *
- */
-function substr(string $string, int $start, int $length = null): string
-{
- error_clear_last();
- if ($length !== null) {
- $result = \substr($string, $start, $length);
- } else {
- $result = \substr($string, $start);
- }
- if ($result === false) {
- throw StringsException::createFromPhpError();
- }
- return $result;
-}
-
-/**
- * Operates as sprintf but accepts an array of
- * arguments, rather than a variable number of arguments.
- *
- * @param string $format The format string is composed of zero or more directives:
- * ordinary characters (excluding %) that are
- * copied directly to the result and conversion
- * specifications, each of which results in fetching its
- * own parameter.
- *
- * A conversion specification follows this prototype:
- * %[argnum$][flags][width][.precision]specifier.
- *
- * An integer followed by a dollar sign $,
- * to specify which number argument to treat in the conversion.
- *
- *
- * Flags
- *
- *
- *
- * Flag
- * Description
- *
- *
- *
- *
- * -
- *
- * Left-justify within the given field width;
- * Right justification is the default
- *
- *
- *
- * +
- *
- * Prefix positive numbers with a plus sign
- * +; Default only negative
- * are prefixed with a negative sign.
- *
- *
- *
- * (space)
- *
- * Pads the result with spaces.
- * This is the default.
- *
- *
- *
- * 0
- *
- * Only left-pads numbers with zeros.
- * With s specifiers this can
- * also right-pad with zeros.
- *
- *
- *
- * '(char)
- *
- * Pads the result with the character (char).
- *
- *
- *
- *
- *
- *
- * An integer that says how many characters (minimum)
- * this conversion should result in.
- *
- * A period . followed by an integer
- * who's meaning depends on the specifier:
- *
- *
- *
- * For e, E,
- * f and F
- * specifiers: this is the number of digits to be printed
- * after the decimal point (by default, this is 6).
- *
- *
- *
- *
- * For g and G
- * specifiers: this is the maximum number of significant
- * digits to be printed.
- *
- *
- *
- *
- * For s specifier: it acts as a cutoff point,
- * setting a maximum character limit to the string.
- *
- *
- *
- *
- *
- * If the period is specified without an explicit value for precision,
- * 0 is assumed.
- *
- *
- *
- *
- * Specifiers
- *
- *
- *
- * Specifier
- * Description
- *
- *
- *
- *
- * %
- *
- * A literal percent character. No argument is required.
- *
- *
- *
- * b
- *
- * The argument is treated as an integer and presented
- * as a binary number.
- *
- *
- *
- * c
- *
- * The argument is treated as an integer and presented
- * as the character with that ASCII.
- *
- *
- *
- * d
- *
- * The argument is treated as an integer and presented
- * as a (signed) decimal number.
- *
- *
- *
- * e
- *
- * The argument is treated as scientific notation (e.g. 1.2e+2).
- * The precision specifier stands for the number of digits after the
- * decimal point since PHP 5.2.1. In earlier versions, it was taken as
- * number of significant digits (one less).
- *
- *
- *
- * E
- *
- * Like the e specifier but uses
- * uppercase letter (e.g. 1.2E+2).
- *
- *
- *
- * f
- *
- * The argument is treated as a float and presented
- * as a floating-point number (locale aware).
- *
- *
- *
- * F
- *
- * The argument is treated as a float and presented
- * as a floating-point number (non-locale aware).
- * Available as of PHP 5.0.3.
- *
- *
- *
- * g
- *
- *
- * General format.
- *
- *
- * Let P equal the precision if nonzero, 6 if the precision is omitted,
- * or 1 if the precision is zero.
- * Then, if a conversion with style E would have an exponent of X:
- *
- *
- * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
- * Otherwise, the conversion is with style e and precision P − 1.
- *
- *
- *
- *
- * G
- *
- * Like the g specifier but uses
- * E and f.
- *
- *
- *
- * o
- *
- * The argument is treated as an integer and presented
- * as an octal number.
- *
- *
- *
- * s
- *
- * The argument is treated and presented as a string.
- *
- *
- *
- * u
- *
- * The argument is treated as an integer and presented
- * as an unsigned decimal number.
- *
- *
- *
- * x
- *
- * The argument is treated as an integer and presented
- * as a hexadecimal number (with lowercase letters).
- *
- *
- *
- * X
- *
- * The argument is treated as an integer and presented
- * as a hexadecimal number (with uppercase letters).
- *
- *
- *
- *
- *
- *
- * General format.
- *
- * Let P equal the precision if nonzero, 6 if the precision is omitted,
- * or 1 if the precision is zero.
- * Then, if a conversion with style E would have an exponent of X:
- *
- * If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
- * Otherwise, the conversion is with style e and precision P − 1.
- *
- * The c type specifier ignores padding and width
- *
- * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results
- *
- * Variables will be co-erced to a suitable type for the specifier:
- *
- * Type Handling
- *
- *
- *
- * Type
- * Specifiers
- *
- *
- *
- *
- * string
- * s
- *
- *
- * integer
- *
- * d,
- * u,
- * c,
- * o,
- * x,
- * X,
- * b
- *
- *
- *
- * double
- *
- * g,
- * G,
- * e,
- * E,
- * f,
- * F
- *
- *
- *
- *
- *
- * @param array $args
- * @return string Return array values as a formatted string according to
- * format.
- * @throws StringsException
- * @deprecated The Safe version of this function is no longer needed in PHP 8.0+
- */
-function vsprintf(string $format, array $args): string
-{
- error_clear_last();
- $result = \vsprintf($format, $args);
- if ($result === false) {
- throw StringsException::createFromPhpError();
- }
- return $result;
-}