From aeecb72e96e54439f98822467bb727366207039f Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 6 Jan 2022 16:57:32 +0100 Subject: [PATCH] Fix a few psalm issues and moved back to psalm/phar 4.18 Signed-off-by: Carl Schwan --- apps/encryption/lib/Crypto/Crypt.php | 4 +- apps/encryption/lib/KeyManager.php | 2 +- .../lib/Migration/SetMasterKeyStatus.php | 4 +- apps/encryption/lib/Recovery.php | 2 +- .../lib/Lib/Storage/FtpConnection.php | 2 +- .../lib/SetupChecks/CheckUserCertificates.php | 5 +- apps/user_ldap/lib/Access.php | 2 +- build/psalm-baseline-ocp.xml | 6 +- build/psalm-baseline.xml | 279 ++- build/stubs/ftp.php | 74 + build/stubs/gd.php | 6 + build/stubs/ldap.php | 1584 +---------------- build/stubs/pcntl.php | 50 + composer.json | 4 +- core/Command/App/GetPath.php | 2 +- core/Command/Config/App/GetConfig.php | 2 +- core/Command/Config/System/GetConfig.php | 4 +- lib/composer/composer/installed.php | 4 +- .../Collaboration/Resources/Manager.php | 2 +- lib/private/Files/View.php | 2 +- lib/private/Installer.php | 139 +- lib/private/Memcache/Memcached.php | 1 + lib/private/Notification/Manager.php | 4 +- psalm-ocp.xml | 4 + psalm.xml | 9 +- vendor-bin/psalm/composer.json | 6 +- vendor-bin/psalm/composer.lock | 31 +- 27 files changed, 507 insertions(+), 1727 deletions(-) create mode 100644 build/stubs/ftp.php create mode 100644 build/stubs/pcntl.php diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php index 8a6be4d3809..93120068c6a 100644 --- a/apps/encryption/lib/Crypto/Crypt.php +++ b/apps/encryption/lib/Crypto/Crypt.php @@ -237,7 +237,7 @@ class Crypt { $encryptedContent = openssl_encrypt($plainContent, $cipher, $passPhrase, - false, + 0, $iv); if (!$encryptedContent) { @@ -617,7 +617,7 @@ class Crypt { $plainContent = openssl_decrypt($encryptedContent, $cipher, $passPhrase, - false, + 0, $iv); if ($plainContent) { diff --git a/apps/encryption/lib/KeyManager.php b/apps/encryption/lib/KeyManager.php index 4a2c6c16e2b..ffd07c0f323 100644 --- a/apps/encryption/lib/KeyManager.php +++ b/apps/encryption/lib/KeyManager.php @@ -159,7 +159,7 @@ class KeyManager { $this->config->setAppValue('encryption', 'masterKeyId', $this->masterKeyId); } - $this->keyId = $userSession && $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : false; + $this->keyId = $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : false; $this->log = $log; } diff --git a/apps/encryption/lib/Migration/SetMasterKeyStatus.php b/apps/encryption/lib/Migration/SetMasterKeyStatus.php index 9e800ac7cd3..a80d7144cc4 100644 --- a/apps/encryption/lib/Migration/SetMasterKeyStatus.php +++ b/apps/encryption/lib/Migration/SetMasterKeyStatus.php @@ -62,8 +62,8 @@ class SetMasterKeyStatus implements IRepairStep { // if no config for the master key is set we set it explicitly to '0' in // order not to break old installations because the default changed to '1'. - $configAlreadySet = $this->config->getAppValue('encryption', 'useMasterKey', false); - if ($configAlreadySet === false) { + $configAlreadySet = $this->config->getAppValue('encryption', 'useMasterKey', 'not-set'); + if ($configAlreadySet === 'not-set') { $this->config->setAppValue('encryption', 'useMasterKey', '0'); } } diff --git a/apps/encryption/lib/Recovery.php b/apps/encryption/lib/Recovery.php index 22a668cd5b0..f4336ec7c4e 100644 --- a/apps/encryption/lib/Recovery.php +++ b/apps/encryption/lib/Recovery.php @@ -76,7 +76,7 @@ class Recovery { IConfig $config, IFile $file, View $view) { - $this->user = ($userSession && $userSession->isLoggedIn()) ? $userSession->getUser() : false; + $this->user = ($userSession->isLoggedIn()) ? $userSession->getUser() : null; $this->crypt = $crypt; $this->keyManager = $keyManager; $this->config = $config; diff --git a/apps/files_external/lib/Lib/Storage/FtpConnection.php b/apps/files_external/lib/Lib/Storage/FtpConnection.php index d87c44656f4..bc4be18e42e 100644 --- a/apps/files_external/lib/Lib/Storage/FtpConnection.php +++ b/apps/files_external/lib/Lib/Storage/FtpConnection.php @@ -27,7 +27,7 @@ namespace OCA\Files_External\Lib\Storage; * Low level wrapper around the ftp functions that smooths over some difference between servers */ class FtpConnection { - /** @var resource */ + /** @var resource|\FTP\Connection */ private $connection; public function __construct(bool $secure, string $hostname, int $port, string $username, string $password) { diff --git a/apps/settings/lib/SetupChecks/CheckUserCertificates.php b/apps/settings/lib/SetupChecks/CheckUserCertificates.php index eff5b4d7515..52fea7b6551 100644 --- a/apps/settings/lib/SetupChecks/CheckUserCertificates.php +++ b/apps/settings/lib/SetupChecks/CheckUserCertificates.php @@ -39,10 +39,7 @@ class CheckUserCertificates { public function __construct(IL10N $l10n, IConfig $config, IURLGenerator $urlGenerator) { $this->l10n = $l10n; - $configValue = $config->getAppValue('files_external', 'user_certificate_scan', false); - if (!is_string($configValue)) { - $configValue = ''; - } + $configValue = $config->getAppValue('files_external', 'user_certificate_scan', ''); $this->configValue = $configValue; $this->urlGenerator = $urlGenerator; } diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index f79efe90996..093449ee0ea 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1753,7 +1753,7 @@ class Access extends LDAPUtility { } $attribute = $this->connection->getFromCache($uuidAttr); - if (!$attribute === null) { + if ($attribute !== null) { $this->connection->$uuidAttr = $attribute; return true; } diff --git a/build/psalm-baseline-ocp.xml b/build/psalm-baseline-ocp.xml index 6f6aa5b85e3..87a994ea720 100644 --- a/build/psalm-baseline-ocp.xml +++ b/build/psalm-baseline-ocp.xml @@ -1,5 +1,5 @@ - + null|string @@ -220,7 +220,9 @@ float - + + \OC + \OC \OC \OC \OC diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 4f78db386e3..9d4ef09a30b 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $calendarData @@ -36,6 +36,11 @@ array + + + registerEventListener + + $e->getCode() @@ -44,6 +49,12 @@ !is_array($notification) + + + registerEventListener + registerEventListener + + (int) $comment->getId() @@ -54,6 +65,11 @@ \Sabre\Uri\split($this->principalUri) + + + registerEventListener + + new \Sabre\DAV\Auth\Plugin($authBackend, 'ownCloud') @@ -112,6 +128,36 @@ + + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + registerEventListener + getAppDataDir @@ -314,6 +360,11 @@ @var VEvent $vevent + + + $provider::NOTIFICATION_TYPE + + $this->l10n->l('date', $dt, ['width' => 'medium']) @@ -1005,6 +1056,9 @@ array + + array_values + @@ -1022,7 +1076,8 @@ - + + $userSession $userSession @@ -1058,9 +1113,6 @@ throw $exception; - - $userSession - @@ -1068,9 +1120,6 @@ 0 1 - - $userSession - @@ -1078,10 +1127,16 @@ - + + $userSession $userSession + + + registerEventListener + + $id @@ -1136,6 +1191,11 @@ null + + + registerEventListener + + 'OCP\Federation\TrustedServerEvent::remove' @@ -1180,6 +1240,12 @@ 10 * 1024 * 1024 + + + registerEventListener + registerEventListener + + null @@ -1269,6 +1335,12 @@ $this + + + registerEventListener + registerEventListener + + null @@ -1318,6 +1390,12 @@ getUniqueStorages + + + addServiceListener + addServiceListener + + self @@ -1506,6 +1584,16 @@ $_ + + + addServiceListener + addServiceListener + addServiceListener + addServiceListener + addServiceListener + addServiceListener + + false @@ -1525,11 +1613,17 @@ + + $permissions + $code $code Constants::PERMISSION_ALL + + $permissions & Constants::PERMISSION_READ + \OCA\Circles\Api\v1\Circles \OCA\Circles\Api\v1\Circles @@ -1597,6 +1691,11 @@ $exception->getMessage() + + + array_values + + $itemSource @@ -1709,9 +1808,13 @@ - + + $trashFiles $trashFiles + + null + $file getById @@ -1735,6 +1838,12 @@ $this + + + registerEventListener + registerEventListener + + getChild @@ -1778,6 +1887,11 @@ + + + registerEventListener + + $quota @@ -1788,6 +1902,11 @@ + + registerEventListener + registerEventListener + registerEventListener + \OC_User::getUser() @@ -1829,6 +1948,11 @@ isReady + + + false + + Constants::PERMISSION_ALL @@ -1865,6 +1989,11 @@ $type + + + registerEventListener + + $response @@ -1905,6 +2034,14 @@ $folder !== null + + + registerEventListener + registerEventListener + registerEventListener + registerEventListener + + bool @@ -1922,6 +2059,9 @@ + + false + $this->users @@ -2122,7 +2262,6 @@ null - null $this->getHomePath($ldapEntry[$attr][0]) @@ -2181,10 +2320,20 @@ + + registerEventListener + registerEventListener + registerEventListener + registerProvider + + + registerEventListener + + null @@ -2279,6 +2428,19 @@ isUserScopeEnabled + + + addServiceListener + addServiceListener + addServiceListener + addServiceListener + addServiceListener + addServiceListener + addServiceListener + addServiceListener + addServiceListener + + $arguments @@ -2294,14 +2456,6 @@ $arguments - - - null|int - - - null|int - - $result === false @@ -2312,14 +2466,6 @@ array - - - null|int - - - null|int - - 0 @@ -2334,14 +2480,6 @@ getFilteredValues - - - null|int - - - null|int - - IDBConnection::ADD_MISSING_COLUMNS_EVENT @@ -2497,13 +2635,19 @@ $this + + + false + + getIcon - + + $this->memoryCache $this->memoryCache @@ -2512,8 +2656,10 @@ getAppsNeedingUpgrade getIncompatibleApps - + $restrictions + addServiceListener + addServiceListener ((array)$request->getParam('appid')) !== '' @@ -3337,7 +3483,8 @@ null - + + $userObject $userObject @@ -3523,6 +3670,9 @@ + + $source + $source $target @@ -3726,6 +3876,11 @@ + + \Normalizer::FORM_C + \Normalizer::FORM_C + \Normalizer::FORM_D + $this->namesCache $this->namesCache @@ -3816,6 +3971,11 @@ stream_flush + + + !$isDefaultTemplates + + $mimetype @@ -3865,9 +4025,11 @@ null null - - $data + + $result $result && in_array('delete', $hooks) and $result + Constants::PERMISSION_READ + Constants::PERMISSION_READ is_resource($source) @@ -3906,7 +4068,10 @@ $user - + + $this->emitter + $this->emitter + $this->emitter $this->emitter $this->emitter $this->emitter @@ -3949,6 +4114,10 @@ false + + false + false + $app['path'] $app['path'] @@ -3956,9 +4125,6 @@ null - - $archive - @@ -4030,7 +4196,8 @@ - + + $request $request @@ -4203,6 +4370,11 @@ dispatch + + + false + + $arguments @@ -4212,6 +4384,9 @@ $arguments + + $counter % 100 === 0 + @@ -4512,6 +4687,14 @@ dispatch + + + \OCP\ITags + + + null + + [$this->user, $this->type, $chunk] @@ -4543,6 +4726,9 @@ + + false + $this->appendIfExist($this->serverroot, $script.'.js') $this->appendIfExist($this->serverroot, $theme_dir.$script.'.js') @@ -4610,6 +4796,9 @@ array|int + + $callback + bool|IUser diff --git a/build/stubs/ftp.php b/build/stubs/ftp.php new file mode 100644 index 00000000000..c2505d5a566 --- /dev/null +++ b/build/stubs/ftp.php @@ -0,0 +1,74 @@ + - * If you are using OpenLDAP 2.x.x you can specify a URL instead of the - * hostname. To use LDAP with SSL, compile OpenLDAP 2.x.x with SSL - * support, configure PHP with SSL, and set this parameter as - * ldaps://hostname/. - *

- * @param int $port [optional]

- * The port to connect to. Not used when using URLs. - *

- * @return resource|false a positive LDAP link identifier on success, or FALSE on error. - * When OpenLDAP 2.x.x is used, ldap_connect will always - * return a resource as it does not actually connect but just - * initializes the connecting parameters. The actual connect happens with - * the next calls to ldap_* funcs, usually with - * ldap_bind. - *

- *

- * If no arguments are specified then the link identifier of the already - * opened link will be returned. - */ -function ldap_connect ($hostname = null, $port = 389) {} - -/** - * Alias of ldap_unbind - * @link https://php.net/manual/en/function.ldap-close.php - * @param $link_identifier - */ -function ldap_close ($link_identifier) {} - -/** - * Bind to LDAP directory - * @link https://php.net/manual/en/function.ldap-bind.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $bind_rdn [optional] - * @param string $bind_password [optional] - * @return bool TRUE on success or FALSE on failure. - */ -function ldap_bind ($link_identifier, $bind_rdn = null, $bind_password = null) {} - -/** - * Bind to LDAP directory - * Does the same thing as ldap_bind() but returns the LDAP result resource to be parsed with ldap_parse_result(). - * @link https://php.net/manual/en/function.ldap-bind.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $bind_rdn [optional] - * @param string $bind_password [optional] - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false - * @since 7.3 - */ -function ldap_bind_ext ($link_identifier, $bind_rdn = null, $bind_password = null, $serverctrls = []) {} - - -/** - * Bind to LDAP directory using SASL - * @link https://php.net/manual/en/function.ldap-sasl-bind.php - * @param resource $link - * @param string $binddn [optional] - * @param string $password [optional] - * @param string $sasl_mech [optional] - * @param string $sasl_realm [optional] - * @param string $sasl_authc_id [optional] - * @param string $sasl_authz_id [optional] - * @param string $props [optional] - * @return bool TRUE on success or FALSE on failure. - */ -function ldap_sasl_bind ($link, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authc_id = null, $sasl_authz_id = null, $props = null) {} - -/** - * Unbind from LDAP directory - * @link https://php.net/manual/en/function.ldap-unbind.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @return bool TRUE on success or FALSE on failure. - */ -function ldap_unbind ($link_identifier) {} - -/** - * Read an entry - * @link https://php.net/manual/en/function.ldap-read.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $base_dn

- * The base DN for the directory. - *

- * @param string $filter

- * An empty filter is not allowed. If you want to retrieve absolutely all - * information for this entry, use a filter of - * objectClass=*. If you know which entry types are - * used on the directory server, you might use an appropriate filter such - * as objectClass=inetOrgPerson. - *

- * @param array $attributes [optional]

- * An array of the required attributes, e.g. array("mail", "sn", "cn"). - * Note that the "dn" is always returned irrespective of which attributes - * types are requested. - *

- *

- * Using this parameter is much more efficient than the default action - * (which is to return all attributes and their associated values). - * The use of this parameter should therefore be considered good - * practice. - *

- * @param int $attrsonly [optional]

- * Should be set to 1 if only attribute types are wanted. If set to 0 - * both attributes types and attribute values are fetched which is the - * default behaviour. - *

- * @param int $sizelimit [optional]

- * Enables you to limit the count of entries fetched. Setting this to 0 - * means no limit. - *

- *

- * This parameter can NOT override server-side preset sizelimit. You can - * set it lower though. - *

- *

- * Some directory server hosts will be configured to return no more than - * a preset number of entries. If this occurs, the server will indicate - * that it has only returned a partial results set. This also occurs if - * you use this parameter to limit the count of fetched entries. - *

- * @param int $timelimit [optional]

- * Sets the number of seconds how long is spend on the search. Setting - * this to 0 means no limit. - *

- *

- * This parameter can NOT override server-side preset timelimit. You can - * set it lower though. - *

- * @param int $deref [optional]

- * Specifies how aliases should be handled during the search. It can be - * one of the following: - * LDAP_DEREF_NEVER - (default) aliases are never - * dereferenced. - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false a search result identifier or FALSE on error. - */ -function ldap_read ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $serverctrls = []) {} - -/** - * Single-level search - * @link https://php.net/manual/en/function.ldap-list.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $base_dn

- * The base DN for the directory. - *

- * @param string $filter - * @param array $attributes [optional]

- * An array of the required attributes, e.g. array("mail", "sn", "cn"). - * Note that the "dn" is always returned irrespective of which attributes - * types are requested. - *

- *

- * Using this parameter is much more efficient than the default action - * (which is to return all attributes and their associated values). - * The use of this parameter should therefore be considered good - * practice. - *

- * @param int $attrsonly [optional]

- * Should be set to 1 if only attribute types are wanted. If set to 0 - * both attributes types and attribute values are fetched which is the - * default behaviour. - *

- * @param int $sizelimit [optional]

- * Enables you to limit the count of entries fetched. Setting this to 0 - * means no limit. - *

- *

- * This parameter can NOT override server-side preset sizelimit. You can - * set it lower though. - *

- *

- * Some directory server hosts will be configured to return no more than - * a preset number of entries. If this occurs, the server will indicate - * that it has only returned a partial results set. This also occurs if - * you use this parameter to limit the count of fetched entries. - *

- * @param int $timelimit [optional]

- * Sets the number of seconds how long is spend on the search. Setting - * this to 0 means no limit. - *

- *

- * This parameter can NOT override server-side preset timelimit. You can - * set it lower though. - *

- * @param int $deref [optional]

- * Specifies how aliases should be handled during the search. It can be - * one of the following: - * LDAP_DEREF_NEVER - (default) aliases are never - * dereferenced. - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false a search result identifier or FALSE on error. - */ -function ldap_list ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $serverctrls = []) {} - -/** - * Search LDAP tree - * @link https://php.net/manual/en/function.ldap-search.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $base_dn

- * The base DN for the directory. - *

- * @param string $filter

- * The search filter can be simple or advanced, using boolean operators in - * the format described in the LDAP documentation (see the Netscape Directory SDK for full - * information on filters). - *

- * @param array $attributes [optional]

- * An array of the required attributes, e.g. array("mail", "sn", "cn"). - * Note that the "dn" is always returned irrespective of which attributes - * types are requested. - *

- *

- * Using this parameter is much more efficient than the default action - * (which is to return all attributes and their associated values). - * The use of this parameter should therefore be considered good - * practice. - *

- * @param int $attrsonly [optional]

- * Should be set to 1 if only attribute types are wanted. If set to 0 - * both attributes types and attribute values are fetched which is the - * default behaviour. - *

- * @param int $sizelimit [optional]

- * Enables you to limit the count of entries fetched. Setting this to 0 - * means no limit. - *

- *

- * This parameter can NOT override server-side preset sizelimit. You can - * set it lower though. - *

- *

- * Some directory server hosts will be configured to return no more than - * a preset number of entries. If this occurs, the server will indicate - * that it has only returned a partial results set. This also occurs if - * you use this parameter to limit the count of fetched entries. - *

- * @param int $timelimit [optional]

- * Sets the number of seconds how long is spend on the search. Setting - * this to 0 means no limit. - *

- *

- * This parameter can NOT override server-side preset timelimit. You can - * set it lower though. - *

- * @param int $deref [optional]

- * Specifies how aliases should be handled during the search. It can be - * one of the following: - * LDAP_DEREF_NEVER - (default) aliases are never - * dereferenced. - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false a search result identifier or FALSE on error. - */ -function ldap_search ($link_identifier, $base_dn, $filter, array $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $serverctrls = []) {} - -/** - * Free result memory - * @link https://php.net/manual/en/function.ldap-free-result.php - * @param resource $result_identifier - * @return bool TRUE on success or FALSE on failure. - */ -function ldap_free_result ($result_identifier) {} - -/** - * Count the number of entries in a search - * @link https://php.net/manual/en/function.ldap-count-entries.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_identifier

- * The internal LDAP result. - *

- * @return int|false number of entries in the result or FALSE on error. - */ -function ldap_count_entries ($link_identifier, $result_identifier) {} - -/** - * Return first result id - * @link https://php.net/manual/en/function.ldap-first-entry.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_identifier - * @return resource|false the result entry identifier for the first entry on success and - * FALSE on error. - */ -function ldap_first_entry ($link_identifier, $result_identifier) {} - -/** - * Get next result entry - * @link https://php.net/manual/en/function.ldap-next-entry.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_entry_identifier - * @return resource|false entry identifier for the next entry in the result whose entries - * are being read starting with ldap_first_entry. If - * there are no more entries in the result then it returns FALSE. - */ -function ldap_next_entry ($link_identifier, $result_entry_identifier) {} - -/** - * Get all result entries - * @link https://php.net/manual/en/function.ldap-get-entries.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_identifier - * @return array a complete result information in a multi-dimensional array on - * success and FALSE on error. - *

- *

- * The structure of the array is as follows. - * The attribute index is converted to lowercase. (Attributes are - * case-insensitive for directory servers, but not when used as - * array indices.) - *

- * return_value["count"] = number of entries in the result
- * return_value[0] : refers to the details of first entry
- * return_value[i]["dn"] = DN of the ith entry in the result
- * return_value[i]["count"] = number of attributes in ith entry
- * return_value[i][j] = NAME of the jth attribute in the ith entry in the result
- * return_value[i]["attribute"]["count"] = number of values for
- * attribute in ith entry
- * return_value[i]["attribute"][j] = jth value of attribute in ith entry
- * 
- */ -function ldap_get_entries ($link_identifier, $result_identifier) {} - -/** - * Return first attribute - * @link https://php.net/manual/en/function.ldap-first-attribute.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_entry_identifier - * @param int $dummy_ber [optional] is the identifier to internal memory location pointer. This parameter is no longer used as this is now handled automatically by PHP. For backwards compatibility PHP will not throw an error if this parameter is passed. - * @return string|false the first attribute in the entry on success and FALSE on - * error. - */ -function ldap_first_attribute ($link_identifier, $result_entry_identifier, $dummy_ber = null) {} - -/** - * Get the next attribute in result - * @link https://php.net/manual/en/function.ldap-next-attribute.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_entry_identifier - * @param int $dummy_ber [optional] The internal state of the pointer is maintained by this parameter. This parameter is no longer used as this is now handled automatically by PHP. For backwards compatibility PHP will not throw an error if this parameter is passed. - * @return string|false the next attribute in an entry on success and FALSE on - * error. - */ -function ldap_next_attribute ($link_identifier, $result_entry_identifier, $dummy_ber) {} - -/** - * Get attributes from a search result entry - * @link https://php.net/manual/en/function.ldap-get-attributes.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_entry_identifier - * @return array a complete entry information in a multi-dimensional array - * on success and FALSE on error. - */ -function ldap_get_attributes ($link_identifier, $result_entry_identifier) {} - -/** - * Get all values from a result entry - * @link https://php.net/manual/en/function.ldap-get-values.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_entry_identifier - * @param string $attribute - * @return array|false an array of values for the attribute on success and FALSE on - * error. The number of values can be found by indexing "count" in the - * resultant array. Individual values are accessed by integer index in the - * array. The first index is 0. - *

- *

- * LDAP allows more than one entry for an attribute, so it can, for example, - * store a number of email addresses for one person's directory entry all - * labeled with the attribute "mail" - * return_value["count"] = number of values for attribute - * return_value[0] = first value of attribute - * return_value[i] = ith value of attribute - */ -function ldap_get_values ($link_identifier, $result_entry_identifier, $attribute) {} - -/** - * Get all binary values from a result entry - * @link https://php.net/manual/en/function.ldap-get-values-len.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_entry_identifier - * @param string $attribute - * @return array|false an array of values for the attribute on success and FALSE on - * error. Individual values are accessed by integer index in the array. The - * first index is 0. The number of values can be found by indexing "count" - * in the resultant array. - */ -function ldap_get_values_len ($link_identifier, $result_entry_identifier, $attribute) {} - -/** - * Get the DN of a result entry - * @link https://php.net/manual/en/function.ldap-get-dn.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result_entry_identifier - * @return string|false the DN of the result entry and FALSE on error. - */ -function ldap_get_dn ($link_identifier, $result_entry_identifier) {} - -/** - * Splits DN into its component parts - * @link https://php.net/manual/en/function.ldap-explode-dn.php - * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param int $with_attrib

- * Used to request if the RDNs are returned with only values or their - * attributes as well. To get RDNs with the attributes (i.e. in - * attribute=value format) set with_attrib to 0 - * and to get only values set it to 1. - *

- * @return array an array of all DN components. - * The first element in this array has count key and - * represents the number of returned values, next elements are numerically - * indexed DN components. - */ -function ldap_explode_dn ($dn, $with_attrib) {} - -/** - * Convert DN to User Friendly Naming format - * @link https://php.net/manual/en/function.ldap-dn2ufn.php - * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @return string the user friendly name. - */ -function ldap_dn2ufn ($dn) {} - -/** - * Add entries to LDAP directory - * @link https://php.net/manual/en/function.ldap-add.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $entry

- * An array that specifies the information about the entry. The values in - * the entries are indexed by individual attributes. - * In case of multiple values for an attribute, they are indexed using - * integers starting with 0. - * - * $entree["attribut1"] = "value"; - * $entree["attribut2"][0] = "value1"; - * $entree["attribut2"][1] = "value2"; - * - *

- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return bool TRUE on success or FALSE on failure. - */ -function ldap_add ($link_identifier, $dn, array $entry, $serverctrls = []) {} - -/** - * Add entries to LDAP directory - * Does the same thing as ldap_add() but returns the LDAP result resource to be parsed with ldap_parse_result(). - * @link https://www.php.net/manual/en/function.ldap-add-ext.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $entry

- * An array that specifies the information about the entry. The values in - * the entries are indexed by individual attributes. - * In case of multiple values for an attribute, they are indexed using - * integers starting with 0. - * - * $entree["attribut1"] = "value"; - * $entree["attribut2"][0] = "value1"; - * $entree["attribut2"][1] = "value2"; - * - *

- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false - * @since 7.4 - */ -function ldap_add_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {} - -/** - * Delete an entry from a directory - * @link https://php.net/manual/en/function.ldap-delete.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return bool TRUE on success or FALSE on failure. - */ -function ldap_delete ($link_identifier, $dn, $serverctrls = []) {} - -/** - * Delete an entry from a directory - * Does the same thing as ldap_delete() but returns the LDAP result resource to be parsed with ldap_parse_result(). - * @link https://php.net/manual/en/function.ldap-delete-ext.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false - * @since 7.3 - */ -function ldap_delete_ext ($link_identifier, $dn, $serverctrls = []) {} - -/** - * This function is an alias of: ldap_mod_replace(). - * Replace attribute values with new ones - * @link https://php.net/manual/en/function.ldap-mod-replace.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return bool TRUE on success or FALSE on failure. - * @since 7.0 - */ -function ldap_modify ($link_identifier, $dn, array $entry, $serverctrls = []) {} - -/** - * Add attribute values to current attributes - * @link https://php.net/manual/en/function.ldap-mod-add.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return bool TRUE on success or FALSE on failure. - */ -function ldap_mod_add ($link_identifier, $dn, array $entry, $serverctrls = []) {} - -/** - * Add attribute values to current attributes - * Does the same thing as ldap_mod_add() but returns the LDAP result resource to be parsed with ldap_parse_result(). - * @link https://php.net/manual/en/function.ldap-mod-add-ext.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false - */ -function ldap_mod_add_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {} - -/** - * Replace attribute values with new ones - * @link https://php.net/manual/en/function.ldap-mod-replace.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return bool TRUE on success or FALSE on failure. - */ -function ldap_mod_replace ($link_identifier, $dn, array $entry, $serverctrls = []) {} - -/** - * Replace attribute values with new ones - * Does the same thing as ldap_mod_replace() but returns the LDAP result resource to be parsed with ldap_parse_result(). - * @link https://php.net/manual/en/function.ldap-mod-replace-ext.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false - * @since 7.3 - */ -function ldap_mod_replace_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {} - -/** - * Delete attribute values from current attributes - * @link https://php.net/manual/en/function.ldap-mod-del.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return bool TRUE on success or FALSE on failure. - */ -function ldap_mod_del ($link_identifier, $dn, array $entry, $serverctrls = []) {} - -/** - * Delete attribute values from current attributes - * Does the same thing as ldap_mod_del() but returns the LDAP result resource to be parsed with ldap_parse_result(). - * @link https://php.net/manual/en/function.ldap-mod-del-ext.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param array $entry - * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false - * @since 7.3 - */ -function ldap_mod_del_ext ($link_identifier, $dn, array $entry, $serverctrls = []) {} - -/** - * Return the LDAP error number of the last LDAP command - * @link https://php.net/manual/en/function.ldap-errno.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @return int Return the LDAP error number of the last LDAP command for this - * link. - */ -function ldap_errno ($link_identifier) {} - -/** - * Convert LDAP error number into string error message - * @link https://php.net/manual/en/function.ldap-err2str.php - * @param int $errno

- * The error number. - *

- * @return string the error message, as a string. - */ -function ldap_err2str ($errno) {} - -/** - * Return the LDAP error message of the last LDAP command - * @link https://php.net/manual/en/function.ldap-error.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @return string string error message. - */ -function ldap_error ($link_identifier) {} - -/** - * Compare value of attribute found in entry specified with DN - * @link https://php.net/manual/en/function.ldap-compare.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param string $attribute

- * The attribute name. - *

- * @param string $value

- * The compared value. - *

- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return mixed TRUE if value matches otherwise returns - * FALSE. Returns -1 on error. - */ -function ldap_compare ($link_identifier, $dn, $attribute, $value, $serverctrls = []) {} - -/** - * Sort LDAP result entries - * @link https://php.net/manual/en/function.ldap-sort.php - * @param resource $link

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result

- * An search result identifier, returned by - * ldap_search. - *

- * @param string $sortfilter

- * The attribute to use as a key in the sort. - *

- * @deprecated 7.0 - * @removed 8.0 - * @return bool - */ -function ldap_sort ($link, $result, $sortfilter) {} - -/** - * Modify the name of an entry - * @link https://php.net/manual/en/function.ldap-rename.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param string $newrdn

- * The new RDN. - *

- * @param string $newparent

- * The new parent/superior entry. - *

- * @param bool $deleteoldrdn

- * If TRUE the old RDN value(s) is removed, else the old RDN value(s) - * is retained as non-distinguished values of the entry. - *

- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return bool TRUE on success or FALSE on failure. - */ -function ldap_rename ($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls = []) {} - -/** - * Modify the name of an entry - * Does the same thing as ldap_rename() but returns the LDAP result resource to be parsed with ldap_parse_result(). - * @link https://php.net/manual/en/function.ldap-rename-ext.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param string $dn

- * The distinguished name of an LDAP entity. - *

- * @param string $newrdn

- * The new RDN. - *

- * @param string $newparent

- * The new parent/superior entry. - *

- * @param bool $deleteoldrdn

- * If TRUE the old RDN value(s) is removed, else the old RDN value(s) - * is retained as non-distinguished values of the entry. - *

- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return resource|false - * @since 7.3 - */ -function ldap_rename_ext ($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls = []) {} - -/** - * Get the current value for given option - * @link https://php.net/manual/en/function.ldap-get-option.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param int $option

- * The parameter option can be one of: - * - * Option - * Type - * - * - * LDAP_OPT_DEREF - * integer - * - * - * LDAP_OPT_SIZELIMIT - * integer - * - * - * LDAP_OPT_TIMELIMIT - * integer - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * integer - * - * - * LDAP_OPT_PROTOCOL_VERSION - * integer - * - * - * LDAP_OPT_ERROR_NUMBER - * integer - * - * - * LDAP_OPT_REFERRALS - * bool - * - * - * LDAP_OPT_RESTART - * bool - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - *

- * @param mixed $retval

- * This will be set to the option value. - *

- * @return bool TRUE on success or FALSE on failure. - */ -function ldap_get_option ($link_identifier, $option, &$retval) {} - -/** - * Set the value of the given option - * @link https://php.net/manual/en/function.ldap-set-option.php - * @param resource $link_identifier

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param int $option

- * The parameter option can be one of: - * - * Option - * Type - * Available since - * - * - * LDAP_OPT_DEREF - * integer - * - * - * - * LDAP_OPT_SIZELIMIT - * integer - * - * - * - * LDAP_OPT_TIMELIMIT - * integer - * - * - * - * LDAP_OPT_NETWORK_TIMEOUT - * integer - * PHP 5.3.0 - * - * - * LDAP_OPT_PROTOCOL_VERSION - * integer - * - * - * - * LDAP_OPT_ERROR_NUMBER - * integer - * - * - * - * LDAP_OPT_REFERRALS - * bool - * - * - * - * LDAP_OPT_RESTART - * bool - * - * - * - * LDAP_OPT_HOST_NAME - * string - * - * - * - * LDAP_OPT_ERROR_STRING - * string - * - * - * - * LDAP_OPT_MATCHED_DN - * string - * - * - * - * LDAP_OPT_SERVER_CONTROLS - * array - * - * - * - * LDAP_OPT_CLIENT_CONTROLS - * array - * - * - *

- *

- * LDAP_OPT_SERVER_CONTROLS and - * LDAP_OPT_CLIENT_CONTROLS require a list of - * controls, this means that the value must be an array of controls. A - * control consists of an oid identifying the control, - * an optional value, and an optional flag for - * criticality. In PHP a control is given by an - * array containing an element with the key oid - * and string value, and two optional elements. The optional - * elements are key value with string value - * and key iscritical with boolean value. - * iscritical defaults to FALSE - * if not supplied. See draft-ietf-ldapext-ldap-c-api-xx.txt - * for details. See also the second example below. - *

- * @param mixed $newval

- * The new value for the specified option. - *

- * @return bool TRUE on success or FALSE on failure. - */ -function ldap_set_option ($link_identifier, $option, $newval) {} - -/** - * Return first reference - * @link https://php.net/manual/en/function.ldap-first-reference.php - * @param resource $link - * @param resource $result - * @return resource - */ -function ldap_first_reference ($link, $result) {} - -/** - * Get next reference - * @link https://php.net/manual/en/function.ldap-next-reference.php - * @param resource $link - * @param resource $entry - * @return resource - */ -function ldap_next_reference ($link, $entry) {} - -/** - * Extract information from reference entry - * @link https://php.net/manual/en/function.ldap-parse-reference.php - * @param resource $link - * @param resource $entry - * @param array $referrals - * @return bool - */ -function ldap_parse_reference ($link, $entry, array &$referrals) {} - -/** - * Extract information from result - * @link https://php.net/manual/en/function.ldap-parse-result.php - * @param resource $link - * @param resource $result - * @param int $errcode - * @param string $matcheddn [optional] - * @param string $errmsg [optional] - * @param array $referrals [optional] - * @param array $serverctrls [optional] An array of LDAP Controls which have been sent with the response. - * @return bool - */ -function ldap_parse_result ($link, $result, &$errcode, &$matcheddn = null, &$errmsg = null, array &$referrals = null, &$serverctrls = []) {} - -/** - * Start TLS - * @link https://php.net/manual/en/function.ldap-start-tls.php - * @param resource $link - * @return bool - */ -function ldap_start_tls ($link) {} - -/** - * Set a callback function to do re-binds on referral chasing - * @link https://php.net/manual/en/function.ldap-set-rebind-proc.php - * @param resource $link - * @param callable $callback - * @return bool - */ -function ldap_set_rebind_proc ($link, callable $callback) {} - -/** - * Send LDAP pagination control - * @link https://php.net/manual/en/function.ldap-control-paged-result.php - * @param resource $link

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param int $pagesize

- * The number of entries by page. - *

- * @param bool $iscritical [optional]

- * Indicates whether the pagination is critical of not. - * If true and if the server doesn't support pagination, the search - * will return no result. - *

- * @param string $cookie [optional]

- * An opaque structure sent by the server - * (ldap_control_paged_result_response). - *

- * @return bool TRUE on success or FALSE on failure. - * @since 5.4 - * @deprecated 7.4 - */ -function ldap_control_paged_result ($link, $pagesize, $iscritical = false, $cookie = "") {} - -/** - * Retrieve the LDAP pagination cookie - * @link https://php.net/manual/en/function.ldap-control-paged-result-response.php - * @param resource $link

- * An LDAP link identifier, returned by ldap_connect. - *

- * @param resource $result - * @param string $cookie [optional]

- * An opaque structure sent by the server. - *

- * @param int $estimated [optional]

- * The estimated number of entries to retrieve. - *

- * @return bool TRUE on success or FALSE on failure. - * @since 5.4 - * @deprecated 7.4 - */ -function ldap_control_paged_result_response ($link, $result, &$cookie = null, &$estimated = null) {} - -/** - * Escape a string for use in an LDAP filter or DN - * @param string $value The value to escape. - * @param string $ignore [optional] Characters to ignore when escaping. - * @param int $flags [optional] The context the escaped string will be used in: LDAP_ESCAPE_FILTER for filters to be used with ldap_search(), or LDAP_ESCAPE_DN for DNs. If neither flag is passed, all chars are escaped. - * @return string - * @since 5.6 - */ - -function ldap_escape ($value, $ignore = "", $flags = 0) {} - -/** - * (PHP 5.4 >= 5.4.26, PHP 5.5 >= 5.5.10, PHP 5.6 >= 5.6.0) - * Batch and execute modifications on an LDAP entry - * @link https://php.net/manual/en/function.ldap-modify-batch.php - * @param $link_identifier

- * An LDAP link identifier, returned by - * {@see ldap_connect()}. - *

- * @param $dn

The distinguished name of an LDAP entity.

- * @param $entry

An array that specifies the modifications to make. Each entry in this - * array is an associative array with two or three keys: - * attrib maps to the name of the attribute to modify, - * modtype maps to the type of modification to perform, - * and (depending on the type of modification) values - * maps to an array of attribute values relevant to the modification. - *

- *

- * Possible values for modtype include: - *

- * - * - *
- * LDAP_MODIFY_BATCH_ADD
- * - *
- * - *

- * Each value specified through values is added (as - * an additional value) to the attribute named by - * attrib. - *

- *
- * - *
- * LDAP_MODIFY_BATCH_REMOVE
- * - *
- * - *

- * Each value specified through values is removed - * from the attribute named by attrib. Any value of - * the attribute not contained in the values array - * will remain untouched. - *

- *
- *
- * LDAP_MODIFY_BATCH_REMOVE_ALL
- * - *
- * - *

- * All values are removed from the attribute named by - * attrib. A values entry must - * not be provided. - *

- *
- * - *
- * LDAP_MODIFY_BATCH_REPLACE
- * - *
- * - *

- * All current values of the attribute named by - * attrib are replaced with the values specified - * through values. - *

- *
- *
- *

- * Note that any value for attrib must be a string, any - * value for values must be an array of strings, and - * any value for modtype must be one of the - * LDAP_MODIFY_BATCH_* constants listed above. - *

- * @param array $serverctrls [optional] Array of LDAP Controls to send with the request. - * @return bool TRUE on success or FALSE on failure. - * @since 5.4 - */ -function ldap_modify_batch ( $link_identifier , $dn , $entry, $serverctrls = []) {} - -/** - * @param resource $link_identifier - * @param resource $result_identifier - * @return int returns the number of reference messages in a search result. - * @since 8.0 - */ -function ldap_count_references($link_identifier, $result_identifier){} - -define('LDAP_ESCAPE_FILTER', 1); -define ('LDAP_ESCAPE_DN', 2); -define ('LDAP_DEREF_NEVER', 0); -define ('LDAP_DEREF_SEARCHING', 1); -define ('LDAP_DEREF_FINDING', 2); -define ('LDAP_DEREF_ALWAYS', 3); -define ('LDAP_MODIFY_BATCH_REMOVE',2); -define('LDAP_MODIFY_BATCH_ADD', 1); -define('LDAP_MODIFY_BATCH_REMOVE_ALL', 18); -define('LDAP_MODIFY_BATCH_REPLACE', 3); - -define('LDAP_OPT_X_TLS_REQUIRE_CERT', 24582); -define('LDAP_OPT_X_TLS_NEVER', 0); -define('LDAP_OPT_X_TLS_HARD', 1); -define('LDAP_OPT_X_TLS_DEMAND', 2); -define('LDAP_OPT_X_TLS_ALLOW', 3); -define('LDAP_OPT_X_TLS_TRY', 4); -define('LDAP_OPT_X_TLS_CERTFILE', 24580); -define('LDAP_OPT_X_TLS_CIPHER_SUITE', 24584); -define('LDAP_OPT_X_TLS_KEYFILE', 24581); -define('LDAP_OPT_X_TLS_DHFILE', 24590); -define('LDAP_OPT_X_TLS_CRLFILE', 24592); -define('LDAP_OPT_X_TLS_RANDOM_FILE', 24585); -define('LDAP_OPT_X_TLS_CRLCHECK', 24587); -define('LDAP_OPT_X_TLS_CRL_NONE', 0); -define('LDAP_OPT_X_TLS_CRL_PEER', 1); -define('LDAP_OPT_X_TLS_CRL_ALL', 2); -define('LDAP_OPT_X_TLS_PROTOCOL_MIN', 24583); -define('LDAP_OPT_X_TLS_PROTOCOL_SSL2', 512); -define('LDAP_OPT_X_TLS_PROTOCOL_SSL3', 768); -define('LDAP_OPT_X_TLS_PROTOCOL_TLS1_0', 769); -define('LDAP_OPT_X_TLS_PROTOCOL_TLS1_1', 770); -define('LDAP_OPT_X_TLS_PROTOCOL_TLS1_2', 771); -define('LDAP_OPT_X_TLS_PACKAGE', 24593); -define('LDAP_OPT_X_KEEPALIVE_IDLE', 25344); -define('LDAP_OPT_X_KEEPALIVE_PROBES', 25345); -define('LDAP_OPT_X_KEEPALIVE_INTERVAL', 25346); -define('LDAP_OPT_X_SASL_USERNAME', 24844); -define('LDAP_OPT_X_SASL_NOCANON', 24843); - -/** - * Specifies alternative rules for following aliases at the server. - * @link https://php.net/manual/en/ldap.constants.php - */ -define ('LDAP_OPT_DEREF', 2); - -/** - *

- * Specifies the maximum number of entries that can be - * returned on a search operation. - *

- * The actual size limit for operations is also bounded - * by the server's configured maximum number of return entries. - * The lesser of these two settings is the actual size limit. - * @link https://php.net/manual/en/ldap.constants.php - */ -define ('LDAP_OPT_SIZELIMIT', 3); - -/** - * Specifies the number of seconds to wait for search results. - * The actual time limit for operations is also bounded - * by the server's configured maximum time. - * The lesser of these two settings is the actual time limit. - * @link https://php.net/manual/en/ldap.constants.php - */ -define ('LDAP_OPT_TIMELIMIT', 4); - -/** - * Option for ldap_set_option to allow setting network timeout. - * (Available as of PHP 5.3.0) - * @link https://php.net/manual/en/ldap.constants.php - */ -define ('LDAP_OPT_NETWORK_TIMEOUT', 20485); - -/** - * Specifies the LDAP protocol to be used (V2 or V3). - * @link https://php.net/manual/en/ldap.constants.php - */ -define ('LDAP_OPT_PROTOCOL_VERSION', 17); -define ('LDAP_OPT_ERROR_NUMBER', 49); - -/** - * Specifies whether to automatically follow referrals returned - * by the LDAP server. - * @link https://php.net/manual/en/ldap.constants.php - */ -define ('LDAP_OPT_REFERRALS', 8); -define ('LDAP_OPT_RESTART', 9); -define ('LDAP_OPT_HOST_NAME', 48); -define ('LDAP_OPT_ERROR_STRING', 50); -define ('LDAP_OPT_MATCHED_DN', 51); - -/** - * Specifies a default list of server controls to be sent with each request. - * @link https://php.net/manual/en/ldap.constants.php - */ -define ('LDAP_OPT_SERVER_CONTROLS', 18); - -/** - * Specifies a default list of client controls to be processed with each request. - * @link https://php.net/manual/en/ldap.constants.php - */ -define ('LDAP_OPT_CLIENT_CONTROLS', 19); - -/** - * Specifies a bitwise level for debug traces. - * @link https://php.net/manual/en/ldap.constants.php - */ -define ('LDAP_OPT_DEBUG_LEVEL', 20481); -define ('LDAP_OPT_X_SASL_MECH', 24832); -define ('LDAP_OPT_X_SASL_REALM', 24833); -define ('LDAP_OPT_X_SASL_AUTHCID', 24834); -define ('LDAP_OPT_X_SASL_AUTHZID', 24835); - -/** - * Specifies the path of the directory containing CA certificates. - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.1 - */ -define('LDAP_OPT_X_TLS_CACERTDIR', 24579); - -/** - * Specifies the full-path of the CA certificate file. - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.1 - */ -define('LDAP_OPT_X_TLS_CACERTFILE', 24578); - -define('LDAP_MODIFY_BATCH_ATTRIB', 'attrib'); -define('LDAP_MODIFY_BATCH_MODTYPE', 'modtype'); -define('LDAP_MODIFY_BATCH_VALUES', 'values'); -define('LDAP_OPT_TIMEOUT', 20482); -define('LDAP_OPT_DIAGNOSTIC_MESSAGE', 50); - - -/** - * Control Constant - Manage DSA IT (» RFC 3296) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_MANAGEDSAIT", "2.16.840.1.113730.3.4.2"); -echo - -/** - * Control Constant - Proxied Authorization (» RFC 4370) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_PROXY_AUTHZ", "2.16.840.1.113730.3.4.18"); - -/** - * Control Constant - Subentries (» RFC 3672) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_SUBENTRIES", "1.3.6.1.4.1.4203.1.10.1"); - -/** - * Control Constant - Filter returned values (» RFC 3876) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_VALUESRETURNFILTER", "1.2.826.0.1.3344810.2.3"); - -/** - * Control Constant - Assertion (» RFC 4528) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_ASSERT", "1.3.6.1.1.12"); - -/** - * Control Constant - Pre read (» RFC 4527) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_PRE_READ", "1.3.6.1.1.13.1"); - -/** - * Control Constant - Post read (» RFC 4527) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_POST_READ", "1.3.6.1.1.13.2"); - -/** - * Control Constant - Sort request (» RFC 2891) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_SORTREQUEST", "1.2.840.113556.1.4.473"); - -/** - * Control Constant - Sort response (» RFC 2891) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_SORTRESPONSE", "1.2.840.113556.1.4.474"); - -/** - * Control Constant - Paged results (» RFC 2696) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_PAGEDRESULTS", "1.2.840.113556.1.4.319"); - -/** - * Control Constant - Content Synchronization Operation (» RFC 4533) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_SYNC", "1.3.6.1.4.1.4203.1.9.1.1"); - -/** - * Control Constant - Content Synchronization Operation State (» RFC 4533) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_SYNC_STATE", "1.3.6.1.4.1.4203.1.9.1.2"); - -/** - * Control Constant - Content Synchronization Operation Done (» RFC 4533) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_SYNC_DONE", "1.3.6.1.4.1.4203.1.9.1.3"); - -/** - * Control Constant - Don't Use Copy (» RFC 6171) - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_DONTUSECOPY", "1.3.6.1.1.22"); - -/** - * Control Constant - Password Policy Request - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_PASSWORDPOLICYREQUEST", "1.3.6.1.4.1.42.2.27.8.5.1"); - -/** - * Control Constant - Password Policy Response - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_PASSWORDPOLICYRESPONSE", "1.3.6.1.4.1.42.2.27.8.5.1"); - -/** - * Control Constant - Active Directory Incremental Values - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_X_INCREMENTAL_VALUES", "1.2.840.113556.1.4.802"); - -/** - * Control Constant - Active Directory Domain Scope - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_X_DOMAIN_SCOPE", "1.2.840.113556.1.4.1339"); - -/** - * Control Constant - Active Directory Permissive Modify - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_X_PERMISSIVE_MODIFY", "1.2.840.113556.1.4.1413"); - -/** - * Control Constant - Active Directory Search Options - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_X_SEARCH_OPTIONS", "1.2.840.113556.1.4.1340"); - -/** - * Control Constant - Active Directory Tree Delete - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_X_TREE_DELETE", "1.2.840.113556.1.4.805"); - -/** - * Control Constant - Active Directory Extended DN - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_X_EXTENDED_DN", "1.2.840.113556.1.4.529"); - -/** - * Control Constant - Virtual List View Request - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_VLVREQUEST", "2.16.840.1.113730.3.4.9"); - -/** - * Control Constant - Virtual List View Response - * @link https://php.net/manual/en/ldap.constants.php - * @since 7.3 - */ -define("LDAP_CONTROL_VLVRESPONSE", "2.16.840.1.113730.3.4.10"); - - -/** - * Extended Operation constant - Modify password - */ -define("LDAP_EXOP_MODIFY_PASSWD", "1.3.6.1.4.1.4203.1.11.1"); - -/** - * Extended Operation Constant - Refresh - */ -define("LDAP_EXOP_REFRESH", "1.3.6.1.4.1.1466.101.119.1"); - -/** - * Extended Operation constant - Start TLS - */ -define("LDAP_EXOP_START_TLS", "1.3.6.1.4.1.1466.20037"); - -/** - * Extended Operation Constant - Turn - */ -define("LDAP_EXOP_TURN", "1.3.6.1.1.19"); - -/** - * Extended Operation Constant - WHOAMI - */ -define("LDAP_EXOP_WHO_AM_I", "1.3.6.1.4.1.4203.1.11.3"); - -// End of ldap v. -?> +namespace LDAP { + + /** + * @strict-properties + * @not-serializable + */ + final class Connection + { + } + + /** + * @strict-properties + * @not-serializable + */ + final class Result + { + } + + /** + * @strict-properties + * @not-serializable + */ + final class ResultEntry + { + } +} diff --git a/build/stubs/pcntl.php b/build/stubs/pcntl.php new file mode 100644 index 00000000000..ff0bde9ed7a --- /dev/null +++ b/build/stubs/pcntl.php @@ -0,0 +1,50 @@ +getArgument('app'); diff --git a/core/Command/Config/App/GetConfig.php b/core/Command/Config/App/GetConfig.php index 0e42ae786d8..e0beb4ee84e 100644 --- a/core/Command/Config/App/GetConfig.php +++ b/core/Command/Config/App/GetConfig.php @@ -69,7 +69,7 @@ class GetConfig extends Base { * * @param InputInterface $input An InputInterface instance * @param OutputInterface $output An OutputInterface instance - * @return null|int null or 0 if everything went fine, or an error code + * @return int 0 if everything went fine, or an error code */ protected function execute(InputInterface $input, OutputInterface $output): int { $appName = $input->getArgument('app'); diff --git a/core/Command/Config/System/GetConfig.php b/core/Command/Config/System/GetConfig.php index 3fce89572c8..f7e573f6869 100644 --- a/core/Command/Config/System/GetConfig.php +++ b/core/Command/Config/System/GetConfig.php @@ -65,9 +65,9 @@ class GetConfig extends Base { * * @param InputInterface $input An InputInterface instance * @param OutputInterface $output An OutputInterface instance - * @return null|int null or 0 if everything went fine, or an error code + * @return int 0 if everything went fine, or an error code */ - protected function execute(InputInterface $input, OutputInterface $output): int { + protected function execute(InputInterface $input, OutputInterface $output) { $configNames = $input->getArgument('name'); $configName = array_shift($configNames); $defaultValue = $input->getOption('default-value'); diff --git a/lib/composer/composer/installed.php b/lib/composer/composer/installed.php index d4da958244b..f12a8e00dbe 100644 --- a/lib/composer/composer/installed.php +++ b/lib/composer/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), - 'reference' => '63a9bc2aacf829563ac74abe29d4edf6ff31b8b1', + 'reference' => '1225189f74d06606aafc4150d07584b90cea50dd', 'name' => '__root__', 'dev' => false, ), @@ -16,7 +16,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), - 'reference' => '63a9bc2aacf829563ac74abe29d4edf6ff31b8b1', + 'reference' => '1225189f74d06606aafc4150d07584b90cea50dd', 'dev_requirement' => false, ), ), diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php index a0fba16998f..8fc3d0dd5ea 100644 --- a/lib/private/Collaboration/Resources/Manager.php +++ b/lib/private/Collaboration/Resources/Manager.php @@ -131,7 +131,7 @@ class Manager implements IManager { */ public function searchCollections(IUser $user, string $filter, int $limit = 50, int $start = 0): array { $query = $this->connection->getQueryBuilder(); - $userId = $user instanceof IUser ? $user->getUID() : ''; + $userId = $user->getUID(); $query->select('c.*', 'a.access') ->from(self::TABLE_COLLECTIONS, 'c') diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index f2d91065b9a..72de70a8248 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1407,7 +1407,7 @@ class View { } $info = new FileInfo($path, $storage, $internalPath, $data, $mount, $owner); - if ($data and isset($data['fileid'])) { + if (isset($data['fileid'])) { if ($includeMountPoints and $data['mimetype'] === 'httpd/unix-directory') { //add the sizes of other mount points to the folder $extOnly = ($includeMountPoints === 'ext'); diff --git a/lib/private/Installer.php b/lib/private/Installer.php index b63619b821c..95143656295 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -308,91 +308,80 @@ class Installer { $extractDir = $this->tempManager->getTemporaryFolder(); $archive = new TAR($tempFile); - if ($archive) { - if (!$archive->extract($extractDir)) { - $errorMessage = 'Could not extract app ' . $appId; + if (!$archive->extract($extractDir)) { + $errorMessage = 'Could not extract app ' . $appId; - $archiveError = $archive->getError(); - if ($archiveError instanceof \PEAR_Error) { - $errorMessage .= ': ' . $archiveError->getMessage(); - } - - throw new \Exception($errorMessage); - } - $allFiles = scandir($extractDir); - $folders = array_diff($allFiles, ['.', '..']); - $folders = array_values($folders); - - if (count($folders) > 1) { - throw new \Exception( - sprintf( - 'Extracted app %s has more than 1 folder', - $appId - ) - ); + $archiveError = $archive->getError(); + if ($archiveError instanceof \PEAR_Error) { + $errorMessage .= ': ' . $archiveError->getMessage(); } - // Check if appinfo/info.xml has the same app ID as well - if ((PHP_VERSION_ID < 80000)) { - $loadEntities = libxml_disable_entity_loader(false); - $xml = simplexml_load_file($extractDir . '/' . $folders[0] . '/appinfo/info.xml'); - libxml_disable_entity_loader($loadEntities); - } else { - $xml = simplexml_load_file($extractDir . '/' . $folders[0] . '/appinfo/info.xml'); - } - if ((string)$xml->id !== $appId) { - throw new \Exception( - sprintf( - 'App for id %s has a wrong app ID in info.xml: %s', - $appId, - (string)$xml->id - ) - ); - } + throw new \Exception($errorMessage); + } + $allFiles = scandir($extractDir); + $folders = array_diff($allFiles, ['.', '..']); + $folders = array_values($folders); - // Check if the version is lower than before - $currentVersion = OC_App::getAppVersion($appId); - $newVersion = (string)$xml->version; - if (version_compare($currentVersion, $newVersion) === 1) { - throw new \Exception( - sprintf( - 'App for id %s has version %s and tried to update to lower version %s', - $appId, - $currentVersion, - $newVersion - ) - ); - } - - $baseDir = OC_App::getInstallPath() . '/' . $appId; - // Remove old app with the ID if existent - OC_Helper::rmdirr($baseDir); - // Move to app folder - if (@mkdir($baseDir)) { - $extractDir .= '/' . $folders[0]; - OC_Helper::copyr($extractDir, $baseDir); - } - OC_Helper::copyr($extractDir, $baseDir); - OC_Helper::rmdirr($extractDir); - return; - } else { + if (count($folders) > 1) { throw new \Exception( sprintf( - 'Could not extract app with ID %s to %s', - $appId, - $extractDir + 'Extracted app %s has more than 1 folder', + $appId ) ); } - } else { - // Signature does not match - throw new \Exception( - sprintf( - 'App with id %s has invalid signature', - $appId - ) - ); + + // Check if appinfo/info.xml has the same app ID as well + if ((PHP_VERSION_ID < 80000)) { + $loadEntities = libxml_disable_entity_loader(false); + $xml = simplexml_load_file($extractDir . '/' . $folders[0] . '/appinfo/info.xml'); + libxml_disable_entity_loader($loadEntities); + } else { + $xml = simplexml_load_file($extractDir . '/' . $folders[0] . '/appinfo/info.xml'); + } + if ((string)$xml->id !== $appId) { + throw new \Exception( + sprintf( + 'App for id %s has a wrong app ID in info.xml: %s', + $appId, + (string)$xml->id + ) + ); + } + + // Check if the version is lower than before + $currentVersion = OC_App::getAppVersion($appId); + $newVersion = (string)$xml->version; + if (version_compare($currentVersion, $newVersion) === 1) { + throw new \Exception( + sprintf( + 'App for id %s has version %s and tried to update to lower version %s', + $appId, + $currentVersion, + $newVersion + ) + ); + } + + $baseDir = OC_App::getInstallPath() . '/' . $appId; + // Remove old app with the ID if existent + OC_Helper::rmdirr($baseDir); + // Move to app folder + if (@mkdir($baseDir)) { + $extractDir .= '/' . $folders[0]; + OC_Helper::copyr($extractDir, $baseDir); + } + OC_Helper::copyr($extractDir, $baseDir); + OC_Helper::rmdirr($extractDir); + return; } + // Signature does not match + throw new \Exception( + sprintf( + 'App with id %s has invalid signature', + $appId + ) + ); } } diff --git a/lib/private/Memcache/Memcached.php b/lib/private/Memcache/Memcached.php index b3414a7d290..87b71223280 100644 --- a/lib/private/Memcache/Memcached.php +++ b/lib/private/Memcache/Memcached.php @@ -66,6 +66,7 @@ class Memcached extends Cache implements IMemcache { //\Memcached::OPT_BINARY_PROTOCOL => true, ]; // by default enable igbinary serializer if available + /** @psalm-suppress RedundantCondition */ if (\Memcached::HAVE_IGBINARY) { $defaultOptions[\Memcached::OPT_SERIALIZER] = \Memcached::SERIALIZER_IGBINARY; diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php index d8bbc02e105..c707884355b 100644 --- a/lib/private/Notification/Manager.php +++ b/lib/private/Notification/Manager.php @@ -381,12 +381,12 @@ class Manager implements IManager { throw new \InvalidArgumentException('The given notification has been processed'); } - if (!($notification instanceof INotification) || !$notification->isValidParsed()) { + if (!$notification->isValidParsed()) { throw new \InvalidArgumentException('The given notification has not been handled'); } } - if (!($notification instanceof INotification) || !$notification->isValidParsed()) { + if (!$notification->isValidParsed()) { throw new \InvalidArgumentException('The given notification has not been handled'); } diff --git a/psalm-ocp.xml b/psalm-ocp.xml index 407e0826435..03706430c5f 100644 --- a/psalm-ocp.xml +++ b/psalm-ocp.xml @@ -16,6 +16,10 @@ + + + + diff --git a/psalm.xml b/psalm.xml index 85ed49c77ee..9b3ea044435 100644 --- a/psalm.xml +++ b/psalm.xml @@ -75,14 +75,14 @@ + + - - @@ -126,11 +126,6 @@ - - - - - diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index c419bf58418..e03c935cb99 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,9 +1,11 @@ { "require": { - "nikic/php-parser": "^4.13", - "vimeo/psalm": "^4.17" + "vimeo/psalm": "^4.18" }, "config": { + "platform": { + "php": "7.3" + }, "allow-plugins": { "composer/package-versions-deprecated": true } diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index 77e824c3783..faa325c5601 100644 --- a/vendor-bin/psalm/composer.lock +++ b/vendor-bin/psalm/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a27ae1441b036754d39358d5dde4905b", + "content-hash": "c3c578c654631288a179470ece96f0ba", "packages": [ { "name": "amphp/amp", @@ -923,20 +923,20 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=7.4.0" + "php": ">=7.2.0" }, "type": "library", "autoload": { @@ -965,9 +965,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/1.1.1" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-03-05T17:36:06+00:00" }, { "name": "psr/log", @@ -1914,16 +1914,16 @@ }, { "name": "vimeo/psalm", - "version": "4.17.0", + "version": "4.18.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "6f4707aa41c9174353a6434bba3fc8840f981d9c" + "reference": "dda05fa913f4dc6eb3386f2f7ce5a45d37a71bcb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/6f4707aa41c9174353a6434bba3fc8840f981d9c", - "reference": "6f4707aa41c9174353a6434bba3fc8840f981d9c", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/dda05fa913f4dc6eb3386f2f7ce5a45d37a71bcb", + "reference": "dda05fa913f4dc6eb3386f2f7ce5a45d37a71bcb", "shasum": "" }, "require": { @@ -2014,9 +2014,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.17.0" + "source": "https://github.com/vimeo/psalm/tree/4.18.1" }, - "time": "2022-01-01T18:39:47+00:00" + "time": "2022-01-08T21:21:26+00:00" }, { "name": "webmozart/assert", @@ -2136,5 +2136,8 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], + "platform-overrides": { + "php": "7.3" + }, "plugin-api-version": "2.2.0" }