Add symfony/flex to supported tools

This commit is contained in:
Shivam Mathur 2020-02-25 10:00:07 +05:30
parent a4f7326577
commit 9539b27b4a
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 12 additions and 3 deletions

View File

@ -367,7 +367,7 @@ describe('Tools tests', () => {
it('checking addTools on linux', async () => {
const script: string = await tools.addTools(
'cs2pr, php-cs-fixer, phpstan, phpunit, pecl, phinx, phinx:1.2.3, phive, php-config, phpize, symfony, wp-cli',
'cs2pr, flex, php-cs-fixer, phpstan, phpunit, pecl, phinx, phinx:1.2.3, phive, php-config, phpize, symfony, wp-cli',
'7.4',
'linux'
);
@ -396,6 +396,7 @@ describe('Tools tests', () => {
'add_tool https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true wp-cli'
);
expect(script).toContain('add_pecl');
expect(script).toContain('add_composer_tool flex flex symfony/');
expect(script).toContain('add_composer_tool phinx phinx robmorgan/');
expect(script).toContain('add_composer_tool phinx phinx:1.2.3 robmorgan/');
expect(script).toContain('add_devtools');
@ -404,7 +405,7 @@ describe('Tools tests', () => {
});
it('checking addTools on darwin', async () => {
const script: string = await tools.addTools(
'phpcs, phpcbf, phpcpd, phpmd, psalm, phinx, phive:1.2.3, cs2pr:1.2.3, composer-prefetcher:1.2.3, phpize, php-config, symfony, symfony:1.2.3, wp-cli',
'flex, phpcs, phpcbf, phpcpd, phpmd, psalm, phinx, phive:1.2.3, cs2pr:1.2.3, composer-prefetcher:1.2.3, phpize, php-config, symfony, symfony:1.2.3, wp-cli',
'7.4',
'darwin'
);
@ -429,6 +430,7 @@ describe('Tools tests', () => {
expect(script).toContain(
'https://github.com/vimeo/psalm/releases/latest/download/psalm.phar psalm'
);
expect(script).toContain('add_composer_tool flex flex symfony/');
expect(script).toContain('add_composer_tool phinx phinx robmorgan/');
expect(script).toContain(
'add_tool https://github.com/phar-io/phive/releases/download/1.2.3/phive-1.2.3.phar phive'
@ -450,7 +452,7 @@ describe('Tools tests', () => {
});
it('checking addTools on windows', async () => {
const script: string = await tools.addTools(
'codeception, cs2pr, deployer, prestissimo, phpmd, phinx, phive:0.13.2, php-config, phpize, symfony, wp-cli, does_not_exit',
'codeception, cs2pr, deployer, flex, prestissimo, phpmd, phinx, phive:0.13.2, php-config, phpize, symfony, wp-cli, does_not_exit',
'7.4',
'win32'
);
@ -460,6 +462,7 @@ describe('Tools tests', () => {
expect(script).toContain(
'Add-Tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr'
);
expect(script).toContain('Add-Composer-Tool flex flex symfony/');
expect(script).toContain(
'Add-Tool https://deployer.org/deployer.phar deployer'
);

3
dist/index.js vendored
View File

@ -2042,6 +2042,9 @@ function addTools(tools_csv, php_version, os_version) {
url = yield getDeployerUrl(version);
script += yield addArchive(tool, version, url, os_version);
break;
case 'flex':
script += yield addPackage(tool, release, 'symfony/', os_version);
break;
case 'phinx':
script += yield addPackage(tool, release, 'robmorgan/', os_version);
break;

View File

@ -517,6 +517,9 @@ export async function addTools(
url = await getDeployerUrl(version);
script += await addArchive(tool, version, url, os_version);
break;
case 'flex':
script += await addPackage(tool, release, 'symfony/', os_version);
break;
case 'phinx':
script += await addPackage(tool, release, 'robmorgan/', os_version);
break;