Skip to content
Open
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
21 changes: 1 addition & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,7 @@ on:

jobs:
tests:
name: PHP ${{ matrix.php }}, SF ${{ matrix.symfony }} - ${{ matrix.deps }}
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.1, 8.2, 8.3 ]
deps: [ highest ]
symfony: [ 6.4.*, 7.0.* ]
include:
- php: 8.1
deps: lowest
symfony: '*'
exclude:
- php: 8.1
symfony: 7.0.*
steps:
- uses: zenstruck/.github@php-test-symfony
with:
php: ${{ matrix.php }}
symfony: ${{ matrix.symfony }}
deps: ${{ matrix.deps }}
uses: zenstruck/.github/.github/workflows/php-test-symfony.yml@main

code-coverage:
uses: zenstruck/.github/.github/workflows/php-coverage-codecov.yml@main
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/vendor/
/build/
/var/
/config/reference.php
/.php-cs-fixer.cache
/.phpunit.result.cache
/Tests/app/var/cache/
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
],
"require": {
"php": ">=8.1",
"symfony/framework-bundle": "^6.4|^7.0",
"symfony/string": "^6.4|^7.0",
"symfony/framework-bundle": "^6.4|^7.0|^8.0",
"symfony/string": "^6.4|^7.0|^8.0",
"zenstruck/bytes": "^1.0"
},
"require-dev": {
Expand All @@ -32,13 +32,13 @@
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^9.6.16",
"symfony/http-client": "^6.4|^7.0",
"symfony/mailer": "^6.4|^7.0",
"symfony/messenger": "^6.4|^7.0",
"symfony/phpunit-bridge": "^6.4|^7.0",
"symfony/process": "^6.4|^7.0",
"symfony/routing": "^6.4|^7.0",
"symfony/var-dumper": "^6.4|^7.0",
"symfony/http-client": "^6.4|^7.0|^8.0",
"symfony/mailer": "^6.4|^7.0|^8.0",
"symfony/messenger": "^6.4|^7.0|^8.0",
"symfony/phpunit-bridge": "^6.4|^7.0|^8.0",
"symfony/process": "^6.4|^7.0|^8.0",
"symfony/routing": "^6.4|^7.0|^8.0",
"symfony/var-dumper": "^6.4|^7.0|^8.0",
"zenstruck/browser": "^1.8",
"zenstruck/console-test": "^1.5",
"zenstruck/mailer-test": "^1.4"
Expand Down
2 changes: 0 additions & 2 deletions tests/Check/CheckRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public function exception_thrown(): void
$this->assertSame(['exception', 'message', 'stack_trace'], \array_keys($result->context()));
$this->assertInstanceOf(\Exception::class, $result->context()['exception']);
$this->assertSame('foo', $result->context()['message']);
$this->assertStringContainsString('Liip\Monitor\Tests\Check\CheckRunnerTest->Liip\Monitor\Tests\Check\{closure}()', $result->context()['stack_trace']);
}

/**
Expand Down Expand Up @@ -70,7 +69,6 @@ public function exception_thrown_with_previous(): void
$this->assertSame(['exception', 'message', 'stack_trace', 'previous', 'previous_message', 'previous_stack_trace'], \array_keys($result->context()));
$this->assertInstanceOf(\Exception::class, $result->context()['exception']);
$this->assertSame('foo', $result->context()['message']);
$this->assertStringContainsString('Liip\Monitor\Tests\Check\CheckRunnerTest->Liip\Monitor\Tests\Check\{closure}()', $result->context()['stack_trace']);
$this->assertInstanceOf(\RuntimeException::class, $result->context()['previous']);
$this->assertSame('bar', $result->context()['previous_message']);
$this->assertStringContainsString('Liip\Monitor\Tests\Check\CheckRunnerTest::exception()', $result->context()['previous_stack_trace']);
Expand Down
6 changes: 3 additions & 3 deletions tests/Check/Php/ComposerAuditCheckTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function failed_check(): void
$result = $check->run();

$this->assertSame(Status::FAILURE, $result->status());
$this->assertSame('2 advisories', $result->summary());
$this->assertSame('symfony/security-http, symfony/twig-bridge', $result->detail());
$this->assertCount(2, $result->context()['advisories']);
$this->assertSame('4 advisories', $result->summary());
$this->assertSame('symfony/http-foundation, symfony/security-http, symfony/twig-bridge, twig/twig', $result->detail());
$this->assertCount(4, $result->context()['advisories']);
}
}
2 changes: 1 addition & 1 deletion tests/Fixture/Controller/OhDearController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Liip\Monitor\Controller\OhDearController as BaseOhDearController;
use Symfony\Component\HttpKernel\Attribute\AsController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;

/**
* @author Kevin Bond <kevinbond@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixture/TestService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public function __construct(
public readonly CheckSuite $barChecks,
public readonly CheckSuite $bazChecks,
public readonly System $system,
public readonly LinuxSystem $linuxSystem,
public readonly PhpInfo $phpInfo,
public readonly ApcuCacheInfo $apcuCacheInfo,
public readonly OpCacheInfo $opCacheInfo,
public readonly PhpVersionInfo $phpVersionInfo,
public readonly SymfonyVersionInfo $symfonyVersionInfo,
public readonly ?LinuxSystem $linuxSystem = null,
) {
}
}
2 changes: 0 additions & 2 deletions tests/LiipMonitorBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public function services_are_autowired(): void
$this->assertCount(3, $service->fooChecks);
$this->assertCount(1, $service->barChecks);
$this->assertCount(2, $service->bazChecks);

$this->assertSame($service->system, $service->linuxSystem);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/SystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function memory(): void
*/
public function stringable(): void
{
$this->assertSame('Linux', (string) $this->create());
$this->assertSame(\PHP_OS, (string) $this->create());
}

/**
Expand Down
Loading