mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Improve ext-phalcon linux script and readme
This commit is contained in:
parent
0c9f8a8e7e
commit
6c6203b683
@ -70,11 +70,11 @@ Setup PHP with required extensions, php.ini configuration, code-coverage support
|
||||
|
||||
## :wrench: Tools Support
|
||||
|
||||
The latest version of the following tools can be setup globally using the `tools` input
|
||||
The latest version of the following tools can be setup globally using the `tools` input.
|
||||
|
||||
`composer`, `codeception`, `deployer`, `pecl`, `phinx`, `phpcbf`, `phpcpd`, `php-cs-fixer`, `phpcs`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm`
|
||||
|
||||
```yml
|
||||
```yaml
|
||||
uses: shivammathur/setup-php@v1
|
||||
with:
|
||||
php-version: '7.4'
|
||||
@ -236,7 +236,7 @@ You can persist composer's internal cache directory using the [`action/cache`](h
|
||||
|
||||
In the above example, if you support a range of `composer` dependencies and do not commit `composer.lock`, you can use the hash of `composer.json` as the key for your cache.
|
||||
|
||||
```yml
|
||||
```yaml
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||
```
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
|
||||
find /etc/apt/sources.list.d -type f -name 'ondrej-ubuntu-php*.list' -exec sudo DEBIAN_FRONTEND=noninteractive apt-fast update -o Dir::Etc::sourcelist="{}" ';' >/dev/null 2>&1
|
||||
curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-dev
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-psr
|
||||
for tool in php-config phpize; do
|
||||
if [ -e "/usr/bin/$tool$2" ]; then
|
||||
sudo update-alternatives --set $tool /usr/bin/"$tool$2"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! "$(apt-cache search php"$2"-psr)" ]; then
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-dev
|
||||
for tool in php-config phpize; do
|
||||
if [ -e "/usr/bin/$tool$2" ]; then
|
||||
sudo update-alternatives --set $tool /usr/bin/"$tool$2"
|
||||
fi
|
||||
done
|
||||
cd ~ && git clone --depth=1 https://github.com/jbboehr/php-psr.git
|
||||
cd php-psr && sudo /usr/bin/phpize"$2"
|
||||
./configure --with-php-config=/usr/bin/php-config"$2"
|
||||
|
Loading…
Reference in New Issue
Block a user