Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8 support Fixes #14 #22

Merged
merged 3 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,37 @@ env:
matrix:
fast_finish: true
include:
- php: 7.1
- php: 7.3
env:
- DEPS=lowest
- php: 7.1
- php: 7.3
env:
- DEPS=latest
- CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.2
- php: 7.4
env:
- DEPS=lowest
- php: 7.2
- php: 7.4
env:
- DEPS=latest
- php: 7.3
- php: 7.4
env:
- DEPS=lowest
- php: 7.3
- COMPOSER_VERSION=2
- php: 7.4
env:
- DEPS=latest
- php: 7.4
- COMPOSER_VERSION=2
- php: nightly
env:
- DEPS=lowest
- php: 7.4
- php: nightly
env:
- DEPS=latest
- php: 7.4
- php: nightly
env:
- DEPS=lowest
- COMPOSER_VERSION=2
- php: 7.4
- php: nightly
env:
- DEPS=latest
- COMPOSER_VERSION=2
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"class": "Laminas\\ComponentInstaller\\ComponentInstaller"
},
"require": {
"php": "^7.1",
"php": "^7.3 || ~8.0.0",
"composer-plugin-api": "^1.0 || ^2.0",
"laminas/laminas-zendframework-bridge": "^1.0"
},
Expand All @@ -34,7 +34,8 @@
"laminas/laminas-coding-standard": "~1.0.0",
"malukenho/docheader": "^0.1.6",
"mikey179/vfsstream": "^1.6.7",
"phpunit/phpunit": "^7.5.15 || ^8.3.4"
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 4 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</include>
</coverage>
</phpunit>
9 changes: 6 additions & 3 deletions test/ComponentInstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use org\bovigo\vfs\vfsStreamDirectory;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use ReflectionObject;

Expand All @@ -40,6 +41,8 @@

class ComponentInstallerTest extends TestCase
{
use ProphecyTrait;

/**
* @var vfsStreamDirectory
*/
Expand Down Expand Up @@ -1258,7 +1261,7 @@ public function testOnPostPackageUninstallRemovesPackageFromConfiguration()
$this->assertNull($this->installer->onPostPackageUninstall($event->reveal()));

$config = file_get_contents(vfsStream::url('project/config/application.config.php'));
$this->assertNotContains('Some\Component', $config);
$this->assertStringNotContainsString('Some\Component', $config);
}

public function testOnPostPackageUninstallCanRemovePackageArraysFromConfiguration()
Expand Down Expand Up @@ -1305,8 +1308,8 @@ public function testOnPostPackageUninstallCanRemovePackageArraysFromConfiguratio
$this->assertNull($this->installer->onPostPackageUninstall($event->reveal()));

$config = file_get_contents(vfsStream::url('project/config/application.config.php'));
$this->assertNotContains('Some\Component', $config);
$this->assertNotContains('Other\Component', $config);
$this->assertStringNotContainsString('Some\Component', $config);
$this->assertStringNotContainsString('Other\Component', $config);
}

public function testModuleIsAppended()
Expand Down