Skip to content

Commit

Permalink
PhpCsFixer: Fix pull requests from forks (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
blankse committed May 3, 2024
1 parent 0f3229d commit fd238c8
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 18 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/codeception.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,10 @@ jobs:
ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767
php-version: "${{ matrix.php-version }}"

- name: "Add authentication for private pimcore packages"
run: |
composer config --global --auth http-basic.enterprise.repo.pimcore.com token ${{ secrets.COMPOSER_PIMCORE_REPO_TOKEN }}
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run Codeception"
run: "vendor/bin/codecept run -c . -vvv --xml --coverage-xml"
run: "vendor/bin/codecept run -c . -vvv --xml --coverage-xml"
11 changes: 6 additions & 5 deletions .github/workflows/php-cs-fixer.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "PHP-CS-Fixer"

on:
pull_request:
pull_request_target:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
Expand All @@ -22,13 +22,14 @@ jobs:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:latest

- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply php-cs-fixer changes
commit_message: Apply php-cs-fixer changes
5 changes: 1 addition & 4 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: "Add authentication for private pimcore packages"
run: |
composer config --global --auth http-basic.enterprise.repo.pimcore.com token ${{ secrets.COMPOSER_PIMCORE_REPO_TOKEN }}
- name: "Setup Pimcore environment"
run: |
.github/ci/scripts/setup-pimcore-environment.sh
Expand Down Expand Up @@ -67,4 +64,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: phpstan-baseline.neon
path: phpstan-baseline.neon
path: phpstan-baseline.neon
8 changes: 6 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => 'Pimcore' . PHP_EOL . PHP_EOL .
'This source file is available under following license:' . PHP_EOL .
'This source file is available under two different licenses:' . PHP_EOL .
'- GNU General Public License version 3 (GPLv3)' . PHP_EOL .
'- Pimcore Commercial License (PCL)' . PHP_EOL .
'Full copyright and license information is available in' . PHP_EOL .
'LICENSE.md which is distributed with this source code.' . PHP_EOL .
PHP_EOL .
' @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)' . PHP_EOL .
' @license http://www.pimcore.org/license GPLv3'
' @license http://www.pimcore.org/license GPLv3 and PCL'
],

'blank_line_before_statement' => true,
Expand All @@ -49,6 +52,7 @@
'no_leading_namespace_whitespace' => true,
'no_short_bool_cast' => true,
'no_spaces_around_offset' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true],
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
Expand Down
19 changes: 17 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# License
Copyright (C) Pimcore GmbH

This software is available under following license:
This software is available under two different licenses:
* GNU General Public License version 3 (GPLv3) as Pimcore Community Edition
* Pimcore Commercial License (PCL)

The default Pimcore license, without a valid Pimcore Commercial License agreement, is the Open-Source GPLv3 license.

## GNU General Public License version 3 (GPLv3)
If you decide to choose the GPLv3 license, you must comply with the following terms:
Expand All @@ -18,4 +21,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.

## Pimcore Commercial License (PCL)
Alternatively, commercial and supported versions of the program - also known as
Commercial Distributions - must be used in accordance with the terms and conditions
contained in a separate written agreement between you and Pimcore GmbH.
For more information about the Pimcore Commercial License (PCL) please contact info@pimcore.com.



Please see also (files in this directory):
- [Licensing FAQ - license-faq.md](https://github.com/pimcore/pimcore/blob/master/license-faq.md)
- [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](gpl-3.0.txt)

0 comments on commit fd238c8

Please sign in to comment.