From eecd21a7d500a66098c45519b603653887afe652 Mon Sep 17 00:00:00 2001 From: Barney Laurance Date: Thu, 6 Jun 2019 23:12:53 +0100 Subject: [PATCH] Add executable PHP files to PHAR distribution Previously a user of the phar distribution would have to invoke psalm as `vendor/bin/psalm.phar`. This is different to the command given in the psalm documentation, `vendor/bin/psalm` I also copied all files from the psalm/phar repo into assets/psalm-phar, so that development can be concentrated in this repo. The travis-deploy-phar.sh should copy any changes made back into the psalm/phar.git repo. --- assets/psalm-phar/README.md | 1 + assets/psalm-phar/composer.json | 9 +++++++++ assets/psalm-phar/dot-gitignore | 6 ++++++ assets/psalm-phar/psalm | 2 ++ assets/psalm-phar/psalm-language-server | 2 ++ assets/psalm-phar/psalm-plugin | 2 ++ assets/psalm-phar/psalm-refactor | 2 ++ assets/psalm-phar/psalter | 2 ++ bin/travis-deploy-phar.sh | 6 ++++-- box.json.dist | 4 +++- 10 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 assets/psalm-phar/README.md create mode 100644 assets/psalm-phar/composer.json create mode 100644 assets/psalm-phar/dot-gitignore create mode 100755 assets/psalm-phar/psalm create mode 100755 assets/psalm-phar/psalm-language-server create mode 100755 assets/psalm-phar/psalm-plugin create mode 100755 assets/psalm-phar/psalm-refactor create mode 100755 assets/psalm-phar/psalter diff --git a/assets/psalm-phar/README.md b/assets/psalm-phar/README.md new file mode 100644 index 000000000..6cf9105f5 --- /dev/null +++ b/assets/psalm-phar/README.md @@ -0,0 +1 @@ +This allows you to install [Psalm](https://github.com/vimeo/psalm) without worrying about composer conflicts. diff --git a/assets/psalm-phar/composer.json b/assets/psalm-phar/composer.json new file mode 100644 index 000000000..6c21a1a8d --- /dev/null +++ b/assets/psalm-phar/composer.json @@ -0,0 +1,9 @@ +{ + "name": "psalm/phar", + "description": "Composer-based Psalm Phar", + "license": ["MIT"], + "require": { + "php": "^7.0" + }, + "bin": ["psalm.phar", "psalm", "psalter", "psalm-language-server", "psalm-plugin"] +} diff --git a/assets/psalm-phar/dot-gitignore b/assets/psalm-phar/dot-gitignore new file mode 100644 index 000000000..a67d42b32 --- /dev/null +++ b/assets/psalm-phar/dot-gitignore @@ -0,0 +1,6 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock diff --git a/assets/psalm-phar/psalm b/assets/psalm-phar/psalm new file mode 100755 index 000000000..1dc821db8 --- /dev/null +++ b/assets/psalm-phar/psalm @@ -0,0 +1,2 @@ +#!/usr/bin/env php + /dev/null 2>&1 -cp build/psalm.phar build/psalm.phar.asc phar/ cd phar +rm -rf !(".git") +cp ../build/psalm.phar ../build/psalm.phar.asc ../assets/psalm-phar/* . +mv dot-gitignore .gitignore git config user.email "travis@travis-ci.org" git config user.name "Travis CI" -git add psalm.phar psalm.phar.asc +git add --all . git commit -m "Updated Psalm phar to commit ${TRAVIS_COMMIT}" git push --quiet origin master diff --git a/box.json.dist b/box.json.dist index a12e8df42..3cd5746c2 100644 --- a/box.json.dist +++ b/box.json.dist @@ -4,7 +4,9 @@ "src/command_functions.php", "src/psalm.php", "src/psalter.php", - "src/psalm-language-server.php" + "src/psalm-language-server.php", + "src/psalm-plugin.php", + "src/psalm-refactor.php" ], "files-bin": ["config.xsd"], "directories-bin" : ["assets"],