Skip to content

Commit

Permalink
Build with PHP 8 and move from travis-ci to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoann-TYT authored and dbu committed Dec 16, 2020
1 parent 5df759a commit ce96803
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 89 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

env:
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit"

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php-version: '7.3'
- php-version: '7.4'
- php-version: '8.0'
- php-version: '7.3'
symfony-version: '^4'
- php-version: '7.3'
symfony-version: '^5'
- php-version: '7.4'
symfony-version: '^5'
- php-version: '8.0'
symfony-version: '^5'
- php-version: '7.3'
composer-flag: '--prefer-stable --prefer-lowest'
- php-version: '8.0'
symfony-version: '^5'
stability: 'dev'
name: PHP ${{ matrix.php-version }} Test on Symfony ${{ matrix.symfony-version }} ${{ matrix.stability }} ${{ matrix.composer-flag }}
steps:
- name: Pull the code
uses: actions/checkout@v2
- name: Install PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
- name: Check PHP Version
run: php -v
- name: Stability
run: composer config minimum-stability ${{ matrix.stability }}
if: ${{ matrix.stability }}
- name: Symfony version
run: composer require --no-update symfony/flex && composer config extra.symfony.require ${{ matrix.symfony-version}}
if: ${{ matrix.symfony-version }}
- name: Composer update
run: composer update ${{ matrix.composer-flag }} --prefer-dist --no-interaction
- name: Composer validate
run: composer validate --strict --no-check-lock
- name: Run tests
run: php vendor/bin/simple-phpunit -v
85 changes: 0 additions & 85 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

2.10.0
------

### Changed

* Adjusted to work with PHP 8
* Dropped support for PHP 7.2

2.9.1
-----

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FOSHttpCacheBundle
==================
[![Build Status](https://travis-ci.org/FriendsOfSymfony/FOSHttpCacheBundle.svg?branch=master)](https://travis-ci.org/FriendsOfSymfony/FOSHttpCacheBundle)
[![Build Status](https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/workflows/CI/badge.svg)](https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/actions)
[![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)
[![Code Coverage](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSHttpCacheBundle/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSHttpCacheBundle/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/friendsofsymfony/http-cache-bundle/v/stable.svg)](https://packagist.org/packages/friendsofsymfony/http-cache-bundle)
Expand Down
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,29 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.3 || ^8.0",
"friendsofsymfony/http-cache": "^2.6",
"symfony/framework-bundle": "^3.4.26 || ^4.2.7 || ^5.0",
"symfony/http-foundation": "^3.4.26 || ^4.2.7 || ^5.0",
"symfony/http-kernel": "^3.4.26 || ^4.2.7 || ^5.0"
},
"require-dev": {
"php-http/guzzle6-adapter": "^1.0 || ^2.0",
"php-http/guzzle7-adapter": "^0.1.1",
"php-http/message": "^1.0 || ^2.0",
"php-http/httplug": "^2.2.0",
"php-http/discovery": "^1.13",
"guzzlehttp/guzzle": "^7.2",
"mockery/mockery": "^1.3.2",
"monolog/monolog": "*",
"sensio/framework-extra-bundle": "^3.0 || ^4.0 || ^5.0",
"sensio/framework-extra-bundle": "^3.0 || ^4.0 || ^5.5.1",
"doctrine/annotations": "^1.11",
"symfony/browser-kit": "^3.4.4 || ^4.2.7 || ^5.0",
"symfony/console": "^3.4.26 || ^4.2.7 || ^5.0",
"symfony/finder": "^3.4.26 || ^4.2.7 || ^5.0",
"symfony/phpunit-bridge": "^4.4.11 || ^5.1.3",
"symfony/security-bundle": "^3.4.26 || ^4.2.7 || ^5.0",
"symfony/twig-bundle": "^3.4.26 || ^4.2.7 || ^5.0",
"twig/twig": "^2.13",
"symfony/yaml": "^3.4.26 || ^4.2.7 || ^5.0",
"symfony/css-selector": "^3.4.26 || ^4.2.7 || ^5.0",
"symfony/expression-language": "^3.4.26 || ^4.2.7 || ^5.0",
Expand Down
9 changes: 9 additions & 0 deletions tests/Functional/Command/ClearCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

class ClearCommandTest extends CommandTestCase
{
/**
* @runInSeparateProcess
*/
public function testExecuteClearVerbose()
{
$client = self::createClient();
Expand All @@ -39,6 +42,9 @@ public function testExecuteClearVerbose()
$this->assertEquals("Sent 1 invalidation request(s)\n", $output);
}

/**
* @runInSeparateProcess
*/
public function testExecuteBanVerbose()
{
$client = self::createClient();
Expand Down Expand Up @@ -66,6 +72,9 @@ public function testExecuteBanVerbose()
$this->assertEquals("Sent 1 invalidation request(s)\n", $output);
}

/**
* @runInSeparateProcess
*/
public function testExecuteErrorVerbose()
{
$client = self::createClient();
Expand Down
3 changes: 3 additions & 0 deletions tests/Functional/DependencyInjection/ServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ protected function bootDebugKernel()
return static::$kernel;
}

/**
* @runInSeparateProcess
*/
public function testCanBeLoaded()
{
/** @var Container $container */
Expand Down
6 changes: 6 additions & 0 deletions tests/Functional/EventListener/CacheControlListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class CacheControlListenerTest extends WebTestCase
{
use MockeryPHPUnitIntegration;

/**
* @runInSeparateProcess
*/
public function testIsCached()
{
$client = static::createClient();
Expand All @@ -27,6 +30,9 @@ public function testIsCached()
$this->assertEquals('public', $response->headers->get('Cache-Control'));
}

/**
* @runInSeparateProcess
*/
public function testNotCached()
{
$client = static::createClient();
Expand Down

0 comments on commit ce96803

Please sign in to comment.