Skip to content

Commit

Permalink
Merge branch '1.7' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Corepex committed May 2, 2024
2 parents 0551929 + 503e028 commit e5e1424
Show file tree
Hide file tree
Showing 303 changed files with 926 additions and 1,422 deletions.
@@ -1,19 +1,26 @@
name: PHP Style
name: "PHP-CS-Fixer"

on: [push]
on:
push:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"

permissions:
contents: read

jobs:
php-cs-fixer:
permissions:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:2.19.0
with:
args: --config=.php_cs.dist --allow-risky yes
uses: docker://oskarstark/php-cs-fixer-ga:latest

- uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -11,7 +11,7 @@ Thumbs.db

# PHP-CS-Fixer
/.php_cs
/.php_cs.cache
/.php-cs-fixer.cache

# composer
/composer.lock
Expand Down
79 changes: 79 additions & 0 deletions .php-cs-fixer.dist.php
@@ -0,0 +1,79 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])

->exclude([
__DIR__ . '/tests/_output',
__DIR__ . '/tests/_support/_generated',
])
;

// do not enable self_accessor as it breaks pimcore models relying on get_called_class()
$config = new PhpCsFixer\Config();
$config->setRules([
'@PSR1' => true,
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'list_syntax' => ['syntax' => 'short'],

'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => 'Pimcore' . PHP_EOL . 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 and PCL'
],

'blank_line_before_statement' => true,
'encoding' => true,
'function_typehint_space' => true,
'single_line_comment_style' => true,
'lowercase_cast' => true,
'magic_constant_casing' => true,
'method_argument_space' => ['on_multiline' => 'ignore'],
'class_attributes_separation' => true,
'native_function_casing' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'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,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'phpdoc_indent' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'return_type_declaration' => true,
'short_scalar_cast' => true,
'single_blank_line_before_namespace' => true,
'single_quote' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline' => true,
'whitespace_after_comma_in_array' => true,
]);

$config->setFinder($finder);
return $config;
71 changes: 0 additions & 71 deletions .php_cs.dist

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -18,7 +18,7 @@ There are a few necessary steps before we can accept a pull request:

* [Fork us!](https://help.github.com/articles/fork-a-repo/)
* Select the right branch. main(e.g. 1.x) for features and improvements or latest maintenance branch for bug fixes (e.g. 1.0)
* Code! Follow the coding standards defined [here](https://github.com/pimcore/data-hub/blob/master/.php_cs.dist).
* Code! Follow the coding standards defined [here](https://github.com/pimcore/data-hub/blob/1.x/.php-cs-fixer.dist.php).
* [Send a pull request](https://help.github.com/articles/using-pull-requests/) from your fork’s branch to our `master` branch.
* [Sign the CLA](https://cla-assistant.io/pimcore/data-hub) - see also below.

Expand Down
13 changes: 7 additions & 6 deletions SECURITY.md
Expand Up @@ -2,20 +2,21 @@

## Reporting a Vulnerability

If you think that you have found a security issue,
don’t use the bug tracker and don’t publish it publicly.
Instead, all security issues must be reported via 📫 to [security-issue@pimcore.com](mailto:security-issue@pimcore.com).
If you think that you have found a security issue,
don’t use the bug tracker and don’t publish it publicly.
Instead, all security issues must be reported via a private vulnerability report.

Please follow the [instructions](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) to submit a private report.


## Resolving Process
Every submitted security issue is handled with top priority by following these steps:
Every submitted security issue is handled with top priority by following these steps:

1. Confirm the vulnerability
2. Determine the severity
3. Contact reporter
4. Work on a patch
5. Get a CVE identification number (may be done by the reporter or a security service provider)
6. Patch reviewing
6. Patch reviewing
7. Tagging a new release for supported versions
8. Publish security announcement

5 changes: 0 additions & 5 deletions src/Command/Configuration/MigrateLegacyConfig.php
Expand Up @@ -23,9 +23,6 @@

class MigrateLegacyConfig extends AbstractCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
{
$this
Expand Down Expand Up @@ -67,8 +64,6 @@ private function migrateConfiguration(string $fileName, string $scope): void

/**
*
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null
*
Expand Down
5 changes: 0 additions & 5 deletions src/Command/Configuration/RebuildWorkspacesCommand.php
Expand Up @@ -25,9 +25,6 @@

class RebuildWorkspacesCommand extends AbstractCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
{
$this
Expand All @@ -43,8 +40,6 @@ protected function configure()

/**
*
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null
*
Expand Down
6 changes: 1 addition & 5 deletions src/Command/GraphQL/RebuildDefinitionsCommand.php
Expand Up @@ -24,9 +24,6 @@

class RebuildDefinitionsCommand extends AbstractCommand
{
/**
* {@inheritDoc}
*/
protected function configure()
{
$this
Expand All @@ -42,8 +39,6 @@ protected function configure()

/**
*
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int
*
Expand All @@ -70,6 +65,7 @@ public function execute(InputInterface $input, OutputInterface $output)
$config = Configuration::getByName($endpoint);
if (!$config) {
$this->output->writeln('<error>Could not find config: ' . $endpoint . '</error>');

continue;
}

Expand Down
2 changes: 0 additions & 2 deletions src/Configuration.php
Expand Up @@ -316,7 +316,6 @@ public static function getList()
/**
* @param string $name
*
* @return Configuration|null
*/
public static function getByName($name): ?self
{
Expand Down Expand Up @@ -425,7 +424,6 @@ public function __clone(): void
/**
* @internal
*
* @param string $type
* @param ?User $user
*
* @return bool
Expand Down
3 changes: 0 additions & 3 deletions src/Configuration/Dao.php
Expand Up @@ -219,7 +219,6 @@ private function &getConfig()
/**
* get the list of configurations.
*
* @return array
*/
public function loadList(): array
{
Expand All @@ -242,7 +241,6 @@ public function loadList(): array
*
* TODO: remove this static function and rename "loadList" to "getList"
*
* @return array
*
*/
public static function getList(): array
Expand All @@ -253,7 +251,6 @@ public static function getList(): array
}

/**
* @param string $id
* @param mixed $data
*
* @return array[][][]
Expand Down
1 change: 0 additions & 1 deletion src/Configuration/DatahubConfigLocator.php
Expand Up @@ -28,7 +28,6 @@ class DatahubConfigLocator
/**
* Find config files for the given name (e.g. config)
*
* @param string $name
* @param array $params
*
* @return array
Expand Down

0 comments on commit e5e1424

Please sign in to comment.