Skip to content

Commit

Permalink
Merge pull request #150 from Kharhamel/apcu_delete
Browse files Browse the repository at this point in the history
remove apcu_delete from the safe list
  • Loading branch information
Kharhamel committed Oct 22, 2019
2 parents b8848b0 + 4f3f4a0 commit 4c86a21
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 25 deletions.
23 changes: 0 additions & 23 deletions generated/apcu.php
Expand Up @@ -69,29 +69,6 @@ function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl =
}


/**
* Removes a stored variable from the cache.
*
* @param string|string[]|\APCUIterator $key A key used to store the value as a
* string for a single key,
* or as an array of strings for several keys,
* or as an APCUIterator object.
* @return bool|array If key is an array, an indexed array of the keys is returned.
* Otherwise TRUE is returned on success.
* @throws ApcuException
*
*/
function apcu_delete($key)
{
error_clear_last();
$result = \apcu_delete($key);
if ($result === false) {
throw ApcuException::createFromPhpError();
}
return $result;
}


/**
* Increases a stored number.
*
Expand Down
1 change: 0 additions & 1 deletion generated/functionsList.php
Expand Up @@ -22,7 +22,6 @@
'apcu_cache_info',
'apcu_cas',
'apcu_dec',
'apcu_delete',
'apcu_inc',
'apcu_sma_info',
'array_combine',
Expand Down
1 change: 1 addition & 0 deletions generator/config/ignoredFunctions.php
Expand Up @@ -15,4 +15,5 @@
'forward_static_call',
'forward_static_call_array',
'readdir', //the documentation is false: the function return false at the end of the iteration
'apcu_delete', //apcu_delete returns false when the $key does not exist in the cache store
];
1 change: 0 additions & 1 deletion rector-migrate.yml
Expand Up @@ -25,7 +25,6 @@ services:
apcu_cache_info: 'Safe\apcu_cache_info'
apcu_cas: 'Safe\apcu_cas'
apcu_dec: 'Safe\apcu_dec'
apcu_delete: 'Safe\apcu_delete'
apcu_inc: 'Safe\apcu_inc'
apcu_sma_info: 'Safe\apcu_sma_info'
array_combine: 'Safe\array_combine'
Expand Down

0 comments on commit 4c86a21

Please sign in to comment.