Skip to content

Commit e64347a

Browse files
committed
Fixed installation of sqlsrv and eio PECL packages
1. Added `os` and `arch` as valid dependency types 2. Removed testing of PHP_Timer and PHPUnit_MockObject as their channels do not exist anymore 3. Added .gitignore 4. Added dev-dependency on PHPUnit as otherwise the tests are incompatible with the latest PHPUnit 6 Fixes #6, #8
1 parent 6be60c1 commit e64347a

File tree

8 files changed

+607
-239
lines changed

8 files changed

+607
-239
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
composer.lock
2+
tests/tmp
3+
vendor

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"corneltek/curlkit": "1.0.x-dev"
99
},
1010
"require-dev": {
11+
"phpunit/phpunit": "^5.7",
1112
"corneltek/phpunit-testmore": "dev-master"
1213
},
1314
"license": "MIT",

src/PEARX/Package.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,16 +267,19 @@ public function getContentsByRole($role)
267267
});
268268
}
269269

270-
271-
272270
public function validateDependencyType($type)
273271
{
274-
if( $type != 'php'
275-
&& $type != 'pearinstaller'
276-
&& $type != 'extension'
277-
&& $type != 'package' )
278-
throw new Exception('invalid pear dependency type.');
272+
switch ($type) {
273+
case 'arch':
274+
case 'extension':
275+
case 'os':
276+
case 'package':
277+
case 'pearinstaller':
278+
case 'php':
279+
return;
280+
}
279281

282+
throw new Exception('Unsupported pear dependency type: ' . $type);
280283
}
281284

282285
/**

tests/bootstrap.php

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/data/package_xml/PHPUnit_MockObject/package.xml

Lines changed: 0 additions & 179 deletions
This file was deleted.

tests/data/package_xml/PHP_Timer/package.xml

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)