Skip to content

Commit

Permalink
Fixed installation of sqlsrv and eio PECL packages
Browse files Browse the repository at this point in the history
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
  • Loading branch information
morozov committed Jun 23, 2017
1 parent 6be60c1 commit e64347a
Show file tree
Hide file tree
Showing 8 changed files with 607 additions and 239 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
composer.lock
tests/tmp
vendor
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"corneltek/curlkit": "1.0.x-dev"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"corneltek/phpunit-testmore": "dev-master"
},
"license": "MIT",
Expand Down
17 changes: 10 additions & 7 deletions src/PEARX/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,19 @@ public function getContentsByRole($role)
});
}



public function validateDependencyType($type)
{
if( $type != 'php'
&& $type != 'pearinstaller'
&& $type != 'extension'
&& $type != 'package' )
throw new Exception('invalid pear dependency type.');
switch ($type) {
case 'arch':
case 'extension':
case 'os':
case 'package':
case 'pearinstaller':
case 'php':
return;
}

throw new Exception('Unsupported pear dependency type: ' . $type);
}

/**
Expand Down
2 changes: 0 additions & 2 deletions tests/bootstrap.php

This file was deleted.

179 changes: 0 additions & 179 deletions tests/data/package_xml/PHPUnit_MockObject/package.xml

This file was deleted.

51 changes: 0 additions & 51 deletions tests/data/package_xml/PHP_Timer/package.xml

This file was deleted.

Loading

0 comments on commit e64347a

Please sign in to comment.