Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ This disables all core and third-party shared extensions and thus, can break som

These tools can be set up globally using the `tools` input. It accepts a string in csv-format.

[`behat`], [`blackfire`], [`blackfire-player`], [`box`], [`castor`], [`churn`], [`codeception`], [`composer`], [`composer-dependency-analyser`], [`composer-normalize`], [`composer-prefetcher`], [`composer-require-checker`], [`composer-unused`], [`cs2pr`], [`deployer`], [`ecs`], [`flex`], [`grpc_php_plugin`], [`infection`], [`parallel-lint`], [`pecl`], [`phan`], [`phing`], [`phinx`], [`phive`], [`php-config`], [`php-cs-fixer`], [`php-scoper`], [`phpcbf`], [`phpcpd`], [`phpcs`], [`phpdoc`] or [`phpDocumentor`], [`phpize`], [`phplint`], [`phpmd`], [`phpspec`], [`phpstan`], [`phpunit`], [`phpunit-bridge`], [`phpunit-polyfills`], [`pie`], [`pint`], [`prestissimo`], [`protoc`], [`psalm`], [`rector`], [`symfony`] or [`symfony-cli`], [`vapor`] or [`vapor-cli`], [`wp`] or [`wp-cli`]
[`behat`], [`blackfire`], [`blackfire-player`], [`box`], [`castor`], [`churn`], [`codeception`], [`composer`], [`composer-dependency-analyser`], [`composer-normalize`], [`composer-prefetcher`], [`composer-require-checker`], [`composer-unused`], [`cs2pr`], [`deployer`], [`ecs`], [`flex`], [`grpc_php_plugin`], [`infection`], [`parallel-lint`], [`pecl`], [`phan`], [`phing`], [`phinx`], [`phive`], [`php-config`], [`php-cs-fixer`], [`php-scoper`], [`phpcbf`], [`phpcpd`], [`phpcs`], [`phpdoc`] or [`phpDocumentor`], [`phpize`], [`phplint`], [`phpmd`], [`phpspec`], [`phpstan`], [`phpunit`], [`phpunit-bridge`], [`phpunit-polyfills`], [`pie`], [`pint`], [`prestissimo`], [`protoc`], [`psalm`], [`rector`], [`roave-backward-compatibility-check`], [`symfony`] or [`symfony-cli`], [`vapor`] or [`vapor-cli`], [`wp`] or [`wp-cli`]

```yaml
- name: Setup PHP with tools
Expand Down Expand Up @@ -1100,6 +1100,7 @@ These companies generously provide setup-php their products and services to aid
[`protoc`]: https://developers.google.com/protocol-buffers/
[`psalm`]: https://psalm.dev/
[`rector`]: https://getrector.org/
[`roave-backward-compatibility-check`]: https://github.com/Roave/BackwardCompatibilityCheck
[`symfony`]: https://symfony.com/download
[`symfony-cli`]: https://symfony.com/download
[`vapor`]: https://docs.vapor.build/
Expand Down
3 changes: 2 additions & 1 deletion __tests__/tools.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ describe('Tools tests', () => {

it.each([
[
'behat, blackfire, blackfire-player, churn, composer-dependency-analyser, composer-normalize, composer-require-checker, composer-unused, cs2pr:1.2.3, ecs, flex, grpc_php_plugin:1.2.3, infection, phan, phan:1.2.3, phing:1.2.3, phinx, phive:1.2.3, php-config, phpcbf, phpcpd, phpcs, phpdoc, phpize, phpmd, phpspec, phpunit-bridge:5.6, phpunit-polyfills:1.0.1, protoc:v1.2.3, psalm, rector, symfony-cli, vapor-cli, wp-cli, pie',
'behat, blackfire, blackfire-player, churn, composer-dependency-analyser, composer-normalize, composer-require-checker, composer-unused, cs2pr:1.2.3, ecs, flex, grpc_php_plugin:1.2.3, infection, phan, phan:1.2.3, phing:1.2.3, phinx, phive:1.2.3, php-config, phpcbf, phpcpd, phpcs, phpdoc, phpize, phpmd, phpspec, phpunit-bridge:5.6, phpunit-polyfills:1.0.1, protoc:v1.2.3, psalm, rector, roave-backward-compatibility-check, symfony-cli, vapor-cli, wp-cli, pie',
[
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
'add_composer_tool behat behat behat/ scoped',
Expand Down Expand Up @@ -469,6 +469,7 @@ describe('Tools tests', () => {
'add_protoc 1.2.3',
'add_tool https://github.com/vimeo/psalm/releases/latest/download/psalm.phar psalm "-v"',
'add_composer_tool rector rector rector/ scoped',
'add_composer_tool roave-backward-compatibility-check roave-backward-compatibility-check roave/ scoped',
'add_symfony latest',
'add_composer_tool vapor-cli vapor-cli laravel/ scoped',
'add_tool https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true wp-cli "--version"',
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/configs/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,5 +337,11 @@
"alias": "ecs",
"repository": "symplify/easy-coding-standard",
"scope": "scoped"
},
"roave-backward-compatibility-check": {
"type": "composer",
"alias": "roave-backward-compatibility-check",
"repository": "roave/backward-compatibility-check",
"scope": "scoped"
}
}
5 changes: 5 additions & 0 deletions src/scripts/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
. /home/runner/work/setup-php/setup-php/src/scripts/linux.sh 8.4 production
step_log "Setup Tools"
add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-8.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-8.4-stable.phar,https://getcomposer.org/composer-stable.phar composer latest
step_log "Sponsor setup-php"
add_log "$tick" "setup-php" "https://setup-php.com/sponsor"
2 changes: 1 addition & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export async function addPackage(data: RS): Promise<string> {
const command = await utils.getCommand(data['os'], 'composer_tool');
const parts: string[] = data['repository'].split('/');
const args: string = await utils.joins(
parts[1],
data['tool'],
data['release'],
parts[0] + '/',
data['scope']
Expand Down