diff --git a/.drone.yml b/.drone.yml
index 17486d8564277..99e47e18e8145 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -43,31 +43,6 @@ trigger:
- pull_request
- push
-#---
-#kind: pipeline
-#name: syntax-and-phan
-#
-#steps:
-#- name: submodules
-# image: docker:git
-# commands:
-# - git submodule update --init
-#- name: phan
-# image: nextcloudci/php7.2:php7.2-13
-# commands:
-# - composer install
-# - composer require --dev "phan/phan:0.11.1"
-# - ./lib/composer/phan/phan/phan -k build/.phan/config.php
-# - php ./build/.phan/plugin-checker.php
-#
-#trigger:
-# branch:
-# - master
-# - stable*
-# event:
-# - pull_request
-# - push
-
---
kind: pipeline
name: litmus
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 8f37cab384d39..d0f88195e58a7 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -742,7 +742,6 @@ public function getSubscriptionById($subscriptionId) {
* @param string $calendarUri
* @param array $properties
* @return int
- * @suppress SqlInjectionChecker
*/
public function createCalendar($principalUri, $calendarUri, array $properties) {
$values = [
@@ -818,9 +817,6 @@ public function updateCalendar($calendarId, PropPatch $propPatch) {
$supportedProperties = array_keys($this->propertyMap);
$supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
- /**
- * @suppress SqlInjectionChecker
- */
$propPatch->handle($supportedProperties, function ($mutations) use ($calendarId) {
$newValues = [];
foreach ($mutations as $propertyName => $propertyValue) {
@@ -2148,9 +2144,6 @@ public function updateSubscription($subscriptionId, PropPatch $propPatch) {
$supportedProperties = array_keys($this->subscriptionPropertyMap);
$supportedProperties[] = '{http://calendarserver.org/ns/}source';
- /**
- * @suppress SqlInjectionChecker
- */
$propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) {
$newValues = [];
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
index d997e486c91bc..ef824821e316b 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
@@ -381,9 +381,7 @@ private function generateDateString(IL10N $l10n, VEvent $vevent):string {
$diff = $dtstartDt->diff($dtendDt);
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
$dtstartDt = new \DateTime($dtstartDt->format(\DateTime::ATOM));
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
$dtendDt = new \DateTime($dtendDt->format(\DateTime::ATOM));
if ($isAllDay) {
@@ -400,9 +398,7 @@ private function generateDateString(IL10N $l10n, VEvent $vevent):string {
$startTimezone = $endTimezone = null;
if (!$vevent->DTSTART->isFloating()) {
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
$startTimezone = $vevent->DTSTART->getDateTime()->getTimezone()->getName();
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
$endTimezone = $this->getDTEndFromEvent($vevent)->getDateTime()->getTimezone()->getName();
}
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
index 688e5c3b106ba..769f9927e474a 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
@@ -138,15 +138,11 @@ protected function extractEventDetails(VEvent $vevent):array {
? ((string) $vevent->LOCATION)
: null,
'all_day' => $start instanceof Property\ICalendar\Date,
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
'start_atom' => $start->getDateTime()->format(\DateTime::ATOM),
'start_is_floating' => $start->isFloating(),
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
'start_timezone' => $start->getDateTime()->getTimezone()->getName(),
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
'end_atom' => $end->getDateTime()->format(\DateTime::ATOM),
'end_is_floating' => $end->isFloating(),
- /** @phan-suppress-next-line PhanUndeclaredClassMethod */
'end_timezone' => $end->getDateTime()->getTimezone()->getName(),
];
}
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index 28f48b61e9952..14ade3f16e218 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -374,9 +374,6 @@ public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatc
'{' . Plugin::NS_CARDDAV . '}addressbook-description',
];
- /**
- * @suppress SqlInjectionChecker
- */
$propPatch->handle($supportedProperties, function ($mutations) use ($addressBookId) {
$updates = [];
foreach ($mutations as $property => $newValue) {
diff --git a/apps/files_external/lib/Service/DBConfigService.php b/apps/files_external/lib/Service/DBConfigService.php
index b1313f96e45c5..eaa5815cd30ee 100644
--- a/apps/files_external/lib/Service/DBConfigService.php
+++ b/apps/files_external/lib/Service/DBConfigService.php
@@ -153,7 +153,6 @@ protected function modifyMountsOnDelete(string $applicableId, int $applicableTyp
* Get admin defined mounts
*
* @return array
- * @suppress SqlInjectionChecker
*/
public function getAdminMounts() {
$builder = $this->connection->getQueryBuilder();
@@ -198,7 +197,6 @@ public function getMountsFor($type, $value) {
* @param int $type any of the self::APPLICABLE_TYPE_ constants
* @param string|null $value user_id, group_id or null for global mounts
* @return array
- * @suppress SqlInjectionChecker
*/
public function getAdminMountsFor($type, $value) {
$builder = $this->connection->getQueryBuilder();
@@ -214,7 +212,6 @@ public function getAdminMountsFor($type, $value) {
* @param int $type any of the self::APPLICABLE_TYPE_ constants
* @param string[] $values user_ids or group_ids
* @return array
- * @suppress SqlInjectionChecker
*/
public function getAdminMountsForMultiple($type, array $values) {
$builder = $this->connection->getQueryBuilder();
@@ -238,7 +235,6 @@ public function getAdminMountsForMultiple($type, array $values) {
* @param int $type any of the self::APPLICABLE_TYPE_ constants
* @param string|null $value user_id, group_id or null for global mounts
* @return array
- * @suppress SqlInjectionChecker
*/
public function getUserMountsFor($type, $value) {
$builder = $this->connection->getQueryBuilder();
diff --git a/build/.phan/config.php b/build/.phan/config.php
deleted file mode 100644
index 04722d5b06d31..0000000000000
--- a/build/.phan/config.php
+++ /dev/null
@@ -1,226 +0,0 @@
- [
- '3rdparty',
- 'apps/',
- 'build/.phan/stubs',
- 'core/',
- 'lib/',
- 'lib/composer',
- 'ocs-provider/',
- 'ocs/',
- 'tests/lib/Util/User',
- 'themes',
- ],
- 'file_list' => [
- 'index.php',
- 'public.php',
- 'remote.php',
- 'status.php',
- 'version.php',
- ],
-
- // A directory list that defines files that will be excluded
- // from static analysis, but whose class and method
- // information should be included.
- //
- // Generally, you'll want to include the directories for
- // third-party code (such as "vendor/") in this list.
- //
- // n.b.: If you'd like to parse but not analyze 3rd
- // party code, directories containing that code
- // should be added to the `directory_list` as
- // to `exclude_analysis_directory_list`.
- 'exclude_analysis_directory_list' => [
- '3rdparty',
- 'apps/accessibility/composer',
- 'apps/admin_audit/composer',
- 'apps/admin_audit/tests',
- 'apps/cloud_federation_api/composer',
- 'apps/comments/composer',
- 'apps/comments/tests',
- 'apps/dav/composer',
- 'apps/dav/tests',
- 'apps/encryption/composer',
- 'apps/encryption/tests',
- 'apps/federatedfilesharing/composer',
- 'apps/federatedfilesharing/tests',
- 'apps/federation/composer',
- 'apps/federation/tests',
- 'apps/files/composer',
- 'apps/files/tests',
- 'apps/files_external/3rdparty',
- 'apps/files_external/composer',
- 'apps/files_external/tests',
- 'apps/files_sharing/composer',
- 'apps/files_sharing/tests',
- 'apps/files_trashbin/composer',
- 'apps/files_trashbin/tests',
- 'apps/files_versions/composer',
- 'apps/files_versions/tests',
- 'apps/lookup_server_connector/composer',
- 'apps/lookup_server_connector/tests',
- 'apps/oauth2/composer',
- 'apps/oauth2/tests',
- 'apps/provisioning_api/composer',
- 'apps/provisioning_api/tests',
- 'apps/settings/composer',
- 'apps/settings/tests',
- 'apps/sharebymail/composer',
- 'apps/sharebymail/tests',
- 'apps/systemtags/composer',
- 'apps/systemtags/tests',
- 'apps/testing/composer',
- 'apps/testing/tests',
- 'apps/theming/composer',
- 'apps/theming/tests',
- 'apps/twofactor_backupcodes/composer',
- 'apps/twofactor_backupcodes/tests',
- 'apps/updatenotification/composer',
- 'apps/updatenotification/tests',
- 'apps/user_ldap/composer',
- 'apps/user_ldap/tests',
- 'apps/workflowengine/composer',
- 'apps/workflowengine/tests',
- 'build/.phan/',
- 'lib/composer',
- ],
-
- // A file list that defines files that will be excluded
- // from parsing and analysis and will not be read at all.
- //
- // This is useful for excluding hopelessly unanalyzable
- // files that can't be removed for whatever reason.
- 'exclude_file_list' => [
- 'apps/encryption/appinfo/routes.php',
- 'apps/federation/appinfo/routes.php',
- 'apps/files/appinfo/routes.php',
- 'apps/files_external/appinfo/routes.php',
- 'apps/files_trashbin/appinfo/routes.php',
- 'apps/files_versions/appinfo/routes.php',
- 'apps/testing/appinfo/routes.php',
- 'apps/user_ldap/appinfo/routes.php',
- 'settings/routes.php',
- 'settings/ajax/updateapp.php',
- 'settings/ajax/uninstallapp.php',
- 'settings/ajax/togglesubadmins.php',
- 'settings/ajax/setquota.php',
- 'settings/ajax/enableapp.php',
- 'settings/ajax/disableapp.php',
- 'core/register_command.php',
- 'ocs/routes.php',
- 'ocs/v1.php',
- 'core/routes.php',
- ],
-
-
- // The number of processes to fork off during the analysis
- // phase.
- 'processes' => 5,
-
- // Backwards Compatibility Checking. This is slow
- // and expensive, but you should consider running
- // it before upgrading your version of PHP to a
- // new version that has backward compatibility
- // breaks.
- 'backward_compatibility_checks' => false,
-
- // Run a quick version of checks that takes less
- // time at the cost of not running as thorough
- // an analysis. You should consider setting this
- // to true only when you wish you had more issues
- // to fix in your code base.
- 'quick_mode' => false,
-
- // If true, check to make sure the return type declared
- // in the doc-block (if any) matches the return type
- // declared in the method signature. This process is
- // slow.
- 'check_docblock_signature_param_type_match' => true,
-
- // If enabled, check all methods that override a
- // parent method to make sure its signature is
- // compatible with the parent's. This check
- // can add quite a bit of time to the analysis.
- 'analyze_signature_compatibility' => true,
-
- // The minimum severity level to report on. This can be
- // set to Issue::SEVERITY_LOW, Issue::SEVERITY_NORMAL or
- // Issue::SEVERITY_CRITICAL. Setting it to only
- // critical issues is a good place to start on a big
- // sloppy mature code base.
- 'minimum_severity' => \Phan\Issue::SEVERITY_CRITICAL,
-
- // If true, missing properties will be created when
- // they are first seen. If false, we'll report an
- // error message if there is an attempt to write
- // to a class property that wasn't explicitly
- // defined.
- 'allow_missing_properties' => false,
-
- // Allow null to be cast as any type and for any
- // type to be cast to null. Setting this to false
- // will cut down on false positives.
- 'null_casts_as_any_type' => false,
-
- // Allow null to be cast as any array-like type (Requires 0.9.3+)
- // This is an incremental step in migrating away from null_casts_as_any_type.
- // If null_casts_as_any_type is true, this has no effect.
- 'null_casts_as_array' => false,
-
- // Allow any array-like type to be cast to null. (Requires 0.9.3+)
- // This is an incremental step in migrating away from null_casts_as_any_type.
- // If null_casts_as_any_type is true, this has no effect.
- 'array_casts_as_null' => false,
-
- // If enabled, scalars (int, float, bool, true, false, string, null)
- // are treated as if they can cast to each other.
- 'scalar_implicit_cast' => true,
-
- // If this has entries, scalars (int, float, bool, true, false, string, null)
- // are allowed to perform the casts listed.
- // E.g. ['int' => ['float', 'string'], 'float' => ['int'], 'string' => ['int'], 'null' => ['string']]
- // allows casting null to a string, but not vice versa.
- // (subset of scalar_implicit_cast)
- // (Requires 0.9.3+)
- 'scalar_implicit_partial' => [],
-
- // If true, seemingly undeclared variables in the global
- // scope will be ignored. This is useful for projects
- // with complicated cross-file globals that you have no
- // hope of fixing.
- 'ignore_undeclared_variables_in_global_scope' => true,
-
- // Add any issue types (such as 'PhanUndeclaredMethod')
- // to this black-list to inhibit them from being reported.
- 'suppress_issue_types' => [
- // 'PhanUndeclaredMethod',
- ],
-
- // If empty, no filter against issues types will be applied.
- // If this white-list is non-empty, only issues within the list
- // will be emitted by Phan.
- 'whitelist_issue_types' => [
- // 'PhanAccessMethodPrivate',
- ],
-
- // A list of plugin files to execute
- 'plugins' => [
- 'build/.phan/plugins/SqlInjectionCheckerPlugin.php',
- ],
-];
diff --git a/build/.phan/plugin-checker.php b/build/.phan/plugin-checker.php
deleted file mode 100644
index f7946fc2a420d..0000000000000
--- a/build/.phan/plugin-checker.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see
Note: When control enters apcu_entry() the lock for the cache is acquired exclusively, it is released when - * control leaves apcu_entry(): In effect, this turns the body of generator into a critical section, - * disallowing two processes from executing the same code paths concurrently. - * In addition, it prohibits the concurrent execution of any other APCu functions, - * since they will acquire the same lock. - *
- * - * @link http://php.net/manual/en/function.apcu-entry.php - * - * @param string $key Identity of cache entry - * @param callable $generator A callable that accepts key as the only argument and returns the value to cache. - *Warning - * The only APCu function that can be called safely by generator is apcu_entry().
- * @param int $ttl [optional] Time To Live; store var in the cache for ttl seconds. - * After the ttl has passed, the stored variable will be expunged from the cache (on the next request). - * If no ttl is supplied (or if the ttl is 0), the value will persist until it is removed from the cache manually, - * or otherwise fails to exist in the cache (clear, restart, etc.). - * @return mixed Returns the cached value - * @since APCu 5.1.0 - */ -function apcu_entry($key, callable $generator, $ttl = 0){} - -/** - * Retrieves cached information from APCu's data store - * - * @link http://php.net/manual/en/function.apcu-cache-info.php - * - * @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|bool Array of cached data (and meta-data) or FALSE on failure - */ -function apcu_cache_info($limited = false){} diff --git a/build/.phan/stubs/memcached.php b/build/.phan/stubs/memcached.php deleted file mode 100644 index 2c8aced175eb9..0000000000000 --- a/build/.phan/stubs/memcached.php +++ /dev/null @@ -1,1257 +0,0 @@ -Enables or disables payload compression. When enabled, - * item values longer than a certain threshold (currently 100 bytes) will be - * compressed during storage and decompressed during retrieval - * transparently. - *Type: boolean, default: TRUE.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_COMPRESSION = -1001; - const OPT_COMPRESSION_TYPE = -1004; - - /** - *This can be used to create a "domain" for your item keys. The value - * specified here will be prefixed to each of the keys. It cannot be - * longer than 128 characters and will reduce the - * maximum available key size. The prefix is applied only to the item keys, - * not to the server keys.
- *Type: string, default: "".
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_PREFIX_KEY = -1002; - - /** - *- * Specifies the serializer to use for serializing non-scalar values. - * The valid serializers are Memcached::SERIALIZER_PHP - * or Memcached::SERIALIZER_IGBINARY. The latter is - * supported only when memcached is configured with - * --enable-memcached-igbinary option and the - * igbinary extension is loaded. - *
- *Type: integer, default: Memcached::SERIALIZER_PHP.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_SERIALIZER = -1003; - - /** - *Indicates whether igbinary serializer support is available.
- *Type: boolean.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HAVE_IGBINARY = 0; - - /** - *Indicates whether JSON serializer support is available.
- *Type: boolean.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HAVE_JSON = 0; - const HAVE_SESSION = 1; - const HAVE_SASL = 0; - - /** - *Specifies the hashing algorithm used for the item keys. The valid - * values are supplied via Memcached::HASH_* constants. - * Each hash algorithm has its advantages and its disadvantages. Go with the - * default if you don't know or don't care.
- *Type: integer, default: Memcached::HASH_DEFAULT
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_HASH = 2; - - /** - *The default (Jenkins one-at-a-time) item key hashing algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HASH_DEFAULT = 0; - - /** - *MD5 item key hashing algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HASH_MD5 = 1; - - /** - *CRC item key hashing algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HASH_CRC = 2; - - /** - *FNV1_64 item key hashing algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1_64 = 3; - - /** - *FNV1_64A item key hashing algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1A_64 = 4; - - /** - *FNV1_32 item key hashing algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1_32 = 5; - - /** - *FNV1_32A item key hashing algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HASH_FNV1A_32 = 6; - - /** - *Hsieh item key hashing algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HASH_HSIEH = 7; - - /** - *Murmur item key hashing algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const HASH_MURMUR = 8; - - /** - *Specifies the method of distributing item keys to the servers. - * Currently supported methods are modulo and consistent hashing. Consistent - * hashing delivers better distribution and allows servers to be added to - * the cluster with minimal cache losses.
- *Type: integer, default: Memcached::DISTRIBUTION_MODULA.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_DISTRIBUTION = 9; - - /** - *Modulo-based key distribution algorithm.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const DISTRIBUTION_MODULA = 0; - - /** - *Consistent hashing key distribution algorithm (based on libketama).
- * @link http://php.net/manual/en/memcached.constants.php - */ - const DISTRIBUTION_CONSISTENT = 1; - const DISTRIBUTION_VIRTUAL_BUCKET = 6; - - /** - *Enables or disables compatibility with libketama-like behavior. When - * enabled, the item key hashing algorithm is set to MD5 and distribution is - * set to be weighted consistent hashing distribution. This is useful - * because other libketama-based clients (Python, Ruby, etc.) with the same - * server configuration will be able to access the keys transparently. - *
- *- * It is highly recommended to enable this option if you want to use - * consistent hashing, and it may be enabled by default in future - * releases. - *
- *Type: boolean, default: FALSE.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_LIBKETAMA_COMPATIBLE = 16; - const OPT_LIBKETAMA_HASH = 17; - const OPT_TCP_KEEPALIVE = 32; - - /** - *Enables or disables buffered I/O. Enabling buffered I/O causes - * storage commands to "buffer" instead of being sent. Any action that - * retrieves data causes this buffer to be sent to the remote connection. - * Quitting the connection or closing down the connection will also cause - * the buffered data to be pushed to the remote connection.
- *Type: boolean, default: FALSE.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_BUFFER_WRITES = 10; - - /** - *Enable the use of the binary protocol. Please note that you cannot - * toggle this option on an open connection.
- *Type: boolean, default: FALSE.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_BINARY_PROTOCOL = 18; - - /** - *Enables or disables asynchronous I/O. This is the fastest transport - * available for storage functions.
- *Type: boolean, default: FALSE.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_NO_BLOCK = 0; - - /** - *Enables or disables the no-delay feature for connecting sockets (may - * be faster in some environments).
- *Type: boolean, default: FALSE.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_TCP_NODELAY = 1; - - /** - *The maximum socket send buffer in bytes.
- *Type: integer, default: varies by platform/kernel - * configuration.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_SOCKET_SEND_SIZE = 4; - - /** - *The maximum socket receive buffer in bytes.
- *Type: integer, default: varies by platform/kernel - * configuration.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_SOCKET_RECV_SIZE = 5; - - /** - *In non-blocking mode this set the value of the timeout during socket - * connection, in milliseconds.
- *Type: integer, default: 1000.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_CONNECT_TIMEOUT = 14; - - /** - *The amount of time, in seconds, to wait until retrying a failed - * connection attempt.
- *Type: integer, default: 0.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_RETRY_TIMEOUT = 15; - - /** - *Socket sending timeout, in microseconds. In cases where you cannot - * use non-blocking I/O this will allow you to still have timeouts on the - * sending of data.
- *Type: integer, default: 0.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_SEND_TIMEOUT = 19; - - /** - *Socket reading timeout, in microseconds. In cases where you cannot - * use non-blocking I/O this will allow you to still have timeouts on the - * reading of data.
- *Type: integer, default: 0.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_RECV_TIMEOUT = 20; - - /** - *Timeout for connection polling, in milliseconds.
- *Type: integer, default: 1000.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_POLL_TIMEOUT = 8; - - /** - *Enables or disables caching of DNS lookups.
- *Type: boolean, default: FALSE.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_CACHE_LOOKUPS = 6; - - /** - *Specifies the failure limit for server connection attempts. The - * server will be removed after this many continuous connection - * failures.
- *Type: integer, default: 0.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const OPT_SERVER_FAILURE_LIMIT = 21; - const OPT_AUTO_EJECT_HOSTS = 28; - const OPT_HASH_WITH_PREFIX_KEY = 25; - const OPT_NOREPLY = 26; - const OPT_SORT_HOSTS = 12; - const OPT_VERIFY_KEY = 13; - const OPT_USE_UDP = 27; - const OPT_NUMBER_OF_REPLICAS = 29; - const OPT_RANDOMIZE_REPLICA_READ = 30; - const OPT_REMOVE_FAILED_SERVERS = 35; - - /** - *The operation was successful.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_SUCCESS = 0; - - /** - *The operation failed in some fashion.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_FAILURE = 1; - - /** - *DNS lookup failed.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_HOST_LOOKUP_FAILURE = 2; - - /** - *Failed to read network data.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_UNKNOWN_READ_FAILURE = 7; - - /** - *Bad command in memcached protocol.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_PROTOCOL_ERROR = 8; - - /** - *Error on the client side.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_CLIENT_ERROR = 9; - - /** - *Error on the server side.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_SERVER_ERROR = 10; - - /** - *Failed to write network data.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_WRITE_FAILURE = 5; - - /** - *Failed to do compare-and-swap: item you are trying to store has been - * modified since you last fetched it.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_DATA_EXISTS = 12; - - /** - *Item was not stored: but not because of an error. This normally - * means that either the condition for an "add" or a "replace" command - * wasn't met, or that the item is in a delete queue.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_NOTSTORED = 14; - - /** - *Item with this key was not found (with "get" operation or "cas" - * operations).
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_NOTFOUND = 16; - - /** - *Partial network data read error.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_PARTIAL_READ = 18; - - /** - *Some errors occurred during multi-get.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_SOME_ERRORS = 19; - - /** - *Server list is empty.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_NO_SERVERS = 20; - - /** - *End of result set.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_END = 21; - - /** - *System error.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_ERRNO = 26; - - /** - *The operation was buffered.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_BUFFERED = 32; - - /** - *The operation timed out.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_TIMEOUT = 31; - - /** - *Bad key.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_BAD_KEY_PROVIDED = 33; - const RES_STORED = 15; - const RES_DELETED = 22; - const RES_STAT = 24; - const RES_ITEM = 25; - const RES_NOT_SUPPORTED = 28; - const RES_FETCH_NOTFINISHED = 30; - const RES_SERVER_MARKED_DEAD = 35; - const RES_UNKNOWN_STAT_KEY = 36; - const RES_INVALID_HOST_PROTOCOL = 34; - const RES_MEMORY_ALLOCATION_FAILURE = 17; - const RES_E2BIG = 37; - const RES_KEY_TOO_BIG = 39; - const RES_SERVER_TEMPORARILY_DISABLED = 47; - const RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48; - const RES_AUTH_PROBLEM = 40; - const RES_AUTH_FAILURE = 41; - const RES_AUTH_CONTINUE = 42; - - - /** - *Failed to create network socket.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11; - - /** - *Payload failure: could not compress/decompress or serialize/unserialize the value.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const RES_PAYLOAD_FAILURE = -1001; - - /** - *The default PHP serializer.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const SERIALIZER_PHP = 1; - - /** - *The igbinary serializer. - * Instead of textual representation it stores PHP data structures in a - * compact binary form, resulting in space and time gains.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const SERIALIZER_IGBINARY = 2; - - /** - *The JSON serializer. Requires PHP 5.2.10+.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const SERIALIZER_JSON = 3; - const SERIALIZER_JSON_ARRAY = 4; - const COMPRESSION_FASTLZ = 2; - const COMPRESSION_ZLIB = 1; - - /** - *A flag for Memcached::getMulti and - * Memcached::getMultiByKey to ensure that the keys are - * returned in the same order as they were requested in. Non-existing keys - * get a default value of NULL.
- * @link http://php.net/manual/en/memcached.constants.php - */ - const GET_PRESERVE_ORDER = 1; - const GET_ERROR_RETURN_VALUE = false; - - - /** - * (PECL memcached >= 0.1.0)- * The key of the item to retrieve. - *
- * @param callable $cache_cb [optional]- * Read-through caching callback or NULL. - *
- * @param float $cas_token [optional]- * The variable to store the CAS token in. - *
- * @return mixed the value stored in the cache or FALSE otherwise. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function get ($key, callable $cache_cb = null, &$cas_token = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key of the item to fetch. - *
- * @param callable $cache_cb [optional]- * Read-through caching callback or NULL - *
- * @param float $cas_token [optional]- * The variable to store the CAS token in. - *
- * @return mixed the value stored in the cache or FALSE otherwise. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function getByKey ($server_key, $key, callable $cache_cb = null, &$cas_token = null) {} - - /** - * (PECL memcached >= 0.1.0)- * Array of keys to retrieve. - *
- * @param array $cas_tokens [optional]- * The variable to store the CAS tokens for the found items. - *
- * @param int $flags [optional]- * The flags for the get operation. - *
- * @return mixed the array of found items or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getMulti (array $keys, array &$cas_tokens = null, $flags = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param array $keys- * Array of keys to retrieve. - *
- * @param string $cas_tokens [optional]- * The variable to store the CAS tokens for the found items. - *
- * @param int $flags [optional]- * The flags for the get operation. - *
- * @return array the array of found items or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getMultiByKey ($server_key, array $keys, &$cas_tokens = null, $flags = null) {} - - /** - * (PECL memcached >= 0.1.0)- * Array of keys to request. - *
- * @param bool $with_cas [optional]- * Whether to request CAS token values also. - *
- * @param callable $value_cb [optional]- * The result callback or NULL. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getDelayed (array $keys, $with_cas = null, callable $value_cb = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param array $keys- * Array of keys to request. - *
- * @param bool $with_cas [optional]- * Whether to request CAS token values also. - *
- * @param callable $value_cb [optional]- * The result callback or NULL. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getDelayedByKey ($server_key, array $keys, $with_cas = null, callable $value_cb = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function set ($key, $value, $expiration = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function setByKey ($server_key, $key, $value, $expiration = null) {} - - /** - * (PECL memcached >= 2.0.0)- * The key under which to store the value. - *
- * @param int $expiration- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function touch ($key, $expiration) {} - - /** - * (PECL memcached >= 2.0.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param int $expiration- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function touchByKey ($server_key, $key, $expiration) {} - - /** - * (PECL memcached >= 0.1.0)- * An array of key/value pairs to store on the server. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function setMulti (array $items, $expiration = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param array $items- * An array of key/value pairs to store on the server. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function setMultiByKey ($server_key, array $items, $expiration = null) {} - - /** - * (PECL memcached >= 0.1.0)- * Unique value associated with the existing item. Generated by memcache. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_DATA_EXISTS if the item you are trying - * to store has been modified since you last fetched it. - */ - public function cas ($cas_token, $key, $value, $expiration = null) {} - - /** - * (PECL memcached >= 0.1.0)- * Unique value associated with the existing item. Generated by memcache. - *
- * @param string $server_key- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_DATA_EXISTS if the item you are trying - * to store has been modified since you last fetched it. - */ - public function casByKey ($cas_token, $server_key, $key, $value, $expiration = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key already exists. - */ - public function add ($key, $value, $expiration = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key already exists. - */ - public function addByKey ($server_key, $key, $value, $expiration = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key under which to store the value. - *
- * @param string $value- * The string to append. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function append ($key, $value) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param string $value- * The string to append. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function appendByKey ($server_key, $key, $value) {} - - /** - * (PECL memcached >= 0.1.0)- * The key of the item to prepend the data to. - *
- * @param string $value- * The string to prepend. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function prepend ($key, $value) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key of the item to prepend the data to. - *
- * @param string $value- * The string to prepend. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function prependByKey ($server_key, $key, $value) {} - - /** - * (PECL memcached >= 0.1.0)- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function replace ($key, $value, $expiration = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key under which to store the value. - *
- * @param mixed $value- * The value to store. - *
- * @param int $expiration [optional]- * The expiration time, defaults to 0. See Expiration Times for more info. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTSTORED if the key does not exist. - */ - public function replaceByKey ($server_key, $key, $value, $expiration = null) {} - - /** - * (PECL memcached >= 0.1.0)- * The key to be deleted. - *
- * @param int $time [optional]- * The amount of time the server will wait to delete the item. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function delete ($key, $time = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The keys to be deleted. - *
- * @param int $time [optional]- * The amount of time the server will wait to delete the items. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function deleteMulti (array $keys, $time = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key to be deleted. - *
- * @param int $time [optional]- * The amount of time the server will wait to delete the item. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function deleteByKey ($server_key, $key, $time = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param array $keys- * The keys to be deleted. - *
- * @param int $time [optional]- * The amount of time the server will wait to delete the items. - *
- * @return bool TRUE on success or FALSE on failure. - * The Memcached::getResultCode will return - * Memcached::RES_NOTFOUND if the key does not exist. - */ - public function deleteMultiByKey ($server_key, array $keys, $time = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key of the item to increment. - *
- * @param int $offset [optional]- * The amount by which to increment the item's value. - *
- * @param int $initial_value [optional]- * The value to set the item to if it doesn't currently exist. - *
- * @param int $expiry [optional]- * The expiry time to set on the item. - *
- * @return int new item's value on success or FALSE on failure. - */ - public function increment ($key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The key of the item to decrement. - *
- * @param int $offset [optional]- * The amount by which to decrement the item's value. - *
- * @param int $initial_value [optional]- * The value to set the item to if it doesn't currently exist. - *
- * @param int $expiry [optional]- * The expiry time to set on the item. - *
- * @return int item's new value on success or FALSE on failure. - */ - public function decrement ($key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key of the item to increment. - *
- * @param int $offset [optional]- * The amount by which to increment the item's value. - *
- * @param int $initial_value [optional]- * The value to set the item to if it doesn't currently exist. - *
- * @param int $expiry [optional]- * The expiry time to set on the item. - *
- * @return int new item's value on success or FALSE on failure. - */ - public function incrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 2.0.0)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @param string $key- * The key of the item to decrement. - *
- * @param int $offset [optional]- * The amount by which to decrement the item's value. - *
- * @param int $initial_value [optional]- * The value to set the item to if it doesn't currently exist. - *
- * @param int $expiry [optional]- * The expiry time to set on the item. - *
- * @return int item's new value on success or FALSE on failure. - */ - public function decrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * The hostname of the memcache server. If the hostname is invalid, data-related - * operations will set - * Memcached::RES_HOST_LOOKUP_FAILURE result code. - *
- * @param int $port- * The port on which memcache is running. Usually, this is - * 11211. - *
- * @param int $weight [optional]- * The weight of the server relative to the total weight of all the - * servers in the pool. This controls the probability of the server being - * selected for operations. This is used only with consistent distribution - * option and usually corresponds to the amount of memory available to - * memcache on that server. - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function addServer ($host, $port, $weight = 0) {} - - /** - * (PECL memcached >= 0.1.1)- * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations. - *
- * @return array an array containing three keys of host, - * port, and weight on success or FALSE - * on failure. - * Use Memcached::getResultCode if necessary. - */ - public function getServerByKey ($server_key) {} - - /** - * (PECL memcached >= 2.0.0)- * Numer of seconds to wait before invalidating the items. - *
- * @return bool TRUE on success or FALSE on failure. - * Use Memcached::getResultCode if necessary. - */ - public function flush ($delay = 0) {} - - /** - * (PECL memcached >= 0.1.0)- * One of the Memcached::OPT_* constants. - *
- * @return mixed the value of the requested option, or FALSE on - * error. - */ - public function getOption ($option) {} - - /** - * (PECL memcached >= 0.1.0)- * An associative array of options where the key is the option to set and - * the value is the new value for the option. - *
- * @return bool TRUE on success or FALSE on failure. - */ - public function setOptions (array $options) {} - - /** - * (PECL memcached >= 2.0.0)