Skip to content

Commit ce96803

Browse files
Yoann-TYTdbu
authored andcommitted
Build with PHP 8 and move from travis-ci to github workflow
1 parent 5df759a commit ce96803

File tree

8 files changed

+89
-89
lines changed

8 files changed

+89
-89
lines changed

.github/workflows/php.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
env:
4+
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit"
5+
6+
on:
7+
push:
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
include:
16+
- php-version: '7.3'
17+
- php-version: '7.4'
18+
- php-version: '8.0'
19+
- php-version: '7.3'
20+
symfony-version: '^4'
21+
- php-version: '7.3'
22+
symfony-version: '^5'
23+
- php-version: '7.4'
24+
symfony-version: '^5'
25+
- php-version: '8.0'
26+
symfony-version: '^5'
27+
- php-version: '7.3'
28+
composer-flag: '--prefer-stable --prefer-lowest'
29+
- php-version: '8.0'
30+
symfony-version: '^5'
31+
stability: 'dev'
32+
name: PHP ${{ matrix.php-version }} Test on Symfony ${{ matrix.symfony-version }} ${{ matrix.stability }} ${{ matrix.composer-flag }}
33+
steps:
34+
- name: Pull the code
35+
uses: actions/checkout@v2
36+
- name: Install PHP and Composer
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: ${{ matrix.php-version }}
40+
tools: composer:v2
41+
- name: Check PHP Version
42+
run: php -v
43+
- name: Stability
44+
run: composer config minimum-stability ${{ matrix.stability }}
45+
if: ${{ matrix.stability }}
46+
- name: Symfony version
47+
run: composer require --no-update symfony/flex && composer config extra.symfony.require ${{ matrix.symfony-version}}
48+
if: ${{ matrix.symfony-version }}
49+
- name: Composer update
50+
run: composer update ${{ matrix.composer-flag }} --prefer-dist --no-interaction
51+
- name: Composer validate
52+
run: composer validate --strict --no-check-lock
53+
- name: Run tests
54+
run: php vendor/bin/simple-phpunit -v

.travis.yml

-85
This file was deleted.

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
=========
33

4+
2.10.0
5+
------
6+
7+
### Changed
8+
9+
* Adjusted to work with PHP 8
10+
* Dropped support for PHP 7.2
11+
412
2.9.1
513
-----
614

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FOSHttpCacheBundle
22
==================
3-
[![Build Status](https://travis-ci.org/FriendsOfSymfony/FOSHttpCacheBundle.svg?branch=master)](https://travis-ci.org/FriendsOfSymfony/FOSHttpCacheBundle)
3+
[![Build Status](https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/workflows/CI/badge.svg)](https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/actions)
44
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSHttpCacheBundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSHttpCacheBundle/?branch=master)
55
[![Code Coverage](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSHttpCacheBundle/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSHttpCacheBundle/?branch=master)
66
[![Latest Stable Version](https://poser.pugx.org/friendsofsymfony/http-cache-bundle/v/stable.svg)](https://packagist.org/packages/friendsofsymfony/http-cache-bundle)

composer.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,29 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^7.2",
24+
"php": "^7.3 || ^8.0",
2525
"friendsofsymfony/http-cache": "^2.6",
2626
"symfony/framework-bundle": "^3.4.26 || ^4.2.7 || ^5.0",
2727
"symfony/http-foundation": "^3.4.26 || ^4.2.7 || ^5.0",
2828
"symfony/http-kernel": "^3.4.26 || ^4.2.7 || ^5.0"
2929
},
3030
"require-dev": {
31-
"php-http/guzzle6-adapter": "^1.0 || ^2.0",
31+
"php-http/guzzle7-adapter": "^0.1.1",
3232
"php-http/message": "^1.0 || ^2.0",
33+
"php-http/httplug": "^2.2.0",
34+
"php-http/discovery": "^1.13",
35+
"guzzlehttp/guzzle": "^7.2",
3336
"mockery/mockery": "^1.3.2",
3437
"monolog/monolog": "*",
35-
"sensio/framework-extra-bundle": "^3.0 || ^4.0 || ^5.0",
38+
"sensio/framework-extra-bundle": "^3.0 || ^4.0 || ^5.5.1",
39+
"doctrine/annotations": "^1.11",
3640
"symfony/browser-kit": "^3.4.4 || ^4.2.7 || ^5.0",
3741
"symfony/console": "^3.4.26 || ^4.2.7 || ^5.0",
3842
"symfony/finder": "^3.4.26 || ^4.2.7 || ^5.0",
3943
"symfony/phpunit-bridge": "^4.4.11 || ^5.1.3",
4044
"symfony/security-bundle": "^3.4.26 || ^4.2.7 || ^5.0",
4145
"symfony/twig-bundle": "^3.4.26 || ^4.2.7 || ^5.0",
46+
"twig/twig": "^2.13",
4247
"symfony/yaml": "^3.4.26 || ^4.2.7 || ^5.0",
4348
"symfony/css-selector": "^3.4.26 || ^4.2.7 || ^5.0",
4449
"symfony/expression-language": "^3.4.26 || ^4.2.7 || ^5.0",

tests/Functional/Command/ClearCommandTest.php

+9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
class ClearCommandTest extends CommandTestCase
1818
{
19+
/**
20+
* @runInSeparateProcess
21+
*/
1922
public function testExecuteClearVerbose()
2023
{
2124
$client = self::createClient();
@@ -39,6 +42,9 @@ public function testExecuteClearVerbose()
3942
$this->assertEquals("Sent 1 invalidation request(s)\n", $output);
4043
}
4144

45+
/**
46+
* @runInSeparateProcess
47+
*/
4248
public function testExecuteBanVerbose()
4349
{
4450
$client = self::createClient();
@@ -66,6 +72,9 @@ public function testExecuteBanVerbose()
6672
$this->assertEquals("Sent 1 invalidation request(s)\n", $output);
6773
}
6874

75+
/**
76+
* @runInSeparateProcess
77+
*/
6978
public function testExecuteErrorVerbose()
7079
{
7180
$client = self::createClient();

tests/Functional/DependencyInjection/ServiceTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ protected function bootDebugKernel()
4242
return static::$kernel;
4343
}
4444

45+
/**
46+
* @runInSeparateProcess
47+
*/
4548
public function testCanBeLoaded()
4649
{
4750
/** @var Container $container */

tests/Functional/EventListener/CacheControlListenerTest.php

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class CacheControlListenerTest extends WebTestCase
1818
{
1919
use MockeryPHPUnitIntegration;
2020

21+
/**
22+
* @runInSeparateProcess
23+
*/
2124
public function testIsCached()
2225
{
2326
$client = static::createClient();
@@ -27,6 +30,9 @@ public function testIsCached()
2730
$this->assertEquals('public', $response->headers->get('Cache-Control'));
2831
}
2932

33+
/**
34+
* @runInSeparateProcess
35+
*/
3036
public function testNotCached()
3137
{
3238
$client = static::createClient();

0 commit comments

Comments
 (0)