Skip to content

Commit ec5e1bd

Browse files
Updated license info and code style (pimcore#347)
* Updated license info * updated license and added code-style action * Apply php-cs-fixer changes Co-authored-by: Christian Fasching <[email protected]> Co-authored-by: fashxp <[email protected]>
1 parent 0bb9cba commit ec5e1bd

File tree

385 files changed

+3077
-3119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+3077
-3119
lines changed

Diff for: .github/workflows/php-style.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PHP Style
2+
3+
on: [push, pull_request]
4+
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
17+
18+
- uses: stefanzweifel/git-auto-commit-action@v4
19+
with:
20+
commit_message: Apply php-cs-fixer changes

Diff for: .php_cs.dist

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ return PhpCsFixer\Config::create()
1717
'header' => 'Pimcore' . PHP_EOL . PHP_EOL .
1818
'This source file is available under two different licenses:' . PHP_EOL .
1919
'- GNU General Public License version 3 (GPLv3)' . PHP_EOL .
20-
'- Pimcore Enterprise License (PEL)' . PHP_EOL .
20+
'- Pimcore Commercial License (PCL)' . PHP_EOL .
2121
'Full copyright and license information is available in' . PHP_EOL .
2222
'LICENSE.md which is distributed with this source code.' . PHP_EOL .
2323
PHP_EOL .
2424
' @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)' . PHP_EOL .
25-
' @license http://www.pimcore.org/license GPLv3 and PEL'
25+
' @license http://www.pimcore.org/license GPLv3 and PCL'
2626
],
2727

2828
// keep aligned = and => operators as they are: do not force aligning, but do not remove it

Diff for: LICENSE.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Copyright (C) Pimcore GmbH
33

44
This software is available under two different licenses:
55
* GNU General Public License version 3 (GPLv3) as Pimcore Community Edition
6-
* Pimcore Enterprise License (PEL)
6+
* Pimcore Commercial License (PCL)
77

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

1010
## GNU General Public License version 3 (GPLv3)
1111
If you decide to choose the GPLv3 license, you must comply with the following terms:
@@ -23,11 +23,14 @@ GNU General Public License for more details.
2323
You should have received a copy of the GNU General Public License
2424
along with this program. If not, see <http://www.gnu.org/licenses/>.
2525

26-
## Pimcore Enterprise License (PEL)
26+
## Pimcore Commercial License (PCL)
2727
Alternatively, commercial and supported versions of the program - also known as
28-
Enterprise Distributions - must be used in accordance with the terms and conditions
29-
contained in a separate written agreement between you and Pimcore GmbH. For more information about the Pimcore Enterprise License (PEL) please contact [email protected].
28+
Commercial Distributions - must be used in accordance with the terms and conditions
29+
contained in a separate written agreement between you and Pimcore GmbH.
30+
For more information about the Pimcore Commercial License (PCL) please contact [email protected].
3031

3132

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

Diff for: src/Command/GraphQL/RebuildDefinitionsCommand.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<?php
2+
23
/**
34
* Pimcore
45
*
56
* This source file is available under two different licenses:
67
* - GNU General Public License version 3 (GPLv3)
7-
* - Pimcore Enterprise License (PEL)
8+
* - Pimcore Commercial License (PCL)
89
* Full copyright and license information is available in
910
* LICENSE.md which is distributed with this source code.
1011
*
1112
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
12-
* @license http://www.pimcore.org/license GPLv3 and PEL
13+
* @license http://www.pimcore.org/license GPLv3 and PCL
1314
*/
1415

1516
namespace Pimcore\Bundle\DataHubBundle\Command\GraphQL;
@@ -29,7 +30,7 @@ protected function configure()
2930
{
3031
$this
3132
->setName('datahub:graphql:rebuild-definitions')
32-
->setDescription("Rebuild GraphQL endpoint definitions")
33+
->setDescription('Rebuild GraphQL endpoint definitions')
3334
->addOption(
3435
'definitions',
3536
null,
@@ -41,7 +42,9 @@ protected function configure()
4142
/**
4243
* @param InputInterface $input
4344
* @param OutputInterface $output
45+
*
4446
* @return int|void|null
47+
*
4548
* @throws \Exception
4649
*/
4750
public function execute(InputInterface $input, OutputInterface $output)
@@ -54,12 +57,11 @@ public function execute(InputInterface $input, OutputInterface $output)
5457
$list = Configuration\Dao::getList();
5558
foreach ($list as $configuration) {
5659
$endpoint = $configuration->getName();
57-
$included[]= $endpoint;
60+
$included[] = $endpoint;
5861
}
5962
}
6063

6164
foreach ($included as $endpoint) {
62-
6365
$config = Configuration::getByName($endpoint);
6466
if (!$config) {
6567
$this->output->writeln('<error>Could not find config: ' . $endpoint . '</error>');

Diff for: src/ConfigEvents.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
*
66
* This source file is available under two different licenses:
77
* - GNU General Public License version 3 (GPLv3)
8-
* - Pimcore Enterprise License (PEL)
8+
* - Pimcore Commercial License (PCL)
99
* Full copyright and license information is available in
1010
* LICENSE.md which is distributed with this source code.
1111
*
1212
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
13-
* @license http://www.pimcore.org/license GPLv3 and PEL
13+
* @license http://www.pimcore.org/license GPLv3 and PCL
1414
*/
1515

1616
namespace Pimcore\Bundle\DataHubBundle;

Diff for: src/Configuration.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
*
66
* This source file is available under two different licenses:
77
* - GNU General Public License version 3 (GPLv3)
8-
* - Pimcore Enterprise License (PEL)
8+
* - Pimcore Commercial License (PCL)
99
* Full copyright and license information is available in
1010
* LICENSE.md which is distributed with this source code.
1111
*
1212
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
13-
* @license http://www.pimcore.org/license GPLv3 and PEL
13+
* @license http://www.pimcore.org/license GPLv3 and PCL
1414
*/
1515

1616
namespace Pimcore\Bundle\DataHubBundle;
@@ -22,11 +22,12 @@
2222

2323
/**
2424
* Class Configuration
25+
*
2526
* @package Pimcore\Bundle\DataHubBundle
2627
*/
2728
class Configuration extends AbstractModel
2829
{
29-
public const SECURITYCONFIG_AUTH_APIKEY = "datahub_apikey";
30+
public const SECURITYCONFIG_AUTH_APIKEY = 'datahub_apikey';
3031

3132
/**
3233
* @var string
@@ -179,8 +180,8 @@ public function save(): void
179180
$this->configuration['general']['name'] = $this->name;
180181

181182
$securityConfig = $this->getSecurityConfig();
182-
if (($this->configuration['general']['active'] ?? false) && isset($securityConfig['method']) && $securityConfig['method'] === self::SECURITYCONFIG_AUTH_APIKEY) {
183-
$apikey = $securityConfig['apikey'] ?? "";
183+
if (($this->configuration['general']['active'] ?? false) && isset($securityConfig['method']) && $securityConfig['method'] === self::SECURITYCONFIG_AUTH_APIKEY) {
184+
$apikey = $securityConfig['apikey'] ?? '';
184185
if (strlen($apikey) < 16) {
185186
throw new \Exception('API key does not satisfy the minimum length of 16 characters');
186187
}
@@ -202,7 +203,7 @@ public function delete(): void
202203
$this->getDao()->delete();
203204

204205
$event = new GenericEvent($this);
205-
$event->setArgument("configuration", $this);
206+
$event->setArgument('configuration', $this);
206207
\Pimcore::getEventDispatcher()->dispatch($event, ConfigurationEvents::CONFIGURATION_POST_DELETE);
207208
}
208209

@@ -221,7 +222,7 @@ public static function getList()
221222
*
222223
* @return Configuration|null
223224
*/
224-
public static function getByName($name): ?Configuration
225+
public static function getByName($name): ?self
225226
{
226227
return Dao::getByName($name);
227228
}
@@ -289,6 +290,7 @@ public function getMutationEntityConfig($entityName)
289290
public function getQueryColumnConfig($entityName)
290291
{
291292
$config = $this->getQueryEntityConfig($entityName);
293+
292294
return $config['columnConfig'] ?? null;
293295
}
294296

Diff for: src/Configuration/Dao.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
*
66
* This source file is available under two different licenses:
77
* - GNU General Public License version 3 (GPLv3)
8-
* - Pimcore Enterprise License (PEL)
8+
* - Pimcore Commercial License (PCL)
99
* Full copyright and license information is available in
1010
* LICENSE.md which is distributed with this source code.
1111
*
1212
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
13-
* @license http://www.pimcore.org/license GPLv3 and PEL
13+
* @license http://www.pimcore.org/license GPLv3 and PCL
1414
*/
1515

1616
namespace Pimcore\Bundle\DataHubBundle\Configuration;
@@ -22,6 +22,7 @@
2222

2323
/**
2424
* Class Dao
25+
*
2526
* @package Pimcore\Bundle\DataHubBundle\Configuration
2627
*/
2728
class Dao extends AbstractDao
@@ -194,6 +195,7 @@ private static function deleteFolderRec(&$config, $path): void
194195
/**
195196
* @param $who
196197
* @param $to
198+
*
197199
* @throws \Exception
198200
*/
199201
public static function moveConfiguration($who, $to): void
@@ -212,6 +214,7 @@ public static function moveConfiguration($who, $to): void
212214
/**
213215
* @param $who
214216
* @param $to
217+
*
215218
* @throws \Exception
216219
*/
217220
public static function moveFolder($who, $to): void
@@ -225,6 +228,7 @@ public static function moveFolder($who, $to): void
225228
/**
226229
* @param $who
227230
* @param $to
231+
*
228232
* @throws \Exception
229233
*/
230234
private static function moveFolderRec($who, $to): void
@@ -253,6 +257,7 @@ private static function moveFolderRec($who, $to): void
253257
/**
254258
* @param $old
255259
* @param $now
260+
*
256261
* @throws \Exception
257262
*/
258263
private static function moveSubfolders($old, $now): void

Diff for: src/Configuration/Workspace/AbstractWorkspace.php

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<?php
2+
23
/**
34
* Pimcore
45
*
56
* This source file is available under two different licenses:
67
* - GNU General Public License version 3 (GPLv3)
7-
* - Pimcore Enterprise License (PEL)
8+
* - Pimcore Commercial License (PCL)
89
* Full copyright and license information is available in
910
* LICENSE.md which is distributed with this source code.
1011
*
11-
* @category Pimcore
12-
* @package User
13-
*
14-
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
15-
* @license http://www.pimcore.org/license GPLv3 and PEL
12+
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
13+
* @license http://www.pimcore.org/license GPLv3 and PCL
1614
*/
1715

1816
namespace Pimcore\Bundle\DataHubBundle\Configuration\Workspace;
@@ -59,7 +57,6 @@ class AbstractWorkspace extends AbstractModel
5957
*/
6058
public $delete = false;
6159

62-
6360
/**
6461
* @return string
6562
*/
@@ -124,8 +121,6 @@ public function setCreate(bool $create): void
124121
$this->create = $create;
125122
}
126123

127-
128-
129124
/**
130125
* @return bool
131126
*/

Diff for: src/Configuration/Workspace/Asset.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<?php
2+
23
/**
34
* Pimcore
45
*
56
* This source file is available under two different licenses:
67
* - GNU General Public License version 3 (GPLv3)
7-
* - Pimcore Enterprise License (PEL)
8+
* - Pimcore Commercial License (PCL)
89
* Full copyright and license information is available in
910
* LICENSE.md which is distributed with this source code.
1011
*
11-
* @category Pimcore
12-
* @package User
13-
*
14-
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
15-
* @license http://www.pimcore.org/license GPLv3 and PEL
12+
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
13+
* @license http://www.pimcore.org/license GPLv3 and PCL
1614
*/
1715

1816
namespace Pimcore\Bundle\DataHubBundle\Configuration\Workspace;

Diff for: src/Configuration/Workspace/Dao.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<?php
2+
23
/**
34
* Pimcore
45
*
56
* This source file is available under two different licenses:
67
* - GNU General Public License version 3 (GPLv3)
7-
* - Pimcore Enterprise License (PEL)
8+
* - Pimcore Commercial License (PCL)
89
* Full copyright and license information is available in
910
* LICENSE.md which is distributed with this source code.
1011
*
11-
* @category Pimcore
12-
* @package User
13-
*
14-
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
15-
* @license http://www.pimcore.org/license GPLv3 and PEL
12+
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
13+
* @license http://www.pimcore.org/license GPLv3 and PCL
1614
*/
1715

1816
namespace Pimcore\Bundle\DataHubBundle\Configuration\Workspace;

Diff for: src/Configuration/Workspace/DataObject.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<?php
2+
23
/**
34
* Pimcore
45
*
56
* This source file is available under two different licenses:
67
* - GNU General Public License version 3 (GPLv3)
7-
* - Pimcore Enterprise License (PEL)
8+
* - Pimcore Commercial License (PCL)
89
* Full copyright and license information is available in
910
* LICENSE.md which is distributed with this source code.
1011
*
11-
* @category Pimcore
12-
* @package User
13-
*
14-
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
15-
* @license http://www.pimcore.org/license GPLv3 and PEL
12+
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
13+
* @license http://www.pimcore.org/license GPLv3 and PCL
1614
*/
1715

1816
namespace Pimcore\Bundle\DataHubBundle\Configuration\Workspace;

Diff for: src/Configuration/Workspace/Document.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<?php
2+
23
/**
34
* Pimcore
45
*
56
* This source file is available under two different licenses:
67
* - GNU General Public License version 3 (GPLv3)
7-
* - Pimcore Enterprise License (PEL)
8+
* - Pimcore Commercial License (PCL)
89
* Full copyright and license information is available in
910
* LICENSE.md which is distributed with this source code.
1011
*
11-
* @category Pimcore
12-
* @package User
13-
*
14-
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
15-
* @license http://www.pimcore.org/license GPLv3 and PEL
12+
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
13+
* @license http://www.pimcore.org/license GPLv3 and PCL
1614
*/
1715

1816
namespace Pimcore\Bundle\DataHubBundle\Configuration\Workspace;

0 commit comments

Comments
 (0)