1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 12:24:49 +01:00

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.
This commit is contained in:
Barney Laurance 2019-06-06 23:12:53 +01:00 committed by Matthew Brown
parent c3d27c6e96
commit eecd21a7d5
10 changed files with 33 additions and 3 deletions

View File

@ -0,0 +1 @@
This allows you to install [Psalm](https://github.com/vimeo/psalm) without worrying about composer conflicts.

View File

@ -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"]
}

View File

@ -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

2
assets/psalm-phar/psalm Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env php
<?php require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'psalm.phar/src/psalm.php';

View File

@ -0,0 +1,2 @@
#!/usr/bin/env php
<?php require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'psalm.phar/src/psalm-language-server.php';

2
assets/psalm-phar/psalm-plugin Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env php
<?php require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'psalm.phar/src/psalm_plugin.php';

View File

@ -0,0 +1,2 @@
#!/usr/bin/env php
<?php require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'psalm.phar/src/psalm-refactor.php';

2
assets/psalm-phar/psalter Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env php
<?php require_once 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . 'psalm.phar/src/psalter.php';

View File

@ -1,11 +1,13 @@
#!/usr/bin/env bash
git clone https://${GITHUB_TOKEN}@github.com/psalm/phar.git > /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

View File

@ -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"],