-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize code and test setup, prepare for Symfony 5.x and PHP 8.x (#4)
- Loading branch information
Showing
15 changed files
with
231 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Dependencies | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
PHP_VERSION: 7.4 | ||
|
||
jobs: | ||
composer-require-checker: | ||
name: Check missing composer requirements | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.PHP_VERSION }} | ||
tools: composer:v2 | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: composer-${{ runner.os }}-${{ env.PHP_VERSION }}-${{ hashFiles('composer.json') }} | ||
restore-keys: | | ||
composer-${{ runner.os }}-${{ env.PHP_VERSION }}- | ||
composer-${{ runner.os }}- | ||
- run: | | ||
composer install --no-interaction --no-progress --ansi --no-scripts | ||
composer show | ||
- uses: docker://webfactory/composer-require-checker:3.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
cat <<< $(jq --arg version $VERSION '.require |= with_entries(if ((.key|test("^symfony/"))) then .value=$version else . end)' < composer.json) > composer.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
jobs: | ||
PHPUnit: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { php-version: 7.2, symfony-locked-version: none, dependency-version: prefer-lowest } | ||
- { php-version: 7.4, symfony-locked-version: none, dependency-version: prefer-lowest } | ||
- { php-version: 7.4, symfony-locked-version: none, dependency-version: prefer-stable } | ||
- { php-version: 8.1, symfony-locked-version: none, dependency-version: prefer-stable } | ||
name: PHPUnit (PHP ${{matrix.php-version}}, Symfony Version Lock ${{ matrix.symfony-locked-version }}, ${{ matrix.dependency-version }}) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer:v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.symfony-locked-version }}-${{ matrix.dependency-version }}-${{ hashFiles('composer.json') }} | ||
restore-keys: | | ||
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.symfony-locked-version }}-${{ matrix.dependency-version }}- | ||
- run: VERSION=${{ matrix.symfony-locked-version }} .github/workflows/lock-symfony-version.sh | ||
if: matrix.symfony-locked-version != 'none' | ||
- run: composer update --${{ matrix.dependency-version }} --no-interaction --no-scripts --no-progress --ansi | ||
- run: composer show | ||
- run: vendor/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
vendor/ | ||
.php_cs.cache | ||
.phpunit.result.cache | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,49 @@ | ||
{ | ||
"name": "webfactory/http-cache-bundle", | ||
"description": "Symfony bundle to ease HTTP cache validation via last modified header", | ||
"keywords": [ | ||
"caching", | ||
"http", | ||
"304", | ||
"notmodified", | ||
"ifnotmodifiedsince" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "webfactory GmbH", | ||
"email": "[email protected]", | ||
"homepage": "http://www.webfactory.de", | ||
"role": "Developer" | ||
} | ||
], | ||
"name": "webfactory/http-cache-bundle", | ||
"description": "Symfony bundle to ease HTTP cache validation via last modified header", | ||
"keywords": [ | ||
"caching", | ||
"http", | ||
"304", | ||
"notmodified", | ||
"ifnotmodifiedsince" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "webfactory GmbH", | ||
"email": "[email protected]", | ||
"homepage": "http://www.webfactory.de", | ||
"role": "Developer" | ||
} | ||
], | ||
|
||
"require": { | ||
"php": "^7.1", | ||
"symfony/config": "^2.8 || ^3.0 || ^4.0", | ||
"symfony/dependency-injection": "^2.8 || ^3.0 || ^4.0", | ||
"symfony/http-foundation": "^2.8 || ^3.0 || ^4.0", | ||
"symfony/http-kernel": "^2.8 || ^3.0 || ^4.0", | ||
"doctrine/annotations": "^1.0" | ||
}, | ||
"require": { | ||
"php": "^7.1|8.0.*|8.1.*", | ||
"symfony/config": "^4.4 | ^5.0", | ||
"symfony/dependency-injection": "^4.4 | ^5.0", | ||
"symfony/http-foundation": "^4.4 | ^5.0", | ||
"symfony/http-kernel": "^4.4 | ^5.0", | ||
"doctrine/annotations": "^1.0" | ||
}, | ||
|
||
"require-dev": { | ||
"phpunit/phpunit": "^4.8.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^8.5|^9.0", | ||
"symfony/phpunit-bridge": ">=5.0" | ||
}, | ||
|
||
"suggest": { | ||
"webfactory/wfdmeta-bundle": "Invalidate caches based on meta data tracked with wfDynamic" | ||
}, | ||
"suggest": { | ||
"webfactory/wfdmeta-bundle": "Invalidate caches based on meta data tracked with wfDynamic" | ||
}, | ||
|
||
"autoload": { | ||
"psr-4": { | ||
"Webfactory\\HttpCacheBundle\\": "" | ||
"autoload": { | ||
"psr-4": { | ||
"Webfactory\\HttpCacheBundle\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Webfactory\\HttpCacheBundle\\Tests\\": "tests" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.