Skip to content

Commit

Permalink
Merge pull request #1 from michaelw85/159_bump_symfony_package_versions
Browse files Browse the repository at this point in the history
159 bump symfony package versions
  • Loading branch information
michaelw85 authored May 15, 2024
2 parents 9cbe85b + 6445a75 commit ee885a3
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ build
composer.lock
vendor
.phpunit.result.cache
.phpunit.cache
.php-cs-fixer.cache
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
}
],
"require": {
"php": "^7.2 | ^8.0 | ^8.1",
"php": "^7.2 | ^8.0",
"clue/stdio-react": "^2.4",
"jolicode/jolinotif": "^2.2",
"symfony/console": "^5 | ^6",
"symfony/finder": "^5.4 | ^6",
"symfony/process": "^5.4 | ^6",
"symfony/yaml": "^5.2 | ^6",
"symfony/console": "^5 | ^6 | ^7",
"symfony/finder": "^5.4 | ^6 | ^7",
"symfony/process": "^5.4 | ^6 | ^7",
"symfony/yaml": "^5.2 | ^6 | ^7",
"yosymfony/resource-watcher": "^2.0 | ^3.0"
},
"conflict": {
"yosymfony/resource-watcher": "<2.0",
"symfony/console": "<5.2"
},
"require-dev": {
"phpunit/phpunit": "^8.6 | ^9.0"
"phpunit/phpunit": "^11.0"
},
"autoload": {
"psr-4": {
Expand Down
23 changes: 12 additions & 11 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Spatie Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.1/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage/>
<testsuites>
<testsuite name="Spatie Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion src/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function __construct()
$this->add(new WatcherCommand());
}

public function getLongVersion()
public function getLongVersion(): string
{
return parent::getLongVersion().' by <comment>Spatie</comment>';
}
Expand Down
4 changes: 3 additions & 1 deletion src/WatcherCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function configure()
->addArgument('phpunit-options', InputArgument::OPTIONAL, 'Options passed to phpunit');
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$options = $this->determineOptions($input);

Expand All @@ -28,6 +28,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->displayOptions($options, $input, $output);

$watcher->startWatching();

return 0;
}

protected function determineOptions(InputInterface $input): array
Expand Down
2 changes: 2 additions & 0 deletions tests/PhpunitWatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
use PHPUnit\Framework\TestCase;
use Spatie\PhpUnitWatcher\OS;
use Symfony\Component\Process\Process;
use PHPUnit\Framework\Attributes\Test;

class PhpunitWatcherTest extends TestCase
{
/** @test */
#[Test]
public function the_watcher_can_be_executed()
{
$process = new Process(OS::isOnWindows() ? ['php', 'phpunit-watcher'] : ['./phpunit-watcher']);
Expand Down
2 changes: 2 additions & 0 deletions tests/WatcherCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Spatie\PhpUnitWatcher\Test;

use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
use Spatie\PhpUnitWatcher\WatcherCommand;

class WatcherCommandTest extends TestCase
{
/** @test */
#[Test]
public function it_can_be_instantiated()
{
$command = new WatcherCommand();
Expand Down
4 changes: 4 additions & 0 deletions tests/WatcherFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Spatie\PhpUnitWatcher\Test;

use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
use Spatie\PhpUnitWatcher\WatcherFactory;

class WatcherFactoryTest extends TestCase
{
/** @test */
#[Test]
public function it_can_be_instantiated()
{
$factory = new WatcherFactory();
Expand All @@ -16,6 +18,7 @@ public function it_can_be_instantiated()
}

/** @test */
#[Test]
public function setting_notification_preserves_other_options()
{
$userOptions = [
Expand All @@ -33,6 +36,7 @@ public function setting_notification_preserves_other_options()
}

/** @test */
#[Test]
public function setting_directories_preserves_other_options()
{
$userOptions = [
Expand Down

0 comments on commit ee885a3

Please sign in to comment.