-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a warning when serializing metadata (#9)
This addresses warnings like... ``` Failed to save key "{key}" of type Webfactory\Bundle\PolyglotBundle\Doctrine\TranslatableClassMetadata: Cache key "..." has non-serializable Webfactory\Bundle\PolyglotBundle\Doctrine\TranslatableClassMetadata value. ``` ... that occur when the Cache Driver used (in Doctrine) is the file-based implementation from symfony/cache.
- Loading branch information
Showing
32 changed files
with
346 additions
and
281 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
name: Dependencies | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
PHP_VERSION: 7.2 | ||
|
||
jobs: | ||
composer-require-checker: | ||
name: Check missing composer requirements | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Konfiguriere PHP-Version und -Einstellungen im Worker-Node | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.PHP_VERSION }} | ||
tools: composer:v2 | ||
ini-values: variables_order=EGPCS | ||
- name: Cache Composer Dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: vendor/ | ||
key: composer-${{ env.PHP_VERSION }}-${{ hashFiles('composer.*') }} | ||
restore-keys: | | ||
composer-${{ env.PHP_VERSION }}-${{ github.ref }} | ||
composer-${{ env.PHP_VERSION }}- | ||
- run: | | ||
composer install --no-interaction --no-scripts --no-progress --no-suggest | ||
composer show | ||
- name: ComposerRequireChecker | ||
uses: docker://webfactory/composer-require-checker:2.1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Update this by running | ||
# curl https://gist.githubusercontent.com/mpdude/ca93a185bcbf56eb7e341632ad4f8263/raw/fix-cs-php.yml > .github/workflows/fix-cs-php.yml | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
name: Coding Standards | ||
|
||
jobs: | ||
open-pr-for-cs-violations: | ||
name: PHP-CS-Fixer | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Run PHP-CS-Fixer | ||
uses: docker://oskarstark/php-cs-fixer-ga:2.16.7 | ||
|
||
- name: Create PR for CS fixups | ||
uses: peter-evans/create-pull-request@c7f493a8000b8aeb17a1332e326ba76b57cb83eb | ||
id: create-pull-request | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
title: Fix coding standards in ${{ github.ref }} | ||
branch: php-cs-fixer/${{ github.ref }} | ||
assignees: ${{ github.actor }} | ||
labels: php-cs-fixer | ||
body: Please merge these changes into the ${{ github.ref }} branch to fix coding standard violations. | ||
commit-message: Apply php-cs-fixer changes as of ${{ github.sha }} | ||
|
||
- name: Leave a notice in the discussion when fixing code in a Pull Request | ||
uses: docker://mpdude/comment-on-pr:v1.2.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: steps.create-pull-request.outputs.pr_number # only if PR was created in the previous step | ||
continue-on-error: true # continue on failure - necessary when the current branch does not have a pending PR | ||
with: | ||
msg: | | ||
@${{ github.actor }} please apply the coding standard fixes from #${{ steps.create-pull-request.outputs.pr_number }} | ||
- name: Fail the workflow when necessary CS fixes were detected | ||
run: echo "Failing workflow run because CS violations were detected." && exit 1 | ||
if: steps.create-pull-request.outputs.pr_number |
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: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
env: | ||
PHP_VERSION: 7.2 | ||
|
||
jobs: | ||
PHPUnit: | ||
name: PHPUnit | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Konfiguriere PHP-Version und -Einstellungen im Worker-Node | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ env.PHP_VERSION }} | ||
tools: composer:v2 | ||
ini-values: variables_order=EGPCS | ||
- name: Cache Composer Dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: vendor/ | ||
key: composer-${{ env.PHP_VERSION }}-${{ hashFiles('composer.*') }} | ||
restore-keys: | | ||
composer-${{ env.PHP_VERSION }}-${{ github.ref }} | ||
composer-${{ env.PHP_VERSION }}- | ||
- run: | | ||
composer install --no-interaction --no-scripts --no-progress --no-suggest | ||
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,3 +1,4 @@ | ||
vendor/ | ||
.idea/ | ||
composer.lock | ||
phpunit.xml$ | ||
.php_cs.cache |
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,19 @@ | ||
<?php | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'array_syntax' => array('syntax' => 'short'), | ||
'no_unreachable_default_argument_value' => false, | ||
'braces' => array('allow_single_line_closure' => true), | ||
'heredoc_to_nowdoc' => false, | ||
'phpdoc_annotation_without_dot' => false, | ||
]) | ||
->setRiskyAllowed(true) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->notPath('vendor/') | ||
) | ||
; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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.