Skip to content

Commit 6458394

Browse files
committed
Fix CI
1 parent 53dcab2 commit 6458394

File tree

6 files changed

+22
-2
lines changed

6 files changed

+22
-2
lines changed

.github/workflows/php.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- php-version: '7.4'
2222
- php-version: '8.0'
2323
- php-version: '8.1'
24+
dependencies: 'jean-beru/fos-http-cache-cloudfront'
2425
- php-version: '7.4'
2526
symfony-version: '4.*'
2627
- php-version: '7.4'

.phpunit.result.cache

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

Resources/doc/spelling_word_list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ autoconfigured
66
backend
77
cacheable
88
cloudflare
9+
cloudfront
910
ETag
1011
friendsofsymfony
1112
github

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
"symfony/monolog-bundle": "^3.0",
5151
"symfony/routing": "^4.4 || ^5.0 || ^6.0",
5252
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
53-
"sebastian/exporter": "^2.0",
54-
"jean-beru/fos-http-cache-cloudfront": "^1.0"
53+
"sebastian/exporter": "^2.0"
5554
},
5655
"suggest": {
5756
"jean-beru/fos-http-cache-cloudfront": "To use CloudFront proxy",

tests/Unit/DependencyInjection/ConfigurationTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use FOS\HttpCacheBundle\DependencyInjection\Configuration;
1515
use FOS\HttpCacheBundle\DependencyInjection\FOSHttpCacheExtension;
16+
use JeanBeru\HttpCacheCloudFront\Proxy\CloudFront;
1617
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionConfigurationTestCase;
1718
use Symfony\Component\Config\Definition\ConfigurationInterface;
1819
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
@@ -329,6 +330,10 @@ public function testSupportsCloudflare()
329330

330331
public function testSupportsCloudfront()
331332
{
333+
if (!class_exists(CloudFront::class)) {
334+
$this->markTestSkipped('jean-beru/fos-http-cache-cloudfront not available');
335+
}
336+
332337
$expectedConfiguration = $this->getEmptyConfig();
333338
$expectedConfiguration['proxy_client'] = [
334339
'cloudfront' => [
@@ -357,6 +362,10 @@ public function testSupportsCloudfront()
357362

358363
public function testCloudfrontConfigurationWithClientIsNotAllowed()
359364
{
365+
if (!class_exists(CloudFront::class)) {
366+
$this->markTestSkipped('jean-beru/fos-http-cache-cloudfront not available');
367+
}
368+
360369
$this->expectException(InvalidConfigurationException::class);
361370
$this->expectExceptionMessage('You can not set both cloudfront.client and cloudfront.configuration');
362371

tests/Unit/DependencyInjection/FOSHttpCacheExtensionTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use FOS\HttpCache\SymfonyCache\KernelDispatcher;
1515
use FOS\HttpCacheBundle\DependencyInjection\FOSHttpCacheExtension;
16+
use JeanBeru\HttpCacheCloudFront\Proxy\CloudFront;
1617
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
1718
use PHPUnit\Framework\TestCase;
1819
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
@@ -168,6 +169,10 @@ public function testConfigLoadCloudflare()
168169

169170
public function testConfigLoadCloudfront()
170171
{
172+
if (!class_exists(CloudFront::class)) {
173+
$this->markTestSkipped('jean-beru/fos-http-cache-cloudfront not available');
174+
}
175+
171176
$container = $this->createContainer();
172177
$this->extension->load([
173178
[
@@ -190,6 +195,10 @@ public function testConfigLoadCloudfront()
190195

191196
public function testConfigLoadCloudfrontWithClient()
192197
{
198+
if (!class_exists(CloudFront::class)) {
199+
$this->markTestSkipped('jean-beru/fos-http-cache-cloudfront not available');
200+
}
201+
193202
$container = $this->createContainer();
194203
$this->extension->load([
195204
[

0 commit comments

Comments
 (0)