From 81bbdf8e399284baf207f4c0d74404a076560b05 Mon Sep 17 00:00:00 2001 From: Stefan Hagspiel Date: Mon, 6 Jan 2025 13:47:12 +0100 Subject: [PATCH 1/2] adjust license --- .github/workflows/ecs-fix.yml | 44 +++++++++++ .gitignore | 5 +- LICENSE.md | 20 +++-- README.md | 11 ++- UPGRADE.md | 3 +- composer.json | 10 ++- ecs.php | 133 ++++++++++++++++++++++++++++++++++ 7 files changed, 210 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/ecs-fix.yml create mode 100644 ecs.php diff --git a/.github/workflows/ecs-fix.yml b/.github/workflows/ecs-fix.yml new file mode 100644 index 0000000..feb8383 --- /dev/null +++ b/.github/workflows/ecs-fix.yml @@ -0,0 +1,44 @@ +name: Coding standard refactor +on: + schedule: + - cron: '0 0 * * SUN' + workflow_dispatch: ~ + +jobs: + ecs-fix: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + branch: [ 'master' ] + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ matrix.branch }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + + - name: Composer install + run: composer install --no-interaction --no-scripts + + - name: Run ECS + run: | + vendor/bin/ecs check src --fix --config ecs.php + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + commit-message: '[CS] Refactor' + author: DACHCOM Bot + title: '[CS] Refactor' + body: | + This PR has been generated automatically to fix code-styles + labels: | + Enhancement + branch: coding-standard/refactor-${{ matrix.branch }} + delete-branch: true + base: ${{ matrix.branch }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7c9f4c8..af21d25 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,6 @@ atlassian-ide-plugin.xml .project ehthumbs.db Thumbs.db -Vagrantfile -.vagrant php-cgi.core -.sass-cache +/vendor/ +/composer.lock diff --git a/LICENSE.md b/LICENSE.md index 6ff369d..c2a0a33 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,10 +1,14 @@ # License -Copyright (C) 2024 DACHCOM.DIGITAL +Copyright (C) DACHCOM.DIGITAL -This software is available under the GNU General Public License version 3 (GPLv3). +This software is available under two different licenses: +* GNU General Public License version 3 (GPLv3) as Pimcore Community Edition +* DACHCOM Commercial License (DCL) -### GNU General Public License version 3 (GPLv3) -If you decide to choose the GPLv3 license, you must comply with the following terms: +The default News Bundle license, without a valid DACHCOM 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: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,10 +17,14 @@ the Free Software Foundation, either version 3 of the License, or This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +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 . -[GNU General Public License](lhttps://www.gnu.org/licenses/gpl-3.0.en.html) \ No newline at end of file +## DACHCOM Commercial License (DCL) +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 DACHCOM.DIGITAL AG. +For more information about the News Bundle Commercial License (DCL) please contact dcdi@dachcom.ch. \ No newline at end of file diff --git a/README.md b/README.md index c73c31e..70daa43 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # Pimcore News +[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE.md) +[![Software License](https://img.shields.io/badge/license-DCL-white.svg?style=flat-square&color=%23ff5c5c)](LICENSE.md) + Pimcore News Bundle. Generate simple [custom entry types](docs/20_EntryTypes.md) like Events, Press or Event. ## Requirements @@ -36,12 +39,12 @@ Pimcore News Bundle. Generate simple [custom entry types](docs/20_EntryTypes.md) - [The Amazing Entry Types](./docs/20_EntryTypes.md) - [Presets](./docs/30_Presets.md) (new!) +## Upgrade Info +Before updating, please [check our upgrade notes!](UPGRADE.md) + ## License **DACHCOM.DIGITAL AG**, Löwenhofstrasse 15, 9424 Rheineck, Schweiz [dachcom.com](https://www.dachcom.com), dcdi@dachcom.ch Copyright © 2024 DACHCOM.DIGITAL. All rights reserved. -For licensing details please visit [LICENSE.md](LICENSE.md) - -## Upgrade Info -Before updating, please [check our upgrade notes!](UPGRADE.md) +For licensing details please visit [LICENSE.md](LICENSE.md) \ No newline at end of file diff --git a/UPGRADE.md b/UPGRADE.md index 9f45d69..2fa0773 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,6 +1,7 @@ # Upgrade Notes ---- +## 4.1.0 +- [LICENSE] Dual-License with GPL and Dachcom Commercial License (DCL) added ## 4.0.2 - [BUGFIX] remove `o_`-Prefixes for object columns [#71](https://github.com/dachcom-digital/pimcore-news/issues/71) diff --git a/composer.json b/composer.json index 58279fc..36a929c 100755 --- a/composer.json +++ b/composer.json @@ -1,7 +1,10 @@ { "name": "dachcom-digital/news", "type": "pimcore-bundle", - "license": "GPL-3.0-or-later", + "license": [ + "GPL-3.0-or-later", + "proprietary" + ], "description": "Pimcore News", "keywords": ["pimcore", "news"], "homepage": "https://github.com/dachcom-digital/pimcore-news", @@ -9,7 +12,7 @@ { "name": "DACHCOM.DIGITAL Stefan Hagspiel", "email": "shagspiel@dachcom.ch", - "homepage": "http://www.dachcom.com/", + "homepage": "https://www.dachcom.com/", "role": "Developer" } ], @@ -27,5 +30,8 @@ }, "require": { "pimcore/pimcore": "^11.0" + }, + "require-dev": { + "symplify/easy-coding-standard": "~12.2.0" } } diff --git a/ecs.php b/ecs.php new file mode 100644 index 0000000..169156b --- /dev/null +++ b/ecs.php @@ -0,0 +1,133 @@ +withSets([SetList::CLEAN_CODE, SetList::PSR_12]) + ->withConfiguredRule(Fixer\Comment\HeaderCommentFixer::class, [ + 'header' => $header, + 'comment_type' => 'comment' + ]) + ->withConfiguredRule(Fixer\Basic\BracesFixer::class, [ + 'allow_single_line_closure' => true, + ]) + ->withConfiguredRule(Fixer\Operator\ConcatSpaceFixer::class, [ + 'spacing' => 'one', + ]) + ->withConfiguredRule(Fixer\Phpdoc\PhpdocAlignFixer::class, [ + 'tags' => ['method', 'param', 'property', 'return', 'throws', 'type', 'var'], + ]) + ->withConfiguredRule(Fixer\Operator\BinaryOperatorSpacesFixer::class, [ + 'operators' => [ + '=' => 'single_space', + '=>' => 'align', + ] + ]) + ->withConfiguredRule(Fixer\Operator\IncrementStyleFixer::class, [ + 'style' => 'post', + ]) + ->withConfiguredRule(Fixer\ClassNotation\ClassAttributesSeparationFixer::class, [ + 'elements' => [ + 'const' => 'none', + 'method' => 'one', + 'property' => 'none', + 'trait_import' => 'none' + ], + ]) + ->withConfiguredRule(Fixer\ClassNotation\ClassDefinitionFixer::class, [ + 'single_line' => true, + ]) + ->withConfiguredRule(Fixer\Comment\SingleLineCommentStyleFixer::class, [ + 'comment_types' => ['hash'], + ]) + ->withConfiguredRule(Fixer\Alias\NoMixedEchoPrintFixer::class, [ + 'use' => 'echo', + ]) + ->withConfiguredRule(Fixer\Basic\NoTrailingCommaInSinglelineFixer::class, [ + 'elements' => ['array_destructuring'] + ]) + ->withConfiguredRule(Fixer\NamespaceNotation\BlankLinesBeforeNamespaceFixer::class, [ + 'min_line_breaks' => 2, + 'max_line_breaks' => 2 + ]) + ->withConfiguredRule(Fixer\Whitespace\TypeDeclarationSpacesFixer::class, [ + 'elements' => ['function'] + ]) + ->withConfiguredRule(Fixer\Whitespace\NoExtraBlankLinesFixer::class, [ + 'tokens' => ['curly_brace_block', 'extra', 'parenthesis_brace_block', 'square_brace_block', 'throw', 'use'], + ]) + ->withRules([ + Fixer\PhpTag\BlankLineAfterOpeningTagFixer::class, + Fixer\Operator\NewWithParenthesesFixer::class, + Fixer\Operator\UnaryOperatorSpacesFixer::class, + Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer::class, + Fixer\Operator\StandardizeNotEqualsFixer::class, + Fixer\Operator\TernaryOperatorSpacesFixer::class, + Fixer\Operator\StandardizeIncrementFixer::class, + Fixer\Whitespace\BlankLineBeforeStatementFixer::class, + Fixer\Whitespace\ArrayIndentationFixer::class, + Fixer\Whitespace\NoSpacesAroundOffsetFixer::class, + Fixer\Whitespace\NoWhitespaceInBlankLineFixer::class, + Fixer\CastNotation\CastSpacesFixer::class, + Fixer\CastNotation\LowercaseCastFixer::class, + Fixer\CastNotation\NoShortBoolCastFixer::class, + Fixer\CastNotation\ShortScalarCastFixer::class, + Fixer\LanguageConstruct\DeclareEqualNormalizeFixer::class, + Fixer\ControlStructure\IncludeFixer::class, + Fixer\ControlStructure\NoUnneededControlParenthesesFixer::class, + Fixer\Casing\NativeFunctionCasingFixer::class, + Fixer\Casing\MagicConstantCasingFixer::class, + Fixer\Comment\NoEmptyCommentFixer::class, + Fixer\NamespaceNotation\NoLeadingNamespaceWhitespaceFixer::class, + Fixer\Semicolon\NoEmptyStatementFixer::class, + Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer::class, + Fixer\Semicolon\SpaceAfterSemicolonFixer::class, + Fixer\Semicolon\SemicolonAfterInstructionFixer::class, + Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer::class, + Fixer\ArrayNotation\NormalizeIndexBraceFixer::class, + Fixer\ArrayNotation\NoMultilineWhitespaceAroundDoubleArrowFixer::class, + Fixer\ArrayNotation\TrimArraySpacesFixer::class, + Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer::class, + Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer::class, + Fixer\Phpdoc\PhpdocAnnotationWithoutDotFixer::class, + Fixer\Phpdoc\PhpdocIndentFixer::class, + Fixer\Phpdoc\PhpdocInlineTagNormalizerFixer::class, + Fixer\Phpdoc\PhpdocNoAccessFixer::class, + Fixer\Phpdoc\PhpdocNoEmptyReturnFixer::class, + Fixer\Phpdoc\PhpdocNoPackageFixer::class, + Fixer\Phpdoc\PhpdocNoUselessInheritdocFixer::class, + Fixer\Phpdoc\PhpdocReturnSelfReferenceFixer::class, + Fixer\Phpdoc\PhpdocScalarFixer::class, + Fixer\Phpdoc\PhpdocSingleLineVarSpacingFixer::class, + Fixer\Phpdoc\PhpdocSummaryFixer::class, + Fixer\Phpdoc\PhpdocToCommentFixer::class, + Fixer\Phpdoc\PhpdocTrimFixer::class, + Fixer\Phpdoc\PhpdocTypesFixer::class, + Fixer\Phpdoc\NoEmptyPhpdocFixer::class, + Fixer\Phpdoc\PhpdocSeparationFixer::class, + Fixer\Phpdoc\PhpdocVarWithoutNameFixer::class, + Fixer\Phpdoc\PhpdocNoAliasTagFixer::class, + Fixer\FunctionNotation\ReturnTypeDeclarationFixer::class, + Fixer\FunctionNotation\MethodArgumentSpaceFixer::class, + Fixer\StringNotation\SingleQuoteFixer::class, + Fixer\Import\NoUnusedImportsFixer::class, + Fixer\Import\NoLeadingImportSlashFixer::class, + Fixer\PhpUnit\PhpUnitFqcnAnnotationFixer::class, + Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer::class, + Fixer\ClassNotation\SelfAccessorFixer::class, + Fixer\ClassNotation\SingleClassElementPerStatementFixer::class, + Fixer\ClassNotation\NoUnneededFinalMethodFixer::class + ]); \ No newline at end of file From dd4cc3cf99d360e77027990fd76fe38d54ffb6f1 Mon Sep 17 00:00:00 2001 From: Stefan Hagspiel Date: Mon, 6 Jan 2025 13:48:26 +0100 Subject: [PATCH 2/2] adjust license --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 70daa43..8df422e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Pimcore News Bundle. Generate simple [custom entry types](docs/20_EntryTypes.md) ```json "require" : { - "dachcom-digital/news" : "~4.0.0", + "dachcom-digital/news" : "~4.1.0", } ``` @@ -45,6 +45,6 @@ Before updating, please [check our upgrade notes!](UPGRADE.md) ## License **DACHCOM.DIGITAL AG**, Löwenhofstrasse 15, 9424 Rheineck, Schweiz [dachcom.com](https://www.dachcom.com), dcdi@dachcom.ch -Copyright © 2024 DACHCOM.DIGITAL. All rights reserved. +Copyright © 2025 DACHCOM.DIGITAL. All rights reserved. For licensing details please visit [LICENSE.md](LICENSE.md) \ No newline at end of file