From f7995779812b419150629a2c4ac1be6daf1cc54d Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 27 Feb 2026 12:40:01 +0100 Subject: [PATCH 1/5] update composer --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fea9d5e..c441785 100644 --- a/composer.json +++ b/composer.json @@ -12,9 +12,12 @@ } }, "require": { - "pimcore/pimcore": "^11.0 || ^12.0" + "pimcore/pimcore": "^2026.1" }, "extra": { + "branch-alias": { + "dev-2026.x": "2026.1.x-dev" + }, "pimcore": { "bundles": [ "Pimcore\\Bundle\\BundleGeneratorBundle\\PimcoreBundleGeneratorBundle" From 1e6ca4092df4ddf0484feb5148f3f3c7e3f9d84d Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Tue, 24 Mar 2026 15:12:46 +0100 Subject: [PATCH 2/5] Refactor Bundle.php.twig by removing unused code Removed unused interface and trait from Bundle.php.twig. --- src/Resources/skeleton/bundle/Bundle.php.twig | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/Resources/skeleton/bundle/Bundle.php.twig b/src/Resources/skeleton/bundle/Bundle.php.twig index 1ace2ac..bef3631 100644 --- a/src/Resources/skeleton/bundle/Bundle.php.twig +++ b/src/Resources/skeleton/bundle/Bundle.php.twig @@ -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 %} From 5fd187060758d2bb241113d455c4f4d17e355040 Mon Sep 17 00:00:00 2001 From: Ji Jia Jia Date: Tue, 24 Mar 2026 15:20:36 +0100 Subject: [PATCH 3/5] POCL license --- .php_cs.dist => .php-cs-fixer.dist | 43 ++++++++++++++---------------- 1 file changed, 20 insertions(+), 23 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist (57%) diff --git a/.php_cs.dist b/.php-cs-fixer.dist similarity index 57% rename from .php_cs.dist rename to .php-cs-fixer.dist index fd1e5dd..77a97a1 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist @@ -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, @@ -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; From b128ac9efc020c3f41f91c55c373121ee1dd017e Mon Sep 17 00:00:00 2001 From: Ji Jia Jia Date: Tue, 24 Mar 2026 15:22:29 +0100 Subject: [PATCH 4/5] csfixer --- .github/workflows/new-php-style.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/new-php-style.yml b/.github/workflows/new-php-style.yml index c936614..bfd1b37 100644 --- a/.github/workflows/new-php-style.yml +++ b/.github/workflows/new-php-style.yml @@ -1,12 +1,21 @@ -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@reusable-workflows - with: - head_ref: ${{ github.ref_name }} - secrets: - PHP_CS_FIXER_GITHUB_TOKEN: ${{ secrets.PHP_CS_FIXER_GITHUB_TOKEN }} \ No newline at end of file + php-style: + uses: pimcore/workflows-collection-public/.github/workflows/reusable-php-cs-fixer.yaml@main + if: github.repository_owner == 'pimcore' + secrets: + PHP_CS_FIXER_GITHUB_TOKEN: ${{ secrets.PHP_CS_FIXER_GITHUB_TOKEN }} + with: + head_ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + config_file: .php-cs-fixer.dist.php From be6719e6a64be940f465aa3daed324d7bb431263 Mon Sep 17 00:00:00 2001 From: Ji Jia Jia Date: Tue, 24 Mar 2026 15:23:55 +0100 Subject: [PATCH 5/5] remove js --- src/Generator/BundleGenerator.php | 6 ------ src/Resources/skeleton/js/pimcore/startup.js.twig | 14 -------------- 2 files changed, 20 deletions(-) delete mode 100644 src/Resources/skeleton/js/pimcore/startup.js.twig diff --git a/src/Generator/BundleGenerator.php b/src/Generator/BundleGenerator.php index 5dfedbd..4b61b13 100644 --- a/src/Generator/BundleGenerator.php +++ b/src/Generator/BundleGenerator.php @@ -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 - ); } } diff --git a/src/Resources/skeleton/js/pimcore/startup.js.twig b/src/Resources/skeleton/js/pimcore/startup.js.twig deleted file mode 100644 index e52399e..0000000 --- a/src/Resources/skeleton/js/pimcore/startup.js.twig +++ /dev/null @@ -1,14 +0,0 @@ -pimcore.registerNS("pimcore.plugin.{{ bundle }}"); - -pimcore.plugin.{{ bundle }} = Class.create({ - - initialize: function () { - document.addEventListener(pimcore.events.pimcoreReady, this.pimcoreReady.bind(this)); - }, - - pimcoreReady: function (e) { - // alert("{{ bundle }} ready!"); - } -}); - -var {{ bundle }}Plugin = new pimcore.plugin.{{ bundle }}();