Skip to content

Commit

Permalink
Merge pull request #423 from dpfaffenbauer/re-license
Browse files Browse the repository at this point in the history
[License] change license to Dual-License with GPL and Data Definition Commercial License (DDCL)
  • Loading branch information
dpfaffenbauer authored Oct 17, 2024
2 parents 6a438d5 + f5bbe22 commit 0cfa8fc
Show file tree
Hide file tree
Showing 355 changed files with 5,080 additions and 5,016 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/codestyles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Coding standard refactor

on:
schedule:
- cron: "0 2 * * MON" # Run at 2am every Monday
workflow_dispatch: ~

jobs:
coding-standard:
runs-on: ubuntu-latest
name: "Coding standard refactor"

timeout-minutes: 5

strategy:
fail-fast: false
matrix:
branch: [ '4.0' ]

steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1

- name: Install PHP dependencies
run: composer update --no-interaction --no-scripts

- name: Run ECS
run: vendor/bin/ecs check --fix src

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: '[CS] Refactor'
author: CORS GmbH <[email protected]>
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 }}
21 changes: 20 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# License
Copyright (C) 2016-2024 instride AG
Copyright (C) CORS GmbH in combination with instride AG

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

The default Data Definitions license, without a valid Data Definitions 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
Expand All @@ -13,3 +22,13 @@ 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/>.

## Data Definitions Commercial License (DDCL)
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 CORS GmbH/instride AG.
For more information about the Data Definitions Commercial License (DDCL) please contact [email protected].


Please see also (files in this directory):
[GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](gpl-3.0.txt)
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@
"symfony/http-client": "^6.3 | ^7.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"behat/behat": "^3.8",
"friends-of-behat/symfony-extension": "^2.1",
"phpstan/phpstan": "^1.5",
"phpstan/phpstan-doctrine": "^1.3",
"phpstan/phpstan-symfony": "^1.1",
"phpstan/phpstan-webmozart-assert": "^1.1"
"phpstan/phpstan-webmozart-assert": "^1.1",
"roave/security-advisories": "dev-latest",
"symplify/easy-coding-standard": "^11"
},
"conflict": {
"guzzlehttp/psr7": "< 2.0"
Expand Down
268 changes: 268 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Fixer\Alias\EregToPregFixer;
use PhpCsFixer\Fixer\Alias\NoAliasFunctionsFixer;
use PhpCsFixer\Fixer\Alias\NoMixedEchoPrintFixer;
use PhpCsFixer\Fixer\Alias\PowToExponentiationFixer;
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use PhpCsFixer\Fixer\ArrayNotation\NoMultilineWhitespaceAroundDoubleArrowFixer;
use PhpCsFixer\Fixer\ArrayNotation\NormalizeIndexBraceFixer;
use PhpCsFixer\Fixer\ArrayNotation\NoTrailingCommaInSinglelineArrayFixer;
use PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer;
use PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer;
use PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer;
use PhpCsFixer\Fixer\Basic\BracesFixer;
use PhpCsFixer\Fixer\Basic\EncodingFixer;
use PhpCsFixer\Fixer\Basic\NonPrintableCharacterFixer;
use PhpCsFixer\Fixer\Casing\ConstantCaseFixer;
use PhpCsFixer\Fixer\Casing\LowercaseKeywordsFixer;
use PhpCsFixer\Fixer\Casing\LowercaseStaticReferenceFixer;
use PhpCsFixer\Fixer\Casing\MagicConstantCasingFixer;
use PhpCsFixer\Fixer\Casing\NativeFunctionCasingFixer;
use PhpCsFixer\Fixer\CastNotation\CastSpacesFixer;
use PhpCsFixer\Fixer\CastNotation\LowercaseCastFixer;
use PhpCsFixer\Fixer\CastNotation\ModernizeTypesCastingFixer;
use PhpCsFixer\Fixer\CastNotation\NoShortBoolCastFixer;
use PhpCsFixer\Fixer\CastNotation\ShortScalarCastFixer;
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
use PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer;
use PhpCsFixer\Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer;
use PhpCsFixer\Fixer\ClassNotation\NoNullPropertyInitializationFixer;
use PhpCsFixer\Fixer\ClassNotation\NoPhp4ConstructorFixer;
use PhpCsFixer\Fixer\ClassNotation\NoUnneededFinalMethodFixer;
use PhpCsFixer\Fixer\ClassNotation\ProtectedToPrivateFixer;
use PhpCsFixer\Fixer\ClassNotation\SelfAccessorFixer;
use PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer;
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
use PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer;
use PhpCsFixer\Fixer\Comment\NoTrailingWhitespaceInCommentFixer;
use PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer;
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\ConstantNotation\NativeConstantInvocationFixer;
use PhpCsFixer\Fixer\ControlStructure\ElseifFixer;
use PhpCsFixer\Fixer\ControlStructure\IncludeFixer;
use PhpCsFixer\Fixer\ControlStructure\NoBreakCommentFixer;
use PhpCsFixer\Fixer\ControlStructure\NoSuperfluousElseifFixer;
use PhpCsFixer\Fixer\ControlStructure\NoTrailingCommaInListCallFixer;
use PhpCsFixer\Fixer\ControlStructure\NoUnneededControlParenthesesFixer;
use PhpCsFixer\Fixer\ControlStructure\NoUnneededCurlyBracesFixer;
use PhpCsFixer\Fixer\ControlStructure\NoUselessElseFixer;
use PhpCsFixer\Fixer\ControlStructure\SwitchCaseSemicolonToColonFixer;
use PhpCsFixer\Fixer\ControlStructure\SwitchCaseSpaceFixer;
use PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer;
use PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer;
use PhpCsFixer\Fixer\FunctionNotation\FunctionTypehintSpaceFixer;
use PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer;
use PhpCsFixer\Fixer\FunctionNotation\NoSpacesAfterFunctionNameFixer;
use PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer;
use PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer;
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use PhpCsFixer\Fixer\Import\SingleImportPerStatementFixer;
use PhpCsFixer\Fixer\Import\SingleLineAfterImportsFixer;
use PhpCsFixer\Fixer\LanguageConstruct\CombineConsecutiveIssetsFixer;
use PhpCsFixer\Fixer\LanguageConstruct\CombineConsecutiveUnsetsFixer;
use PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer;
use PhpCsFixer\Fixer\LanguageConstruct\DirConstantFixer;
use PhpCsFixer\Fixer\LanguageConstruct\ErrorSuppressionFixer;
use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer;
use PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer;
use PhpCsFixer\Fixer\ListNotation\ListSyntaxFixer;
use PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer;
use PhpCsFixer\Fixer\NamespaceNotation\NoLeadingNamespaceWhitespaceFixer;
use PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer;
use PhpCsFixer\Fixer\Naming\NoHomoglyphNamesFixer;
use PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer;
use PhpCsFixer\Fixer\Operator\IncrementStyleFixer;
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
use PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer;
use PhpCsFixer\Fixer\Operator\OperatorLinebreakFixer;
use PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer;
use PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer;
use PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocTagRenameFixer;
use PhpCsFixer\Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer;
use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer;
use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagNormalizerFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoAccessFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoAliasTagFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoPackageFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoUselessInheritdocFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocReturnSelfReferenceFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocScalarFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocSingleLineVarSpacingFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocTagTypeFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocTypesOrderFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocVarWithoutNameFixer;
use PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer;
use PhpCsFixer\Fixer\PhpTag\FullOpeningTagFixer;
use PhpCsFixer\Fixer\PhpTag\NoClosingTagFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitDedicateAssertFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitFqcnAnnotationFixer;
use PhpCsFixer\Fixer\Semicolon\MultilineWhitespaceBeforeSemicolonsFixer;
use PhpCsFixer\Fixer\Semicolon\NoEmptyStatementFixer;
use PhpCsFixer\Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer;
use PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
use PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer;
use PhpCsFixer\Fixer\Whitespace\BlankLineBeforeStatementFixer;
use PhpCsFixer\Fixer\Whitespace\IndentationTypeFixer;
use PhpCsFixer\Fixer\Whitespace\LineEndingFixer;
use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer;
use PhpCsFixer\Fixer\Whitespace\NoSpacesAroundOffsetFixer;
use PhpCsFixer\Fixer\Whitespace\NoSpacesInsideParenthesisFixer;
use PhpCsFixer\Fixer\Whitespace\NoTrailingWhitespaceFixer;
use PhpCsFixer\Fixer\Whitespace\NoWhitespaceInBlankLineFixer;
use PhpCsFixer\Fixer\Whitespace\SingleBlankLineAtEofFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;

return static function (ECSConfig $ecsConfig): void {
$ecsConfig->rules([
BinaryOperatorSpacesFixer::class,
BlankLineAfterNamespaceFixer::class,
BlankLineAfterOpeningTagFixer::class,
BlankLineBeforeStatementFixer::class,
CastSpacesFixer::class,
ClassAttributesSeparationFixer::class,
CombineConsecutiveIssetsFixer::class,
CombineConsecutiveUnsetsFixer::class,
DeclareEqualNormalizeFixer::class,
DeclareStrictTypesFixer::class,
DirConstantFixer::class,
ElseifFixer::class,
EncodingFixer::class,
EregToPregFixer::class,
ErrorSuppressionFixer::class,
FullOpeningTagFixer::class,
FunctionDeclarationFixer::class,
FunctionToConstantFixer::class,
FunctionTypehintSpaceFixer::class,
GeneralPhpdocTagRenameFixer::class,
IncludeFixer::class,
IndentationTypeFixer::class,
IsNullFixer::class,
LineEndingFixer::class,
LowercaseCastFixer::class,
LowercaseKeywordsFixer::class,
LowercaseStaticReferenceFixer::class,
MagicConstantCasingFixer::class,
MethodArgumentSpaceFixer::class,
ModernizeTypesCastingFixer::class,
NativeConstantInvocationFixer::class,
NativeFunctionCasingFixer::class,
NewWithBracesFixer::class,
NoAliasFunctionsFixer::class,
NoBlankLinesAfterClassOpeningFixer::class,
NoBlankLinesAfterPhpdocFixer::class,
NoBreakCommentFixer::class,
NoClosingTagFixer::class,
NoEmptyCommentFixer::class,
NoEmptyPhpdocFixer::class,
NoEmptyStatementFixer::class,
NoHomoglyphNamesFixer::class,
NoLeadingImportSlashFixer::class,
NoLeadingNamespaceWhitespaceFixer::class,
NoMultilineWhitespaceAroundDoubleArrowFixer::class,
NonPrintableCharacterFixer::class,
NoNullPropertyInitializationFixer::class,
NoPhp4ConstructorFixer::class,
NormalizeIndexBraceFixer::class,
NoShortBoolCastFixer::class,
NoSinglelineWhitespaceBeforeSemicolonsFixer::class,
NoSpacesAfterFunctionNameFixer::class,
NoSpacesAroundOffsetFixer::class,
NoSpacesInsideParenthesisFixer::class,
NoSuperfluousElseifFixer::class,
NoTrailingCommaInListCallFixer::class,
NoTrailingCommaInSinglelineArrayFixer::class,
NoTrailingWhitespaceFixer::class,
NoTrailingWhitespaceInCommentFixer::class,
NoUnneededControlParenthesesFixer::class,
NoUnneededCurlyBracesFixer::class,
NoUnneededFinalMethodFixer::class,
NoUnusedImportsFixer::class,
NoUselessElseFixer::class,
NoWhitespaceBeforeCommaInArrayFixer::class,
NoWhitespaceInBlankLineFixer::class,
ObjectOperatorWithoutWhitespaceFixer::class,
OrderedImportsFixer::class,
PhpdocIndentFixer::class,
PhpdocInlineTagNormalizerFixer::class,
PhpdocNoAccessFixer::class,
PhpdocNoAliasTagFixer::class,
PhpdocNoEmptyReturnFixer::class,
PhpdocNoPackageFixer::class,
PhpdocNoUselessInheritdocFixer::class,
PhpdocReturnSelfReferenceFixer::class,
PhpdocScalarFixer::class,
PhpdocSeparationFixer::class,
PhpdocSingleLineVarSpacingFixer::class,
PhpdocTagTypeFixer::class,
PhpdocTrimFixer::class,
PhpdocTypesFixer::class,
PhpdocVarWithoutNameFixer::class,
PhpUnitDedicateAssertFixer::class,
PhpUnitFqcnAnnotationFixer::class,
PowToExponentiationFixer::class,
ProtectedToPrivateFixer::class,
ReturnTypeDeclarationFixer::class,
SelfAccessorFixer::class,
ShortScalarCastFixer::class,
SingleBlankLineAtEofFixer::class,
SingleBlankLineBeforeNamespaceFixer::class,
SingleClassElementPerStatementFixer::class,
SingleImportPerStatementFixer::class,
SingleLineAfterImportsFixer::class,
SingleQuoteFixer::class,
SpaceAfterSemicolonFixer::class,
StandardizeNotEqualsFixer::class,
SwitchCaseSemicolonToColonFixer::class,
SwitchCaseSpaceFixer::class,
TernaryOperatorSpacesFixer::class,
TernaryToNullCoalescingFixer::class,
TrimArraySpacesFixer::class,
UnaryOperatorSpacesFixer::class,
WhitespaceAfterCommaInArrayFixer::class,
\Symplify\CodingStandard\Fixer\Spacing\StandaloneLineConstructorParamFixer::class
]);

$ecsConfig->ruleWithConfiguration(ArraySyntaxFixer::class, ['syntax' => 'short']);
$ecsConfig->ruleWithConfiguration(BracesFixer::class, ['allow_single_line_closure' => true]);
$ecsConfig->ruleWithConfiguration(ClassDefinitionFixer::class, ['single_item_single_line' => true, 'multi_line_extends_each_single_line' => true]);
$ecsConfig->ruleWithConfiguration(ConcatSpaceFixer::class, ['spacing' => 'one']);
$ecsConfig->ruleWithConfiguration(ConstantCaseFixer::class, ['case' => 'lower']);
$ecsConfig->ruleWithConfiguration(IncrementStyleFixer::class, ['style' => 'pre']);
$ecsConfig->ruleWithConfiguration(ListSyntaxFixer::class, ['syntax' => 'short']);
$ecsConfig->ruleWithConfiguration(MultilineWhitespaceBeforeSemicolonsFixer::class, ['strategy' => 'new_line_for_chained_calls']);
$ecsConfig->ruleWithConfiguration(NoExtraBlankLinesFixer::class, ['tokens' => ['break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'switch', 'throw', 'use']]);
$ecsConfig->ruleWithConfiguration(NoMixedEchoPrintFixer::class, ['use' => 'echo']);
$ecsConfig->ruleWithConfiguration(NoSuperfluousPhpdocTagsFixer::class, ['allow_mixed' => true]);
$ecsConfig->ruleWithConfiguration(OperatorLinebreakFixer::class, ['only_booleans' => true, 'position' => 'end']);
$ecsConfig->ruleWithConfiguration(PhpdocTypesOrderFixer::class, ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none']);
$ecsConfig->ruleWithConfiguration(SingleLineCommentStyleFixer::class, ['comment_types' => ['hash']]);
$ecsConfig->ruleWithConfiguration(TrailingCommaInMultilineFixer::class, ['elements' => ['arrays', 'arguments', 'parameters']]);
$ecsConfig->ruleWithConfiguration(VisibilityRequiredFixer::class, ['elements' => ['const', 'property', 'method']]);

$header = <<<EOT
This source file is available under two different licenses:
- GNU General Public License version 3 (GPLv3)
- Data Definitions Commercial License (DDCL)
Full copyright and license information is available in
LICENSE.md which is distributed with this source code.
@copyright Copyright (c) CORS GmbH (https://www.cors.gmbh) in combination with instride AG (https://instride.ch)
@license GPLv3 and DDCL
EOT;

$ecsConfig->ruleWithConfiguration(HeaderCommentFixer::class, ['header' => $header]);
};
6 changes: 3 additions & 3 deletions features/interpreter/asset_url.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@interpreter @interpreter_asset_url
@interpreter @interpreter_asset_url @wip
Feature: Adding a import with a interpreter
The Interpreter will check for an image to download and assign it if found

Expand All @@ -23,10 +23,10 @@ Feature: Adding a import with a interpreter
Given there is a file test.csv with content:
"""
name,image
test1,https://via.placeholder.com/300/09f/fff.png
test1,https://www.coreshop.org/assets/img/logo-full.svg
"""
And I run the import-definitions with params:
| key | value |
| file | test.csv |
Then there should be "1" data-objects for definition
And the field "image" for object of the definition should have the value of asset "/images/fff.png"
And the field "image" for object of the definition should have the value of asset "/images/logo-full.svg.png"
Loading

0 comments on commit 0cfa8fc

Please sign in to comment.