Skip to content

Commit aa803db

Browse files
authored
Merge pull request #7 from Cybrary/merge-upstream
Merge upstream
2 parents bb2c6b8 + 78eb03c commit aa803db

File tree

9 files changed

+52
-81
lines changed

9 files changed

+52
-81
lines changed

.github/workflows/dependabot-auto-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- name: "Dependabot metadata"
1414
id: "metadata"
15-
uses: "dependabot/fetch-metadata@v2.2.0"
15+
uses: "dependabot/fetch-metadata@v2.3.0"
1616
with:
1717
github-token: "${{ secrets.GITHUB_TOKEN }}"
1818
- name: "Enable auto-merge for Dependabot PRs"

.github/workflows/tests.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,12 @@ jobs:
2626
strategy:
2727
matrix:
2828
php:
29-
- "8.1"
3029
- "8.2"
3130
- "8.3"
3231
- "8.4"
3332
laravel:
34-
- "9"
35-
- "10"
3633
- "11"
37-
exclude:
38-
- php: "8.1"
39-
laravel: "11"
34+
- "12"
4035

4136
steps:
4237
- name: Checkout code

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# CHANGELOG
22

3+
## Unreleased
4+
5+
## 6.0.0 - 2025-02-24
6+
7+
* Added support for Laravel 12
8+
* Dropped support for Laravel 9 and 10
9+
* Dropped support for PHP 8.1 (Laravel 11 requires at least PHP 8.2)
10+
311
## 5.10.0 - 2024-11-22
412

513
* Added support for PHP 8.4

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,14 @@ $anotherAppAuth = Firebase::project('another-app')->auth();
122122
Earlier versions will receive security fixes as long as their **lowest** SDK requirement receives security fixes. You
123123
can find the currently supported versions and support options in the [SDK's README](https://github.com/kreait/firebase-php).
124124

125-
| Version | Initial Release | Supported SDK Versions | Supported Laravel Versions | Status |
126-
|---------|-----------------|------------------------|----------------------------|-------------|
127-
| `5.x` | 13 Jan 2023 | `^7.0` | `^9.0`, `^10.0`, `^11.0` | Active |
128-
| `4.x` | 09 Jan 2022 | `^6.0` | `^8.0` | End of life |
129-
| `3.x` | 01 Nov 2020 | `^5.24` | `^6.0, ^7.0, ^8.0` | End of life |
130-
| `2.x` | 01 Apr 2020 | `^5.0` | `^5.8, ^6.0, ^7.0, ^8.0` | End of life |
131-
| `1.x` | 17 Aug 2019 | `^4.40.1` | `^5.8, ^6.0, ^7.0` | End of life |
125+
| Version | Initial Release | Supported SDK Versions | Supported Laravel Versions | Status |
126+
|---------|-----------------|------------------------|----------------------------|--------------|
127+
| `6.x` | 24 Feb 2025 | `^7.0` | `^11.0`, `^12.0` | Active |
128+
| `5.x` | 13 Jan 2023 | `^7.0` | `^9.0`, `^10.0`, `^11.0` | Paid support |
129+
| `4.x` | 09 Jan 2022 | `^6.0` | `^8.0` | End of life |
130+
| `3.x` | 01 Nov 2020 | `^5.24` | `^6.0, ^7.0, ^8.0` | End of life |
131+
| `2.x` | 01 Apr 2020 | `^5.0` | `^5.8, ^6.0, ^7.0, ^8.0` | End of life |
132+
| `1.x` | 17 Aug 2019 | `^4.40.1` | `^5.8, ^6.0, ^7.0` | End of life |
132133

133134
## License
134135

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@
1111
}
1212
],
1313
"require": {
14-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
14+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
1515
"kreait/firebase-php": "^7.13",
16-
"illuminate/contracts": "^9.0 || ^10.0 || ^11.0",
17-
"illuminate/support": "^9.0 || ^10.0 || ^11.0",
16+
"illuminate/contracts": "^11.0 || ^12.0",
17+
"illuminate/notifications": "^11.0 || ^12.0",
18+
"illuminate/support": "^11.0 || ^12.0",
1819
"symfony/cache": "^6.1.2 || ^7.0.3"
1920
},
2021
"require-dev": {
21-
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
22+
"orchestra/testbench": "^9.0 || ^10.0",
2223
"laravel/pint": "^1.14",
23-
"phpunit/phpunit": "^9.6.17 || ^10.5.13"
24+
"phpunit/phpunit": "^11.4.3"
2425
},
2526
"autoload": {
2627
"psr-4": {

phpunit.xml.dist

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
5-
beStrictAboutOutputDuringTests="true"
6-
colors="true"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
5+
beStrictAboutOutputDuringTests="true"
6+
colors="true"
77
>
88
<testsuites>
99
<testsuite name="Test Suite">
1010
<directory>tests</directory>
1111
</testsuite>
1212
</testsuites>
1313

14-
<coverage ignoreDeprecatedCodeUnits="true" processUncoveredFiles="true">
14+
<source>
1515
<include>
16-
<directory suffix=".php">src</directory>
16+
<directory>src</directory>
1717
</include>
1818
<exclude>
1919
<directory>src/Facades</directory>
2020
</exclude>
21-
</coverage>
21+
</source>
2222

2323
<php>
2424
<ini name="date.timezone" value="UTC"/>

src/FirebaseProjectManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected function resolveJsonCredentials(string $credentials): string
6060

6161
protected function configure(string $name): FirebaseProject
6262
{
63-
$factory = new Factory();
63+
$factory = new Factory;
6464

6565
$config = $this->configuration($name);
6666

tests/FirebaseProjectManagerTest.php

Lines changed: 17 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Kreait\Firebase\Exception\InvalidArgumentException;
1010
use Kreait\Firebase\Factory;
1111
use Kreait\Laravel\Firebase\FirebaseProjectManager;
12+
use PHPUnit\Framework\Attributes\Test;
1213
use Psr\Cache\CacheItemPoolInterface;
1314
use ReflectionObject;
1415

@@ -22,9 +23,7 @@ protected function defineEnvironment($app): void
2223
$app['config']->set('firebase.projects.app.credentials', __DIR__.'/_fixtures/service_account.json');
2324
}
2425

25-
/**
26-
* @test
27-
*/
26+
#[Test]
2827
public function a_project_configuration_has_to_exist(): void
2928
{
3029
$manager = $this->app->make(FirebaseProjectManager::class);
@@ -36,9 +35,7 @@ public function a_project_configuration_has_to_exist(): void
3635
$this->getAccessibleMethod($manager, 'configuration')->invoke($manager, $projectName);
3736
}
3837

39-
/**
40-
* @test
41-
*/
38+
#[Test]
4239
public function a_default_project_can_be_set(): void
4340
{
4441
$manager = $this->app->make(FirebaseProjectManager::class);
@@ -51,9 +48,7 @@ public function a_default_project_can_be_set(): void
5148
$this->assertSame($projectName, $this->app->config->get('firebase.default'), 'default project should be set in config');
5249
}
5350

54-
/**
55-
* @test
56-
*/
51+
#[Test]
5752
public function calls_are_passed_to_default_project(): void
5853
{
5954
$manager = $this->app->make(FirebaseProjectManager::class);
@@ -63,9 +58,7 @@ public function calls_are_passed_to_default_project(): void
6358
$this->assertSame($manager->project($projectName)->auth(), $manager->auth());
6459
}
6560

66-
/**
67-
* @test
68-
*/
61+
#[Test]
6962
public function credentials_can_be_configured_using_a_json_file(): void
7063
{
7164
// Reference credentials
@@ -84,9 +77,7 @@ public function credentials_can_be_configured_using_a_json_file(): void
8477
$this->assertSame($credentials, $serviceAccount);
8578
}
8679

87-
/**
88-
* @test
89-
*/
80+
#[Test]
9081
public function json_file_credentials_can_be_used_using_the_deprecated_configuration_entry(): void
9182
{
9283
// Reference credentials
@@ -105,9 +96,7 @@ public function json_file_credentials_can_be_used_using_the_deprecated_configura
10596
$this->assertSame($credentials, $serviceAccount);
10697
}
10798

108-
/**
109-
* @test
110-
*/
99+
#[Test]
111100
public function credentials_can_be_configured_using_an_array(): void
112101
{
113102
// Set configuration and retrieve project
@@ -133,9 +122,7 @@ public function credentials_can_be_configured_using_an_array(): void
133122
$this->assertSame($credentials, $serviceAccount);
134123
}
135124

136-
/**
137-
* @test
138-
*/
125+
#[Test]
139126
public function projects_can_have_different_credentials(): void
140127
{
141128
// Reference credentials
@@ -165,9 +152,7 @@ public function projects_can_have_different_credentials(): void
165152
$this->assertSame($secondCredentials, $secondServiceAccount);
166153
}
167154

168-
/**
169-
* @test
170-
*/
155+
#[Test]
171156
public function the_realtime_database_url_can_be_configured(): void
172157
{
173158
$projectName = $this->app->config->get('firebase.default');
@@ -181,9 +166,7 @@ public function the_realtime_database_url_can_be_configured(): void
181166
$this->assertSame($url, (string) $property->getValue($database));
182167
}
183168

184-
/**
185-
* @test
186-
*/
169+
#[Test]
187170
public function the_dynamic_links_default_domain_can_be_configured(): void
188171
{
189172
$projectName = $this->app->config->get('firebase.default');
@@ -198,9 +181,7 @@ public function the_dynamic_links_default_domain_can_be_configured(): void
198181
$this->assertSame($domain, $configuredDomain);
199182
}
200183

201-
/**
202-
* @test
203-
*/
184+
#[Test]
204185
public function the_storage_default_bucket_can_be_configured(): void
205186
{
206187
$projectName = $this->app->config->get('firebase.default');
@@ -213,9 +194,7 @@ public function the_storage_default_bucket_can_be_configured(): void
213194
$this->assertSame($name, $property->getValue($storage));
214195
}
215196

216-
/**
217-
* @test
218-
*/
197+
#[Test]
219198
public function logging_can_be_configured(): void
220199
{
221200
$projectName = $this->app->config->get('firebase.default');
@@ -228,9 +207,7 @@ public function logging_can_be_configured(): void
228207
$this->assertNotNull($property->getValue($factory));
229208
}
230209

231-
/**
232-
* @test
233-
*/
210+
#[Test]
234211
public function debug_logging_can_be_configured(): void
235212
{
236213
$projectName = $this->app->config->get('firebase.default');
@@ -243,9 +220,7 @@ public function debug_logging_can_be_configured(): void
243220
$this->assertNotNull($property->getValue($factory));
244221
}
245222

246-
/**
247-
* @test
248-
*/
223+
#[Test]
249224
public function http_client_options_can_be_configured(): void
250225
{
251226
$projectName = $this->app->config->get('firebase.default');
@@ -263,9 +238,7 @@ public function http_client_options_can_be_configured(): void
263238
$this->assertSame([RetryMiddleware::class], $httpClientOptions->guzzleMiddlewares());
264239
}
265240

266-
/**
267-
* @test
268-
*/
241+
#[Test]
269242
public function it_uses_the_laravel_cache_as_verifier_cache(): void
270243
{
271244
$projectName = $this->app->config->get('firebase.default');
@@ -276,9 +249,7 @@ public function it_uses_the_laravel_cache_as_verifier_cache(): void
276249
$this->assertInstanceOf(CacheItemPoolInterface::class, $property->getValue($factory));
277250
}
278251

279-
/**
280-
* @test
281-
*/
252+
#[Test]
282253
public function it_overrides_the_default_firestore_database(): void
283254
{
284255
config(['firebase.projects.app.firestore.database' => 'override-database']);
@@ -290,9 +261,7 @@ public function it_overrides_the_default_firestore_database(): void
290261
$this->assertEquals('override-database', $property->getValue($factory)['database']);
291262
}
292263

293-
/**
294-
* @test
295-
*/
264+
#[Test]
296265
public function it_uses_the_laravel_cache_as_auth_token_cache(): void
297266
{
298267
$projectName = $this->app->config->get('firebase.default');

tests/ServiceProviderTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
namespace Kreait\Laravel\Firebase\Tests;
66

77
use Kreait\Firebase;
8+
use PHPUnit\Framework\Attributes\Test;
89

910
/**
1011
* @internal
1112
*/
1213
final class ServiceProviderTest extends TestCase
1314
{
14-
/**
15-
* @test
16-
*/
15+
#[Test]
1716
public function it_provides_components(): void
1817
{
1918
$this->app->config->set('firebase.projects.app.credentials', \realpath(__DIR__.'/_fixtures/service_account.json'));
@@ -27,9 +26,7 @@ public function it_provides_components(): void
2726
$this->assertInstanceOf(Firebase\Contract\Storage::class, $this->app->make(Firebase\Contract\Storage::class));
2827
}
2928

30-
/**
31-
* @test
32-
*/
29+
#[Test]
3330
public function it_does_not_provide_optional_components(): void
3431
{
3532
$this->expectException(\Throwable::class);

0 commit comments

Comments
 (0)