mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 18:13:13 +00:00
Psalm: switch from Phive to Composer
This switches the installation method for Psalm from Phive to Composer, while still using a Phar file for running Psalm.
Includes:
* Removing Psalm from the Phive configuration.
* Adding Psalm to the Composer configuration. Includes upgrading from version `3.11.2` to version `4.8.1`.
* Adjusting the script used in the `Makefile`.
👉 Please verify and test this as things work differently on different OS-es and this should work for you.
* Adjusting the GH Actions script to use the Composer installed version of Psalm.
Note: due to the committed `composer.lock` file, Psalm will not automatically upgrade when newer versions are available.
Refs:
* https://github.com/vimeo/psalm/releases
* https://github.com/psalm/phar/releases
This commit is contained in:
@@ -188,7 +188,6 @@ jobs:
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: ${{ env.extensions }}
|
||||
tools: psalm
|
||||
ini-values: memory_limit=2G, display_errors=On, error_reporting=-1
|
||||
|
||||
- name: Install Composer dependencies & cache dependencies
|
||||
@@ -197,7 +196,7 @@ jobs:
|
||||
composer-options: --optimize-autoloader
|
||||
|
||||
- name: Run psalm
|
||||
run: psalm --output-format=github
|
||||
run: vendor/bin/psalm.phar --output-format=github
|
||||
|
||||
|
||||
bc_check:
|
||||
|
||||
@@ -25,7 +25,7 @@ phpstan:
|
||||
|
||||
.PHONY: psalm
|
||||
psalm:
|
||||
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.2 tools/psalm
|
||||
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.3 vendor/bin/psalm.phar
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
|
||||
+2
-1
@@ -21,7 +21,8 @@
|
||||
"ext-filter": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "~1.3.2"
|
||||
"mockery/mockery": "~1.3.2",
|
||||
"psalm/phar": "^4.8"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
Generated
+60
-2
@@ -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": "8a52bc233d90a2f83a3d5ac697d9ccdc",
|
||||
"content-hash": "f1e7818879f1626c05926f50c2c96f44",
|
||||
"packages": [
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
@@ -53,6 +53,10 @@
|
||||
"reflection",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
|
||||
"source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
|
||||
},
|
||||
"time": "2020-06-27T09:03:43+00:00"
|
||||
},
|
||||
{
|
||||
@@ -98,6 +102,10 @@
|
||||
}
|
||||
],
|
||||
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
|
||||
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
|
||||
},
|
||||
"time": "2020-09-17T18:55:26+00:00"
|
||||
},
|
||||
{
|
||||
@@ -160,6 +168,9 @@
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.17.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
@@ -223,6 +234,10 @@
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/webmozarts/assert/issues",
|
||||
"source": "https://github.com/webmozarts/assert/tree/1.9.1"
|
||||
},
|
||||
"time": "2020-07-08T17:02:28+00:00"
|
||||
}
|
||||
],
|
||||
@@ -272,6 +287,10 @@
|
||||
"keywords": [
|
||||
"test"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/hamcrest/hamcrest-php/issues",
|
||||
"source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1"
|
||||
},
|
||||
"time": "2020-07-09T08:09:16+00:00"
|
||||
},
|
||||
{
|
||||
@@ -337,7 +356,46 @@
|
||||
"test double",
|
||||
"testing"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/mockery/mockery/issues",
|
||||
"source": "https://github.com/mockery/mockery/tree/1.3.4"
|
||||
},
|
||||
"time": "2021-02-24T09:51:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psalm/phar",
|
||||
"version": "4.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/psalm/phar.git",
|
||||
"reference": "ce0856e5c28a78382d1fa4e1a11cf9aac6292231"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/psalm/phar/zipball/ce0856e5c28a78382d1fa4e1a11cf9aac6292231",
|
||||
"reference": "ce0856e5c28a78382d1fa4e1a11cf9aac6292231",
|
||||
"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/4.8.1"
|
||||
},
|
||||
"time": "2021-06-21T02:02:58+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
@@ -350,5 +408,5 @@
|
||||
"ext-filter": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "1.1.0"
|
||||
"plugin-api-version": "2.1.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phive xmlns="https://phar.io/phive">
|
||||
<phar name="phpunit" version="^9.2" installed="9.3.7" location="./tools/phpunit" copy="true"/>
|
||||
<phar name="psalm" version="^3.12.1" installed="3.12.1" location="./tools/psalm" copy="true"/>
|
||||
</phive>
|
||||
|
||||
Reference in New Issue
Block a user