Skip to content

Commit b3ba6ad

Browse files
author
Sergiy Petrov
authored
Ensure support for PHP 8.0 (#109)
1 parent d5b468f commit b3ba6ad

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
php: ['7.4']
13+
php: ['7.4', '8.0']
1414
laravel: ['6.0', '7.0', '8.0']
1515
include:
1616
- laravel: '8.0'

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"require-dev": {
2020
"orchestra/testbench": "^4.0|^5.0|^6.0",
21-
"roave/better-reflection": "^3.6|^4.6",
21+
"roave/better-reflection": "^3.6|^4.6|5.0.x-dev",
2222
"friendsofphp/php-cs-fixer": "^2.16"
2323
},
2424
"autoload": {

phpunit.xml.dist

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5-
beStrictAboutOutputDuringTests="true"
6-
ignoreDeprecatedCodeUnitsFromCodeCoverage="true"
7-
colors="true">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" beStrictAboutOutputDuringTests="true" colors="true">
3+
<coverage ignoreDeprecatedCodeUnits="true" processUncoveredFiles="true">
4+
<include>
5+
<directory suffix=".php">src</directory>
6+
</include>
7+
<exclude>
8+
<directory>src/Facades</directory>
9+
</exclude>
10+
</coverage>
811
<testsuites>
912
<testsuite name="Test Suite">
1013
<directory>tests</directory>
1114
</testsuite>
1215
</testsuites>
13-
14-
<filter>
15-
<whitelist processUncoveredFilesFromWhitelist="true">
16-
<directory suffix=".php">src</directory>
17-
<exclude>
18-
<directory>src/Facades</directory>
19-
</exclude>
20-
</whitelist>
21-
</filter>
22-
2316
<php>
24-
<ini name="date.timezone" value="UTC" />
17+
<ini name="date.timezone" value="UTC"/>
2518
<server name="APP_ENV" value="testing"/>
2619
<server name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
2720
</php>

tests/FirebaseProjectManagerTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,18 @@ public function it_uses_the_laravel_cache(): void
337337
*/
338338
public function enabling_debug_with_a_boolean_triggers_a_deprecation(): void
339339
{
340+
341+
if (version_compare($this->app->version(), '8.65.0', '>=')) {
342+
self::markTestSkipped('');
343+
}
344+
340345
$this->expectException(\Throwable::class);
341346
$this->expectExceptionMessageMatches('/deprecated/');
342347

343348
$projectName = $this->app->config->get('firebase.default');
344349

345350
$this->app->config->set('firebase.projects.'.$projectName.'.debug', true);
346351

347-
$factory = $this->factoryForProject($projectName);
352+
$this->factoryForProject($projectName);
348353
}
349354
}

0 commit comments

Comments
 (0)