summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-10-31 15:18:54 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-10-31 15:18:54 +0100
commitb8542ca6334d430d751b12784ebc3775b3a389a8 (patch)
treed41b389560246e3deb1e1c638eb68b37a57f9788
parent1b161c28496cbe05bc2ebb65d5c898c431d131c5 (diff)
chore: Add Psalmchore/psalm
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--.gitignore3
-rw-r--r--composer.json9
-rw-r--r--composer.lock62
-rw-r--r--psalm.xml61
-rw-r--r--vendor-bin/psalm/composer.json11
-rw-r--r--vendor-bin/psalm/composer.lock248
6 files changed, 389 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index f47f1754..38ae1564 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,7 +17,8 @@ yarn-error.log*
js/
build/
coverage*
-vendor/
+/vendor
+/vendor-bin/*/vendor
.php-cs-fixer.cache
composer.phar
diff --git a/composer.json b/composer.json
index 4207e601..edba2d1a 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,10 @@
"platform": {
"php": "7.4"
},
- "autoloader-suffix": "Contacts"
+ "autoloader-suffix": "Contacts",
+ "allow-plugins": {
+ "bamarni/composer-bin-plugin": true
+ }
},
"autoload": {
"psr-4": {
@@ -16,11 +19,13 @@
"cs:fix": "php-cs-fixer fix",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
+ "psalm": "psalm.phar",
"test:unit": "phpunit -c phpunit.xml --fail-on-warning",
"test:integration": "phpunit -c phpunit.integration.xml --fail-on-warning"
},
"require": {
- "php": ">=7.4 <=8.3"
+ "php": ">=7.4 <=8.3",
+ "bamarni/composer-bin-plugin": "^1.8"
},
"require-dev": {
"christophwurst/nextcloud_testing": "^0.12.4",
diff --git a/composer.lock b/composer.lock
index dbd129e1..3825515f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,66 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e67e8e0b4ca7f901bff816cc045ed61a",
- "packages": [],
+ "content-hash": "dbeb8c06c6393a7226ab88867c1e056b",
+ "packages": [
+ {
+ "name": "bamarni/composer-bin-plugin",
+ "version": "1.8.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/bamarni/composer-bin-plugin.git",
+ "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
+ "reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^2.0",
+ "php": "^7.2.5 || ^8.0"
+ },
+ "require-dev": {
+ "composer/composer": "^2.0",
+ "ext-json": "*",
+ "phpstan/extension-installer": "^1.1",
+ "phpstan/phpstan": "^1.8",
+ "phpstan/phpstan-phpunit": "^1.1",
+ "phpunit/phpunit": "^8.5 || ^9.5",
+ "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
+ "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
+ "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin"
+ },
+ "autoload": {
+ "psr-4": {
+ "Bamarni\\Composer\\Bin\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "No conflicts for your bin dependencies",
+ "keywords": [
+ "composer",
+ "conflict",
+ "dependency",
+ "executable",
+ "isolation",
+ "tool"
+ ],
+ "support": {
+ "issues": "https://github.com/bamarni/composer-bin-plugin/issues",
+ "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2"
+ },
+ "time": "2022-10-31T08:38:03+00:00"
+ }
+ ],
"packages-dev": [
{
"name": "christophwurst/nextcloud_testing",
diff --git a/psalm.xml b/psalm.xml
new file mode 100644
index 00000000..c0ecb5c5
--- /dev/null
+++ b/psalm.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<psalm
+ errorLevel="4"
+ resolveFromConfigFile="true"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="https://getpsalm.org/schema/config"
+ xsi:schemaLocation="https://getpsalm.org/schema/config"
+>
+ <projectFiles>
+ <directory name="lib" />
+ <ignoreFiles>
+ <directory name="vendor" />
+ <directory name="vendor-bin/psalm/vendor/nextcloud/ocp" />
+ </ignoreFiles>
+ </projectFiles>
+ <extraFiles>
+ <directory name="vendor" />
+ <directory name="vendor-bin/psalm/vendor/nextcloud/ocp" />
+ </extraFiles>
+ <issueHandlers>
+ <UndefinedClass>
+ <errorLevel type="suppress">
+ <referencedClass name="Doctrine\DBAL\Platforms\MySQLPlatform" />
+ <referencedClass name="Doctrine\DBAL\Platforms\PostgreSQL94Platform" />
+ <referencedClass name="Doctrine\DBAL\Platforms\SqlitePlatform" />
+ <referencedClass name="Doctrine\DBAL\Types\Type" />
+ <referencedClass name="Doctrine\DBAL\Types\Types" />
+ <referencedClass name="IPLib\Factory" />
+ <referencedClass name="IPLib\Address\IPv6" />
+ <referencedClass name="OC" />
+ <referencedClass name="OC\Security\CSP\ContentSecurityPolicyNonceManager" />
+ <referencedClass name="OCA\DAV\CardDAV\ContactsManage" />
+ <referencedClass name="Symfony\Component\Console\Command\Command" />
+ <referencedClass name="Symfony\Component\Console\Input\InputArgument" />
+ <referencedClass name="Symfony\Component\Console\Input\InputInterface" />
+ <referencedClass name="Symfony\Component\Console\Input\InputOption" />
+ <referencedClass name="Symfony\Component\Console\Output\OutputInterface" />
+ <referencedClass name="OCP\TextProcessing\IManager" />
+ <referencedClass name="OCP\TextProcessing\SummaryTaskType" />
+ <referencedClass name="OCP\TextProcessing\Task" />
+ <referencedClass name="OCP\TextProcessing\SummaryTaskType" />
+ </errorLevel>
+ </UndefinedClass>
+ <UndefinedDocblockClass>
+ <errorLevel type="suppress">
+ <referencedClass name="Doctrine\DBAL\Driver\Statement" />
+ <referencedClass name="Doctrine\DBAL\Platforms\AbstractPlatform" />
+ <referencedClass name="Doctrine\DBAL\Schema\Schema" />
+ <referencedClass name="Doctrine\DBAL\Schema\SchemaException" />
+ <referencedClass name="Doctrine\DBAL\Schema\Table" />
+ <referencedClass name="OC\Security\CSP\ContentSecurityPolicyNonceManager" />
+ <referencedClass name="Symfony\Component\Console\Output\OutputInterface" />
+ </errorLevel>
+ </UndefinedDocblockClass>
+ <UndefinedFunction>
+ <errorLevel type="suppress">
+ <referencedFunction name="str_contains" />
+ </errorLevel>
+ </UndefinedFunction>
+ </issueHandlers>
+</psalm>
diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json
new file mode 100644
index 00000000..704cdf45
--- /dev/null
+++ b/vendor-bin/psalm/composer.json
@@ -0,0 +1,11 @@
+{
+ "config": {
+ "platform": {
+ "php": "7.4"
+ }
+ },
+ "require": {
+ "psalm/phar": "^5.15",
+ "nextcloud/ocp": "25"
+ }
+}
diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock
new file mode 100644
index 00000000..13bc4e8e
--- /dev/null
+++ b/vendor-bin/psalm/composer.lock
@@ -0,0 +1,248 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "ed158b109dada7f6d6ca6987d89f725c",
+ "packages": [
+ {
+ "name": "nextcloud/ocp",
+ "version": "v25.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nextcloud-deps/ocp.git",
+ "reference": "44f48933efd79cba8bc1fb6abeff82565deb6fa3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/44f48933efd79cba8bc1fb6abeff82565deb6fa3",
+ "reference": "44f48933efd79cba8bc1fb6abeff82565deb6fa3",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ~8.0 || ~8.1",
+ "psr/container": "^1.1.1",
+ "psr/event-dispatcher": "^1.0",
+ "psr/log": "^1.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "26.0.0-dev"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "AGPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Christoph Wurst",
+ "email": "christoph@winzerhof-wurst.at"
+ }
+ ],
+ "description": "Composer package containing Nextcloud's public API (classes, interfaces)",
+ "support": {
+ "issues": "https://github.com/nextcloud-deps/ocp/issues",
+ "source": "https://github.com/nextcloud-deps/ocp/tree/v25.0.0"
+ },
+ "time": "2023-03-03T14:21:39+00:00"
+ },
+ {
+ "name": "psalm/phar",
+ "version": "5.15.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/psalm/phar.git",
+ "reference": "19dde3eba5901ff50ca43a5e4c43540f097e0511"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/psalm/phar/zipball/19dde3eba5901ff50ca43a5e4c43540f097e0511",
+ "reference": "19dde3eba5901ff50ca43a5e4c43540f097e0511",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "conflict": {
+ "vimeo/psalm": "*"
+ },
+ "bin": [
+ "psalm.phar"
+ ],
+ "type": "library",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Composer-based Psalm Phar",
+ "support": {
+ "issues": "https://github.com/psalm/phar/issues",
+ "source": "https://github.com/psalm/phar/tree/5.15.0"
+ },
+ "time": "2023-08-21T03:20:52+00:00"
+ },
+ {
+ "name": "psr/container",
+ "version": "1.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.4.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/1.1.2"
+ },
+ "time": "2021-11-05T16:50:12+00:00"
+ },
+ {
+ "name": "psr/event-dispatcher",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/event-dispatcher.git",
+ "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
+ "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\EventDispatcher\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Standard interfaces for event handling.",
+ "keywords": [
+ "events",
+ "psr",
+ "psr-14"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/event-dispatcher/issues",
+ "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"
+ },
+ "time": "2019-01-08T18:20:26+00:00"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.1.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/1.1.4"
+ },
+ "time": "2021-05-03T11:20:27+00:00"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": [],
+ "platform-overrides": {
+ "php": "7.4"
+ },
+ "plugin-api-version": "2.6.0"
+}