Skip to content

Commit

Permalink
Merge pull request #123 from clue-labs/php8.1
Browse files Browse the repository at this point in the history
Support PHP 8.1 release
  • Loading branch information
clue authored Dec 28, 2021
2 parents 66ca167 + 82cc054 commit 967f01a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
strategy:
matrix:
php:
- 8.1
- 8.0
- 7.4
- 7.3
Expand Down
3 changes: 3 additions & 0 deletions bin/phar-composer
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
exit(1);
}

// hide PHP 8.1 deprecations
error_reporting(E_ALL & ~E_DEPRECATED);

$app = new Clue\PharComposer\App();
$app->run();
3 changes: 2 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
bootstrap="tests/bootstrap.php"
cacheResult="false"
colors="true">
colors="true"
convertDeprecationsToExceptions="true">
<testsuites>
<testsuite name="PharComposer Test Suite">
<directory>./tests/</directory>
Expand Down
1 change: 1 addition & 0 deletions src/Clue/PharComposer/Package/Bundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private function directoryContains(Finder $dir, $resource)
*
* @return \Traversable
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayIterator($this->resources);
Expand Down
1 change: 1 addition & 0 deletions tests/Command/SearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function testExecuteWithProjectAndSearchReturnsOneMatchWillAskForProject(
$packager = $this->getMockBuilder('Clue\PharComposer\Phar\Packager')->getMock();

$result = $this->getMockBuilder('Packagist\Api\Result\Result')->getMock();
$result->expects($this->exactly(2))->method('getName')->willReturn('foo/bar');

$packagist = $this->getMockBuilder('Packagist\Api\Client')->getMock();
$packagist->expects($this->once())->method('search')->with('foo')->willReturn(array($result));
Expand Down

0 comments on commit 967f01a

Please sign in to comment.