Browse Source
Merge pull request #37503 from nextcloud/fix/composer-psalm-threads
Use all available threads for running psalm from composer
pull/37559/head
Joas Schilling
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
57 additions and
3 deletions
-
build/psalm-baseline.xml
-
build/stubs/psr_container.php
-
composer.json
-
psalm-ocp.xml
-
psalm.xml
|
|
|
@ -1536,7 +1536,7 @@ |
|
|
|
<file src="core/routes.php"> |
|
|
|
<InvalidScope occurrences="2"> |
|
|
|
<code>$this</code> |
|
|
|
<code>$this</code> |
|
|
|
<code>$this->create('core_ajax_update', '/core/ajax/update.php')</code> |
|
|
|
</InvalidScope> |
|
|
|
</file> |
|
|
|
<file src="core/templates/layout.public.php"> |
|
|
|
|
|
|
|
@ -0,0 +1,52 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
declare(strict_types=1); |
|
|
|
|
|
|
|
namespace Psr\Container; |
|
|
|
|
|
|
|
use Throwable; |
|
|
|
|
|
|
|
/** |
|
|
|
* Base interface representing a generic exception in a container. |
|
|
|
*/ |
|
|
|
interface ContainerExceptionInterface extends Throwable |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Describes the interface of a container that exposes methods to read its entries. |
|
|
|
*/ |
|
|
|
interface ContainerInterface |
|
|
|
{ |
|
|
|
/** |
|
|
|
* Finds an entry of the container by its identifier and returns it. |
|
|
|
* |
|
|
|
* @param string $id Identifier of the entry to look for. |
|
|
|
* |
|
|
|
* @throws NotFoundExceptionInterface No entry was found for **this** identifier. |
|
|
|
* @throws ContainerExceptionInterface Error while retrieving the entry. |
|
|
|
* |
|
|
|
* @return mixed Entry. |
|
|
|
*/ |
|
|
|
public function get(string $id); |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns true if the container can return an entry for the given identifier. |
|
|
|
* Returns false otherwise. |
|
|
|
* |
|
|
|
* `has($id)` returning true does not mean that `get($id)` will not throw an exception. |
|
|
|
* It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. |
|
|
|
* |
|
|
|
* @param string $id Identifier of the entry to look for. |
|
|
|
* |
|
|
|
* @return bool |
|
|
|
*/ |
|
|
|
public function has(string $id): bool; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* No entry was found in the container. |
|
|
|
*/ |
|
|
|
interface NotFoundExceptionInterface extends ContainerExceptionInterface |
|
|
|
{ |
|
|
|
} |
|
|
|
@ -47,7 +47,7 @@ |
|
|
|
"cs:fix": "php-cs-fixer fix", |
|
|
|
"cs:check": "php-cs-fixer fix --dry-run --diff", |
|
|
|
"lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/stubs/*' -print0 | xargs -0 -n1 php -l", |
|
|
|
"psalm": "psalm --threads=1", |
|
|
|
"psalm:update-baseline": "psalm --threads=1 --update-baseline" |
|
|
|
"psalm": "psalm --threads=$(nproc)", |
|
|
|
"psalm:update-baseline": "psalm --threads=$(nproc) --update-baseline" |
|
|
|
} |
|
|
|
} |
|
|
|
@ -20,6 +20,7 @@ |
|
|
|
<stubs> |
|
|
|
<file name="build/stubs/gd.php"/> |
|
|
|
<file name="build/stubs/ldap.php"/> |
|
|
|
<file name="build/stubs/psr_container.php"/> |
|
|
|
</stubs> |
|
|
|
<extraFiles> |
|
|
|
<directory name="3rdparty"/> |
|
|
|
|
|
|
|
@ -77,6 +77,7 @@ |
|
|
|
<file name="build/stubs/ftp.php"/> |
|
|
|
<file name="build/stubs/pcntl.php"/> |
|
|
|
<file name="build/stubs/zip.php"/> |
|
|
|
<file name="build/stubs/psr_container.php"/> |
|
|
|
<file name="3rdparty/sabre/uri/lib/functions.php" /> |
|
|
|
</stubs> |
|
|
|
<issueHandlers> |
|
|
|
|