Skip to content

Commit

Permalink
Merge pull request #9 from morozov/dependency-types
Browse files Browse the repository at this point in the history
Fixed installation of `sqlsrv` and `eio` PECL packages
  • Loading branch information
c9s authored Jun 24, 2017
2 parents 6be60c1 + e64347a commit 2d361b3
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 2d361b3

Please sign in to comment.