Skip to content

Commit ccbc5e8

Browse files
committed
updated supported php versions
1 parent f4eb110 commit ccbc5e8

File tree

4 files changed

+29
-42
lines changed

4 files changed

+29
-42
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php-versions: ['7.3', '7.4']
11+
php-versions: ['7.3', '7.4', '8.0']
1212
name: PHP ${{ matrix.php-versions }}
1313
steps:
1414
- uses: actions/checkout@v2
@@ -27,4 +27,3 @@ jobs:
2727
run: composer install --no-progress --prefer-dist --optimize-autoloader
2828
- name: phpunit
2929
run: php vendor/bin/phpunit
30-

composer.json

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
{
22
"name": "hostnet/path-composer-plugin-lib",
3-
"description": "Publish vendor_dir and base_dir as constants",
43
"type": "composer-plugin",
4+
"description": "Publish vendor_dir and base_dir as constants",
55
"license": "MIT",
6-
"authors": [
7-
{
8-
"name": "Hidde Boomsma",
9-
"email": "[email protected]"
10-
}
11-
],
6+
"require": {
7+
"php": "^7.3||^8.0",
8+
"composer-plugin-api": "^2.0.0"
9+
},
10+
"require-dev": {
11+
"composer/composer": "^2.0",
12+
"phpunit/phpunit": "^9.5.6",
13+
"squizlabs/php_codesniffer": "^2.9"
14+
},
1215
"autoload": {
1316
"psr-4": {
1417
"Hostnet\\Component\\Path\\": "src"
1518
}
1619
},
17-
"require": {
18-
"php": ">=5.6",
19-
"composer-plugin-api": "^2.0.0"
20-
},
2120
"extra": {
2221
"class": "Hostnet\\Component\\Path\\Plugin"
23-
},
24-
"require-dev": {
25-
"composer/composer": "^2.0",
26-
"phpunit/phpunit": "^5.7",
27-
"squizlabs/php_codesniffer": "^2.9"
2822
}
2923
}

phpunit.xml.dist

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
1-
<phpunit
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
mapTestClassNameToCoveredClassName="true"
7-
>
8-
9-
<testsuites>
10-
<testsuite name="path-composer-plugin-lib">
11-
<directory>test/</directory>
12-
</testsuite>
13-
</testsuites>
14-
15-
<filter>
16-
<whitelist>
17-
<directory>./src</directory>
18-
</whitelist>
19-
</filter>
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true">
3+
<coverage>
4+
<include>
5+
<directory>./src</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="path-composer-plugin-lib">
10+
<directory>test/</directory>
11+
</testsuite>
12+
</testsuites>
2013
</phpunit>

test/PluginTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,32 @@
55
use Composer\Config;
66
use Composer\IO\NullIO;
77
use Composer\Script\ScriptEvents;
8+
use PHPUnit\Framework\TestCase;
89

910
/**
1011
* @covers \Hostnet\Component\Path\Plugin
1112
*/
12-
class PluginTest extends \PHPUnit_Framework_TestCase
13+
class PluginTest extends TestCase
1314
{
1415
/**
1516
* @var Plugin
1617
*/
1718
private $plugin;
1819

19-
protected function setUp()
20+
protected function setUp(): void
2021
{
2122
$this->plugin = new Plugin();
2223
}
2324

24-
public function testGetSubscribedEvents()
25+
public function testGetSubscribedEvents(): void
2526
{
2627
self::assertSame(
2728
[ScriptEvents::PRE_AUTOLOAD_DUMP => 'onPreAutoloadDump'],
2829
$this->plugin->getSubscribedEvents()
2930
);
3031
}
3132

32-
public function testOnPreAutoloadDump()
33+
public function testOnPreAutoloadDump(): void
3334
{
3435
$config = new Config(false, __DIR__ . '/../');
3536
$composer = new Composer();
@@ -44,7 +45,7 @@ public function testOnPreAutoloadDump()
4445
self::assertEquals(realpath(__DIR__ . '/../vendor'), Path::VENDOR_DIR);
4546
}
4647

47-
protected function tearDown()
48+
protected function tearDown(): void
4849
{
4950
@unlink(__DIR__ . '/../src/Path.php');
5051
}

0 commit comments

Comments
 (0)