Skip to content

Commit 39923d1

Browse files
committed
remove support for PHP 7.0 and adopt PHP 7.1
1 parent d334052 commit 39923d1

6 files changed

Lines changed: 18 additions & 22 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ language: php
33
sudo: false
44

55
php:
6-
- 7.0
76
- 7.1
87
- 7.2
98
- nightly

build/cs-ruleset.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?xml version="1.0"?>
22
<ruleset name="ConsistenceCodingStandard">
3-
<rule ref="../vendor/consistence/coding-standard/Consistence/ruleset.xml">
4-
<exclude name="SlevomatCodingStandard.Classes.ClassConstantVisibility"/><!-- requires 7.1+ -->
5-
<exclude name="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/><!-- requires PHP 7.1+ -->
6-
</rule>
3+
<rule ref="../vendor/consistence/coding-standard/Consistence/ruleset.xml"/>
74
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
85
<properties>
96
<property name="rootNamespaces" type="array" value="

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php": "~7.0",
14+
"php": "~7.1",
1515
"phing/phing": "~2.16"
1616
},
1717
"require-dev": {

src/SymfonyCommandTask.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
class SymfonyCommandTask extends \ExecTask
1010
{
1111

12-
const PROPERTY_DEFAULT_EXECUTABLE = 'symfony-command.default.executable';
13-
const PROPERTY_DEFAULT_APP = 'symfony-command.default.app';
12+
public const PROPERTY_DEFAULT_EXECUTABLE = 'symfony-command.default.executable';
13+
public const PROPERTY_DEFAULT_APP = 'symfony-command.default.app';
1414

1515
/** @var bool check return code by default */
1616
protected $checkreturn = true;
@@ -30,23 +30,23 @@ class SymfonyCommandTask extends \ExecTask
3030
/**
3131
* @param string $executable
3232
*/
33-
public function setExecutable($executable)
33+
public function setExecutable($executable): void
3434
{
3535
$this->executable = $executable;
3636
parent::setExecutable($executable);
3737
}
3838

39-
public function setApp(string $app)
39+
public function setApp(string $app): void
4040
{
4141
$this->app = $app;
4242
}
4343

44-
public function setCmd(string $cmd)
44+
public function setCmd(string $cmd): void
4545
{
4646
$this->cmd = $cmd;
4747
}
4848

49-
public function main()
49+
public function main(): void
5050
{
5151
if ($this->app === null) {
5252
$defaultApp = $this->getProject()->getProperty(self::PROPERTY_DEFAULT_APP);

tests/HelloWorldCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
class HelloWorldCommand extends \Symfony\Component\Console\Command\Command
1111
{
1212

13-
const NAME = 'hello:world';
13+
public const NAME = 'hello:world';
1414

15-
protected function configure()
15+
protected function configure(): void
1616
{
1717
$this->setName(self::NAME);
1818
$description = 'Hello world test command';
1919
$this->setDescription($description);
2020
$this->setHelp($description);
2121
}
2222

23-
protected function execute(InputInterface $input, OutputInterface $output)
23+
protected function execute(InputInterface $input, OutputInterface $output): void
2424
{
2525
// empty
2626
}

tests/SymfonyCommandTaskIntegrationTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class SymfonyCommandTaskIntegrationTest extends \PHPUnit\Framework\TestCase
1111
{
1212

13-
public function testCallCommand()
13+
public function testCallCommand(): void
1414
{
1515
$tester = new PhingTester(__DIR__ . '/symfony-command-task-integration-test.xml');
1616
$target = __FUNCTION__;
@@ -23,7 +23,7 @@ public function testCallCommand()
2323
), $target, Project::MSG_VERBOSE);
2424
}
2525

26-
public function testCallCommandWithCustomExecutable()
26+
public function testCallCommandWithCustomExecutable(): void
2727
{
2828
$tester = new PhingTester(__DIR__ . '/symfony-command-task-integration-test.xml');
2929
$target = __FUNCTION__;
@@ -36,7 +36,7 @@ public function testCallCommandWithCustomExecutable()
3636
), $target, Project::MSG_VERBOSE);
3737
}
3838

39-
public function testCallCommandWithCustomApp()
39+
public function testCallCommandWithCustomApp(): void
4040
{
4141
$tester = new PhingTester(__DIR__ . '/symfony-command-task-integration-test.xml');
4242
$target = __FUNCTION__;
@@ -49,7 +49,7 @@ public function testCallCommandWithCustomApp()
4949
), $target, Project::MSG_VERBOSE);
5050
}
5151

52-
public function testCallCommandWithCustomExecutableAndApp()
52+
public function testCallCommandWithCustomExecutableAndApp(): void
5353
{
5454
$tester = new PhingTester(__DIR__ . '/symfony-command-task-integration-test.xml');
5555
$target = __FUNCTION__;
@@ -62,7 +62,7 @@ public function testCallCommandWithCustomExecutableAndApp()
6262
), $target, Project::MSG_VERBOSE);
6363
}
6464

65-
public function testCallCommandWithAppAsExecutable()
65+
public function testCallCommandWithAppAsExecutable(): void
6666
{
6767
$tester = new PhingTester(__DIR__ . '/symfony-command-task-integration-test.xml');
6868
$target = __FUNCTION__;
@@ -74,7 +74,7 @@ public function testCallCommandWithAppAsExecutable()
7474
), $target, Project::MSG_VERBOSE);
7575
}
7676

77-
public function testCallCommandAndOverrideDefaults()
77+
public function testCallCommandAndOverrideDefaults(): void
7878
{
7979
$tester = new PhingTester(__DIR__ . '/symfony-command-task-integration-test.xml');
8080
$target = __FUNCTION__;
@@ -87,7 +87,7 @@ public function testCallCommandAndOverrideDefaults()
8787
), $target, Project::MSG_VERBOSE);
8888
}
8989

90-
public function testMissingApp()
90+
public function testMissingApp(): void
9191
{
9292
$tester = new PhingTester(__DIR__ . '/symfony-command-task-integration-test.xml');
9393
$target = __FUNCTION__;

0 commit comments

Comments
 (0)