Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"generated/Exceptions/"
],
"files": [
"deprecated/apc.php",
"deprecated/array.php",
"deprecated/datetime.php",
"deprecated/libevent.php",
Expand Down
11 changes: 0 additions & 11 deletions deprecated/Exceptions/ApcException.php

This file was deleted.

238 changes: 0 additions & 238 deletions deprecated/apc.php

This file was deleted.

10 changes: 0 additions & 10 deletions deprecated/functionsList.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
<?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',
Expand Down
1 change: 0 additions & 1 deletion generated/functionsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'apcu_fetch',
'apcu_inc',
'apcu_sma_info',
'apc_fetch',
'array_all',
'base64_decode',
'bindtextdomain',
Expand Down
1 change: 0 additions & 1 deletion generator/config/specialCasesFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
return [
'json_decode',
'apc_fetch',
'apcu_fetch',
'fputcsv',
'preg_replace',
Expand Down
6 changes: 2 additions & 4 deletions generator/tests/DeprecateCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

namespace Safe;


use PHPUnit\Framework\TestCase;

class DeprecateCommandTest extends TestCase
{
public function testExceptionName(): void
{
$this->assertEquals('Exceptions/ApcException.php', DeprecateCommand::getExceptionFilePath('apc'));
$this->assertEquals('Exceptions/PasswordException.php', DeprecateCommand::getExceptionFilePath('password'));
}

}
}
22 changes: 0 additions & 22 deletions lib/special_cases.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Safe\Exceptions\MiscException;
use Safe\Exceptions\PosixException;
use Safe\Exceptions\SocketsException;
use Safe\Exceptions\ApcException;
use Safe\Exceptions\ApcuException;
use Safe\Exceptions\JsonException;
use Safe\Exceptions\OpensslException;
Expand Down Expand Up @@ -43,27 +42,6 @@ function json_decode(string $json, bool $associative = false, int $depth = 512,
return $data;
}


/**
* Fetchs a stored variable from the cache.
*
* @param mixed $key The key used to store the value (with
* apc_store). If an array is passed then each
* element is fetched and returned.
* @return mixed The stored variable or array of variables on success; FALSE on failure
* @throws ApcException
*
*/
function apc_fetch($key)
{
error_clear_last();
$result = \apc_fetch($key, $success);
if ($success === false) {
throw ApcException::createFromPhpError();
}
return $result;
}

/**
* Fetchs an entry from the cache.
*
Expand Down
1 change: 0 additions & 1 deletion rector-migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
'apcu_fetch' => 'Safe\apcu_fetch',
'apcu_inc' => 'Safe\apcu_inc',
'apcu_sma_info' => 'Safe\apcu_sma_info',
'apc_fetch' => 'Safe\apc_fetch',
'array_all' => 'Safe\array_all',
'base64_decode' => 'Safe\base64_decode',
'bindtextdomain' => 'Safe\bindtextdomain',
Expand Down