Skip to content

Commit f867137

Browse files
authored
Merge pull request #86 from Chris53897/next/5.x/main-support-rollbar-v4
feat: initial test for rollbar/rollbar v4
2 parents d8579d0 + c206a0c commit f867137

File tree

8 files changed

+26
-63
lines changed

8 files changed

+26
-63
lines changed

.github/workflows/code_checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
4242

4343
- name: Execute tests
44-
run: vendor/bin/phpunit --verbose
44+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/var/
55
!/var/.gitkeep
66
.phpunit.result.cache
7+
.phpunit.cache
78

89
composer.lock
910
clover.xml

Tests/DependencyInjection/RollbarExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testConfigVars(string $var, array $expected, array $loadParamete
3737
/**
3838
* Data provider generatorConfigVars.
3939
*/
40-
public function generatorConfigVars(): array
40+
public static function generatorConfigVars(): array
4141
{
4242
return [
4343
['rollbar.config', ['enabled' => true]],

Tests/Fixtures/App/config/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parameters:
55

66
framework:
77
test: true
8-
secret: "%secret%"
8+
secret: "%secret%"
99
router:
1010
resource: "%kernel.project_dir%/config/routing.yml"
1111
strict_requirements: ~

Tests/Fixtures/ErrorHandler.php

Lines changed: 0 additions & 42 deletions
This file was deleted.

Tests/Payload/ErrorItemTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testInvoke(int $code, string $message, string $file, int $line,
3636
*
3737
* @throws \Exception
3838
*/
39-
public function generateInvoke(): array
39+
public static function generateInvoke(): array
4040
{
4141
return [
4242
[E_ERROR, 'Error message - ' . microtime(true), __FILE__, random_int(1, 100), 'E_ERROR'],

composer.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,24 @@
2121
},
2222
"autoload-dev": {
2323
"files": [
24-
"Tests/Fixtures/App/AppKernel.php",
25-
"Tests/Fixtures/ErrorHandler.php"
24+
"Tests/Fixtures/App/AppKernel.php"
2625
],
2726
"psr-4": { "Tests\\": "Tests/"}
2827
},
2928
"require": {
3029
"php": ">=8.0.2",
31-
"rollbar/rollbar": "^3.1",
32-
"symfony/dependency-injection": "^5.4|^6.0",
33-
"symfony/config": "^5.4|^6.0",
34-
"symfony/http-kernel": "^5.4|^6.0",
35-
"symfony/monolog-bundle": "^3.0",
36-
"symfony/serializer": "^5.4|^6.0",
30+
"rollbar/rollbar": "^3.1|^4.0",
31+
"symfony/dependency-injection": "^5.4|^6.2",
32+
"symfony/config": "^5.4|^6.2",
33+
"symfony/http-kernel": "^5.4|^6.2",
34+
"symfony/monolog-bundle": "^3.8",
35+
"symfony/serializer": "^5.4|^6.2",
3736
"ext-json": "*"
3837
},
3938
"require-dev": {
40-
"phpunit/phpunit": "^9.5",
41-
"symfony/framework-bundle": "^5.4|^6.0",
42-
"squizlabs/php_codesniffer": "^3.6",
39+
"phpunit/phpunit": "^9.6|^10.1",
40+
"symfony/framework-bundle": "^5.4|^6.2",
41+
"squizlabs/php_codesniffer": "^3.7",
4342
"matthiasnoback/symfony-dependency-injection-test": "^4.3"
4443
},
4544
"scripts": {

phpunit.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
3-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" convertErrorsToExceptions="false" bootstrap="vendor/autoload.php">
4-
<coverage>
5-
<include>
6-
<directory>./</directory>
7-
</include>
8-
</coverage>
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5+
colors="true"
6+
bootstrap="vendor/autoload.php"
7+
cacheDirectory=".phpunit.cache">
8+
<coverage/>
99
<php>
1010
<ini name="error_reporting" value="-1"/>
1111
<server name="APP_ENV" value="test" force="true"/>
@@ -20,4 +20,9 @@
2020
<directory>Tests/</directory>
2121
</testsuite>
2222
</testsuites>
23+
<source>
24+
<include>
25+
<directory>./</directory>
26+
</include>
27+
</source>
2328
</phpunit>

0 commit comments

Comments
 (0)