Skip to content

Commit 34ec628

Browse files
authored
License Switch to POCL (#74)
* License Switch to POCL * License Switch to POCL * fix php-style fixer
1 parent bde84fe commit 34ec628

31 files changed

+346
-961
lines changed

.github/ISSUE_TEMPLATE/Bug-Report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
attributes:
88
value: |
99
## Important notice
10-
As an open source project we love to work together with our community to improve and develop our products.
10+
As an open core project we love to work together with our community to improve and develop our products.
1111
It's also important for us to make clear that **we're not working for you or your company**,
1212
but we enjoy to work together to solve existing bugs.
1313
So we would love to see PRs with bugfixes, discuss them and we are happy to merge them when they are ready.

.github/ISSUE_TEMPLATE/Feature-Request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
attributes:
88
value: |
99
## Important notice
10-
As an open source project we love to work together with our community to improve and develop our products.
10+
As an open core project we love to work together with our community to improve and develop our products.
1111
It's also important for us to make clear that **we're not working for you or your company**,
1212
but we enjoy to work together to improve or add new features to the product.
1313
So we are always ready to discuss features and improvements with our community.

.github/ISSUE_TEMPLATE/Improvement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
attributes:
88
value: |
99
## Important notice
10-
As an open source project we love to work together with our community to improve and develop our products.
10+
As an open core project we love to work together with our community to improve and develop our products.
1111
It's also important for us to make clear that **we're not working for you or your company**,
1212
but we enjoy to work together to improve or add new features to the product.
1313
So we are always ready to discuss features and improvements with our community.

.github/workflows/php-style.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
name: PHP Style
1+
name: "PHP-CS-Fixer"
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- "[0-9]+.[0-9]+"
7+
- "[0-9]+.x"
48

5-
jobs:
6-
php-cs-fixer:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v2
10-
with:
11-
ref: ${{ github.head_ref }}
12-
13-
- name: PHP-CS-Fixer
14-
uses: docker://oskarstark/php-cs-fixer-ga:2.19.0
15-
with:
16-
args: --config=.php_cs.dist --allow-risky yes
9+
permissions:
10+
contents: write
1711

18-
- uses: stefanzweifel/git-auto-commit-action@v4
19-
with:
20-
commit_message: Apply php-cs-fixer changes
12+
jobs:
13+
php-style:
14+
uses: pimcore/workflows-collection-public/.github/workflows/reusable-php-cs-fixer.yaml@main
15+
if: github.repository_owner == 'pimcore'
16+
secrets:
17+
PHP_CS_FIXER_GITHUB_TOKEN: ${{ secrets.PHP_CS_FIXER_GITHUB_TOKEN }}
18+
with:
19+
head_ref: ${{ github.event.pull_request.head.ref }}
20+
repository: ${{ github.event.pull_request.head.repo.full_name }}
21+
config_file: .php-cs-fixer.dist.php

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,39 @@
66
// do not fix views
77
->notName('*.html.php');
88

9-
return PhpCsFixer\Config::create()
10-
->setRules([
9+
$config = new PhpCsFixer\Config();
10+
$config->setRules([
1111
'@PSR1' => true,
1212
'@PSR2' => true,
1313
'array_syntax' => ['syntax' => 'short'],
1414

1515
'header_comment' => [
16-
'commentType' => 'PHPDoc',
17-
'header' => 'Pimcore' . PHP_EOL . PHP_EOL .
18-
'This source file is available under two different licenses:' . PHP_EOL .
19-
'- GNU General Public License version 3 (GPLv3)' . PHP_EOL .
20-
'- Pimcore Commercial License (PCL)' . PHP_EOL .
21-
'Full copyright and license information is available in' . PHP_EOL .
22-
'LICENSE.md which is distributed with this source code.' . PHP_EOL .
23-
PHP_EOL .
24-
' @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)' . PHP_EOL .
25-
' @license http://www.pimcore.org/license GPLv3 and PCL'
26-
],
16+
'comment_type' => 'PHPDoc',
17+
'header' =>
18+
'This source file is available under the terms of the' . PHP_EOL .
19+
'Pimcore Open Core License (POCL)' . PHP_EOL .
20+
'Full copyright and license information is available in' . PHP_EOL .
21+
'LICENSE.md which is distributed with this source code.' . PHP_EOL .
22+
PHP_EOL .
23+
' @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)' . PHP_EOL .
24+
' @license Pimcore Open Core License (POCL)'
25+
],
2726

28-
// keep aligned = and => operators as they are: do not force aligning, but do not remove it
29-
'binary_operator_spaces' => ['align_double_arrow' => null, 'align_equals' => null],
30-
31-
'blank_line_before_return' => true,
27+
'blank_line_before_statement' => true,
3228
'encoding' => true,
3329
'function_typehint_space' => true,
34-
'hash_to_slash_comment' => true,
30+
'single_line_comment_style' => true,
3531
'lowercase_cast' => true,
3632
'magic_constant_casing' => true,
37-
'method_argument_space' => ['ensure_fully_multiline' => false],
38-
'method_separation' => true,
33+
'method_argument_space' => ['on_multiline' => 'ignore'],
34+
'class_attributes_separation' => true,
3935
'native_function_casing' => true,
4036
'no_blank_lines_after_class_opening' => true,
4137
'no_blank_lines_after_phpdoc' => true,
4238
'no_empty_comment' => true,
4339
'no_empty_phpdoc' => true,
4440
'no_empty_statement' => true,
45-
'no_extra_consecutive_blank_lines' => true,
41+
'no_extra_blank_lines' => true,
4642
'no_leading_import_slash' => true,
4743
'no_leading_namespace_whitespace' => true,
4844
'no_short_bool_cast' => true,
@@ -67,5 +63,8 @@
6763
'standardize_not_equals' => true,
6864
'ternary_operator_spaces' => true,
6965
'whitespace_after_comma_in_array' => true,
70-
])
71-
->setFinder($finder);
66+
]);
67+
68+
$config->setFinder($finder);
69+
return $config;
70+

0 commit comments

Comments
 (0)