Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/new-php-style.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: PHP Style
name: "PHP-CS-Fixer"

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

permissions:
contents: write

jobs:
php-style:
uses: pimcore/workflows-collection-public/.github/workflows/reusable-php-style.yaml@main
with:
head_ref: ${{ github.ref_name }}
secrets:
PHP_CS_FIXER_GITHUB_TOKEN: ${{ secrets.PHP_CS_FIXER_GITHUB_TOKEN }}
PHP_CS_FIXER_GITHUB_TOKEN: ${{ secrets.PHP_CS_FIXER_GITHUB_TOKEN }}
43 changes: 20 additions & 23 deletions .php_cs.dist → .php-cs-fixer.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,38 @@ $finder = PhpCsFixer\Finder::create()
// do not fix views
->notName('*.html.php');

return PhpCsFixer\Config::create()
->setRules([
$config = new PhpCsFixer\Config();
$config->setRules([
'@PSR1' => true,
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],

'header_comment' => [
'commentType' => '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'
],
'comment_type' => 'PHPDoc',
'header' =>
'This source file is available under the terms of the' . PHP_EOL .
'Pimcore Open Core License (POCL)' . 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 (https://www.pimcore.com)' . PHP_EOL .
' @license Pimcore Open Core License (POCL)'
],

// keep aligned = and => operators as they are: do not force aligning, but do not remove it
'binary_operator_spaces' => ['align_double_arrow' => null, 'align_equals' => null],

'blank_line_before_return' => true,
'blank_line_before_statement' => true,
'encoding' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'single_line_comment_style' => true,
'lowercase_cast' => true,
'magic_constant_casing' => true,
'method_argument_space' => ['ensure_fully_multiline' => false],
'method_separation' => true,
'method_argument_space' => ['on_multiline' => 'ignore'],
'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_consecutive_blank_lines' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_short_bool_cast' => true,
Expand All @@ -67,5 +62,7 @@ return PhpCsFixer\Config::create()
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
])
->setFinder($finder);
]);

$config->setFinder($finder);
return $config;
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
}
},
"require": {
"pimcore/pimcore": "^11.0 || ^12.0"
"pimcore/pimcore": "^2026.1"
},
Comment thread
kingjia90 marked this conversation as resolved.
"extra": {
"branch-alias": {
"dev-2026.x": "2026.1.x-dev"
Comment thread
kingjia90 marked this conversation as resolved.
},
"pimcore": {
"bundles": [
"Pimcore\\Bundle\\BundleGeneratorBundle\\PimcoreBundleGeneratorBundle"
Expand Down
6 changes: 0 additions & 6 deletions src/Generator/BundleGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,5 @@ public function generateBundle(Bundle $bundle)
$dir.'/config/pimcore/'.$routingFilename, $parameters
);
}

$this->renderFile(
'js/pimcore/startup.js.twig',
$dir . '/public/js/pimcore/startup.js',
$parameters
);
}
}
17 changes: 1 addition & 16 deletions src/Resources/skeleton/bundle/Bundle.php.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,12 @@

{% block use_statements %}
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
use Pimcore\Extension\Bundle\PimcoreBundleAdminClassicInterface;
use Pimcore\Extension\Bundle\Traits\BundleAdminClassicTrait;
{% endblock use_statements %}

{% block class_definition %}
class {{ bundle }} extends AbstractPimcoreBundle implements PimcoreBundleAdminClassicInterface
class {{ bundle }} extends AbstractPimcoreBundle
{% endblock class_definition %}

{% block class_body %}
use BundleAdminClassicTrait;

public function getPath(): string
{
return \dirname(__DIR__);
}

public function getJsPaths(): array
{
return [
'/bundles/{{ bundle_basename|lower }}/js/pimcore/startup.js'
];
}

{% endblock class_body %}
Comment thread
kingjia90 marked this conversation as resolved.
14 changes: 0 additions & 14 deletions src/Resources/skeleton/js/pimcore/startup.js.twig

This file was deleted.

Loading