Skip to content

Commit fe22805

Browse files
authored
Merge pull request #38 from Toflar/v3.0.0
Version 3.0.0
2 parents b6ef198 + c4cdfa2 commit fe22805

11 files changed

+210
-213
lines changed

.github/workflows/ci.yaml

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- '*'
10+
schedule:
11+
- cron: 0 13 * * MON
12+
13+
jobs:
14+
cs:
15+
name: Coding Style
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: 7.4
22+
coverage: none
23+
tools: php-cs-fixer
24+
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
28+
- name: Run the CS fixer
29+
run: php-cs-fixer fix
30+
31+
tests:
32+
name: PHP ${{ matrix.php }}
33+
runs-on: ubuntu-latest
34+
if: github.event_name != 'push'
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
php: [7.2, 7.3, 7.4, 8.0]
39+
steps:
40+
- name: Setup PHP
41+
uses: shivammathur/setup-php@v2
42+
with:
43+
php-version: ${{ matrix.php }}
44+
extensions: json
45+
tools: prestissimo
46+
coverage: none
47+
48+
- name: Checkout
49+
uses: actions/checkout@v2
50+
51+
- name: Install the dependencies
52+
run: composer install --no-interaction --no-suggest
53+
54+
- name: Run the unit tests
55+
run: vendor/bin/simple-phpunit
56+
57+
prefer-lowest-tests:
58+
name: Prefer Lowest
59+
runs-on: ubuntu-latest
60+
if: github.event_name != 'push'
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
php: [7.2, 7.3, 7.4, 8.0]
65+
steps:
66+
- name: Setup PHP
67+
uses: shivammathur/setup-php@v2
68+
with:
69+
php-version: ${{ matrix.php }}
70+
extensions: json
71+
tools: prestissimo
72+
coverage: none
73+
74+
- name: Checkout
75+
uses: actions/checkout@v2
76+
77+
- name: Install the dependencies
78+
run: composer update --prefer-lowest --prefer-stable --no-interaction --no-suggest
79+
80+
- name: Run the unit tests
81+
run: vendor/bin/simple-phpunit

.php_cs .php_cs.dist

+6-1
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ return PhpCsFixer\Config::create()
3636
'strict_comparison' => true,
3737
'strict_param' => true,
3838
'native_function_invocation' => ['include' => ['@compiler_optimized']],
39+
'declare_strict_types' => true,
40+
'no_superfluous_phpdoc_tags' => true,
41+
'phpdoc_to_return_type' => true,
42+
'void_return' => true,
3943
)
4044
)
4145
->setFinder(
42-
PhpCsFixer\Finder::create()->in([__DIR__ . '/src', __DIR__ . '/tests'])
46+
PhpCsFixer\Finder::create()
47+
->in([__DIR__ . '/src', __DIR__ . '/tests'])
4348
)
4449
;

.travis.yml

-37
This file was deleted.

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# PSR-6 compatible Symfony HttpCache Store
22

3-
[![](https://img.shields.io/travis/Toflar/psr6-symfony-http-cache-store/master.svg?style=flat-square)](https://travis-ci.org/Toflar/psr6-symfony-http-cache-store/)
4-
[![](https://img.shields.io/coveralls/Toflar/psr6-symfony-http-cache-store/master.svg?style=flat-square)](https://coveralls.io/github/Toflar/psr6-symfony-http-cache-store)
5-
63
## Introduction
74

85
Symfony's `HttpCache` store implementation is rather old and was developed

bin/phpunit

-13
This file was deleted.

composer.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^5.6|^7.1",
14-
"symfony/lock": "^3.4|^4.0|^5.0",
15-
"symfony/cache": "^3.4|^4.0|^5.0",
16-
"symfony/http-foundation": "^3.0|^4.0|^5.0",
17-
"symfony/http-kernel": "^3.0|^4.0|^5.0",
18-
"symfony/options-resolver": "^3.0|^4.0|^5.0"
13+
"php": "^7.2 | ^8.0",
14+
"symfony/lock": "^4.4 | ^5.0",
15+
"symfony/cache": "^4.4 | ^5.0",
16+
"symfony/http-foundation": "^4.4 | ^5.0",
17+
"symfony/http-kernel": "^4.4 | ^5.0",
18+
"symfony/options-resolver": "^4.4 | ^5.0"
1919
},
2020
"require-dev": {
21-
"friendsofphp/php-cs-fixer": "^2.16.1",
22-
"symfony/phpunit-bridge": "^4.3.5",
23-
"php-coveralls/php-coveralls": "^2.1"
21+
"symfony/phpunit-bridge": "^5.0"
2422
},
2523
"autoload": {
2624
"psr-4": {

phpunit.xml.dist

+14-24
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<phpunit backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
bootstrap="vendor/autoload.php"
12-
>
13-
<php>
14-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
15-
</php>
16-
<testsuites>
17-
<testsuite name="PSR-6 HttpCache Store Test Suite">
18-
<directory>./tests/</directory>
19-
</testsuite>
20-
</testsuites>
21-
<filter>
22-
<whitelist processUncoveredFilesFromWhitelist="true">
23-
<directory>./src/</directory>
24-
</whitelist>
25-
</filter>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory>./src/</directory>
6+
</include>
7+
</coverage>
8+
<php>
9+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
10+
</php>
11+
<testsuites>
12+
<testsuite name="PSR-6 HttpCache Store Test Suite">
13+
<directory>./tests/</directory>
14+
</testsuite>
15+
</testsuites>
2616
</phpunit>

src/ClearableInterface.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/*
46
* This file is part of the toflar/psr6-symfony-http-cache-store package.
57
*
@@ -19,5 +21,5 @@ interface ClearableInterface
1921
/**
2022
* Clears the whole store.
2123
*/
22-
public function clear();
24+
public function clear(): void;
2325
}

0 commit comments

Comments
 (0)