Skip to content

Commit 77bc79b

Browse files
authored
Merge pull request #76 from shivammathur/develop
Edit extension installation, update cache yml
2 parents 013ddc7 + 02c5ec1 commit 77bc79b

File tree

6 files changed

+107
-169
lines changed

6 files changed

+107
-169
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -187,20 +187,23 @@ You can persist composer's internal cache directory using the [`action/cache`](h
187187
- name: Get Composer Cache Directory
188188
id: composer-cache
189189
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
190+
190191
- name: Cache on linux and macOS
191-
if: matrix.operating-system != 'windows-latest'
192+
if: runner.os != 'Windows'
192193
uses: actions/cache@v1
193194
with:
194195
path: ${{ steps.composer-cache.outputs.dir }}
195196
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
196197
restore-keys: ${{ runner.os }}-composer-
198+
197199
- name: Cache on windows
198-
if: matrix.operating-system == 'windows-latest'
200+
if: runner.os == 'Windows'
199201
uses: actions/cache@v1
200202
with:
201203
path: ${{ steps.composer-cache.outputs.dir }}
202204
key: ${{ runner.os }}-composer-${{ hashFiles('**composer.lock') }}
203205
restore-keys: ${{ runner.os }}-composer-
206+
204207
- name: Install Dependencies
205208
run: composer install --prefer-dist
206209
```

__tests__/extensions.test.ts

-10
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ describe('Extension tests', () => {
4848
);
4949
expect(linux).toContain('pecl install pcov');
5050

51-
linux = await extensions.addExtension('xdebug, pcov', '7.4', 'linux');
52-
expect(linux).toContain('xdebug.sh');
53-
expect(linux).toContain('pcov.sh');
54-
5551
linux = await extensions.addExtension('phalcon3, phalcon4', '7.2', 'linux');
5652
expect(linux).toContain('phalcon.sh master 7.2');
5753
expect(linux).toContain('phalcon.sh 4.0.x 7.2');
@@ -82,12 +78,6 @@ describe('Extension tests', () => {
8278
darwin = await extensions.addExtension('xdebug', '5.6', 'darwin');
8379
expect(darwin).toContain('sudo pecl install xdebug-2.5.5');
8480

85-
darwin = await extensions.addExtension('xdebug', '7.4', 'darwin');
86-
expect(darwin).toContain('xdebug_darwin.sh');
87-
88-
darwin = await extensions.addExtension('pcov', '7.4', 'darwin');
89-
expect(darwin).toContain('pcov.sh');
90-
9181
darwin = await extensions.addExtension('xdebug', '7.2', 'darwin');
9282
expect(darwin).toContain('sudo pecl install xdebug');
9383

lib/extensions.js

-24
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,6 @@ function addExtensionDarwin(extension_csv, version) {
6969
// add script to enable extension is already installed along with php
7070
let install_command = '';
7171
switch (version + extension) {
72-
case '7.4xdebug':
73-
install_command =
74-
'sh ' +
75-
path.join(__dirname, '../src/scripts/xdebug_darwin.sh') +
76-
' >/dev/null 2>&1 && echo "zend_extension=xdebug.so" >> $ini_file';
77-
break;
78-
case '7.4pcov':
79-
install_command =
80-
'sh ' +
81-
path.join(__dirname, '../src/scripts/pcov.sh') +
82-
' >/dev/null 2>&1 && echo "extension=pcov.so" >> $ini_file';
83-
break;
8472
case '5.6xdebug':
8573
install_command = 'sudo pecl install xdebug-2.5.5 >/dev/null 2>&1';
8674
break;
@@ -159,18 +147,6 @@ function addExtensionLinux(extension_csv, version) {
159147
// add script to enable extension is already installed along with php
160148
let install_command = '';
161149
switch (version + extension) {
162-
case '7.4xdebug':
163-
install_command =
164-
'sh ' +
165-
path.join(__dirname, '../src/scripts/xdebug.sh') +
166-
' >/dev/null 2>&1 && echo "zend_extension=xdebug.so" >> $ini_file';
167-
break;
168-
case '7.4pcov':
169-
install_command =
170-
'sh ' +
171-
path.join(__dirname, '../src/scripts/pcov.sh') +
172-
' >/dev/null 2>&1 && echo "extension=pcov.so" >> $ini_file';
173-
break;
174150
case '7.2phalcon3':
175151
case '7.3phalcon3':
176152
install_command =

0 commit comments

Comments
 (0)