From d0073075bf94f0d7d00fd2851ac6019ebee23dc0 Mon Sep 17 00:00:00 2001 From: jcPimcore Date: Thu, 5 Mar 2026 09:57:14 +0100 Subject: [PATCH 01/14] [Task] Remove ExtJS From 9d05b9c89e24d9da8c76d35eab28af0eb629a935 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Wed, 11 Mar 2026 09:21:37 +0100 Subject: [PATCH 02/14] remove AdminBundle --- .github/ci/files/config/packages/security.yaml | 13 ++++--------- src/PimcoreStaticResolverBundle.php | 6 +----- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/ci/files/config/packages/security.yaml b/.github/ci/files/config/packages/security.yaml index 68372de..f141726 100644 --- a/.github/ci/files/config/packages/security.yaml +++ b/.github/ci/files/config/packages/security.yaml @@ -4,6 +4,7 @@ security: id: Pimcore\Security\User\UserProvider firewalls: + pimcore_studio: '%pimcore_studio_backend.firewall_settings%' dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false @@ -15,16 +16,10 @@ security: http_basic: ~ access_control: - # Pimcore admin ACl // DO NOT CHANGE! - - { path: ^/admin/settings/display-custom-logo, roles: PUBLIC_ACCESS } - - { path: ^/admin/login/2fa-verify, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } - - { path: ^/admin/login/2fa-setup, roles: ROLE_PIMCORE_USER } - - { path: ^/admin/login/2fa, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } - - { path: ^/admin/login$, roles: PUBLIC_ACCESS } - - { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS } - - { path: ^/admin, roles: ROLE_PIMCORE_USER } + - { path: ^/pimcore-studio/api/(docs|docs/json|translations|user/reset-password)$, roles: PUBLIC_ACCESS } + - { path: ^/pimcore-studio/api, roles: ROLE_PIMCORE_USER } - { path: ^/asset/webdav, roles: ROLE_PIMCORE_USER } role_hierarchy: # Pimcore admin // DO NOT CHANGE! - ROLE_PIMCORE_ADMIN: [ROLE_PIMCORE_USER] \ No newline at end of file + ROLE_PIMCORE_ADMIN: [ROLE_PIMCORE_USER] diff --git a/src/PimcoreStaticResolverBundle.php b/src/PimcoreStaticResolverBundle.php index 115b5b8..df73c8b 100644 --- a/src/PimcoreStaticResolverBundle.php +++ b/src/PimcoreStaticResolverBundle.php @@ -16,14 +16,10 @@ use function dirname; use Pimcore\Bundle\StaticResolverBundle\DependencyInjection\PimcoreStaticResolverExtension; use Pimcore\Extension\Bundle\AbstractPimcoreBundle; -use Pimcore\Extension\Bundle\PimcoreBundleAdminClassicInterface; -use Pimcore\Extension\Bundle\Traits\BundleAdminClassicTrait; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -class PimcoreStaticResolverBundle extends AbstractPimcoreBundle implements PimcoreBundleAdminClassicInterface +class PimcoreStaticResolverBundle extends AbstractPimcoreBundle { - use BundleAdminClassicTrait; - public function getContainerExtension(): ExtensionInterface { return new PimcoreStaticResolverExtension(); From ed1449d1dcadfd30ab4a544478929c80ddd85dd6 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 08:53:43 +0100 Subject: [PATCH 03/14] update stan --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 616b1cf..d55ebd6 100644 --- a/composer.json +++ b/composer.json @@ -28,12 +28,12 @@ "friendsofphp/proxy-manager-lts": "^1" }, "require-dev": { - "phpstan/phpstan": "1.12.15", - "phpstan/phpstan-symfony": "^1.2.20", + "phpstan/phpstan": "2.1.40", + "phpstan/phpstan-symfony": "^2.1", "phpunit/phpunit": "^10.2", - "codeception/codeception": "^5.0.10", - "codeception/module-symfony":"^3.1.1", - "codeception/phpunit-wrapper": "^9", + "codeception/codeception": "^5.3.1", + "codeception/module-symfony":"^3.7.1", + "codeception/phpunit-wrapper": "^10", "codeception/module-asserts": "^2", "fakerphp/faker": "^1.23" }, From 15eb5352efbeb48c6699aa251efae79552b4d638 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 08:55:48 +0100 Subject: [PATCH 04/14] update stan --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d55ebd6..0824edc 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "require-dev": { "phpstan/phpstan": "2.1.40", - "phpstan/phpstan-symfony": "^2.1", + "phpstan/phpstan-symfony": "^2.0", "phpunit/phpunit": "^10.2", "codeception/codeception": "^5.3.1", "codeception/module-symfony":"^3.7.1", From 877d0940390a5a7dd73bc616103eae565fa10bf7 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 08:57:47 +0100 Subject: [PATCH 05/14] Fix: stan --- phpstan.neon | 2 -- 1 file changed, 2 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index afac18f..82642e6 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,8 +1,6 @@ parameters: level: 6 reportUnmatchedIgnoredErrors: false - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false paths: - src bootstrapFiles: From 53d36bc2b90bf81a4ba928c5a0e85574ef62cade Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 11:57:00 +0100 Subject: [PATCH 06/14] add ignore errors --- phpstan-baseline.neon | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9738db5..2858e42 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -28,4 +28,12 @@ parameters: - message: "#^Unable to resolve the template type RealObjectType in call to method ProxyManager\\\\Factory\\\\RemoteObjectFactory\\:\\:createProxy\\(\\)$#" count: 2 - path: src/Proxy/Factory/RemoteObject/RemoteObjectFactory.php \ No newline at end of file + path: src/Proxy/Factory/RemoteObject/RemoteObjectFactory.php + + - + message: "#^Method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\.* has parameter .* with no value type specified in iterable type array\\.$#" + path: Contract/* + + - + message: "#^Method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\.* return type has no value type specified in iterable type array\\.$#" + path: Contract/* \ No newline at end of file From d111b9efc3b9d4967a13e6f0a483ccc0d1ad3d86 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 12:02:42 +0100 Subject: [PATCH 07/14] add ignore errors --- phpstan-baseline.neon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 2858e42..23d9aea 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -32,8 +32,8 @@ parameters: - message: "#^Method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\.* has parameter .* with no value type specified in iterable type array\\.$#" - path: Contract/* + path: ** - message: "#^Method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\.* return type has no value type specified in iterable type array\\.$#" - path: Contract/* \ No newline at end of file + path: ** \ No newline at end of file From 8ba58ab1ab8f2f60109c780d16f8ddba31269433 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 12:08:46 +0100 Subject: [PATCH 08/14] Fix: stan --- src/Proxy/Adapter/Remote/StrictObjectAdapter.php | 2 +- src/Proxy/Events/ProxyEvent.php | 4 ++-- src/Proxy/Events/ProxyPreInterceptor.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Proxy/Adapter/Remote/StrictObjectAdapter.php b/src/Proxy/Adapter/Remote/StrictObjectAdapter.php index 202d4a6..e0c0ef3 100644 --- a/src/Proxy/Adapter/Remote/StrictObjectAdapter.php +++ b/src/Proxy/Adapter/Remote/StrictObjectAdapter.php @@ -64,6 +64,6 @@ private function methodIsPublic(string $method): bool // @codeCoverageIgnoreEnd } - return !(!is_object($reflection) || !$reflection->isPublic()); + return $reflection->isPublic(); } } diff --git a/src/Proxy/Events/ProxyEvent.php b/src/Proxy/Events/ProxyEvent.php index 2407b27..259891e 100644 --- a/src/Proxy/Events/ProxyEvent.php +++ b/src/Proxy/Events/ProxyEvent.php @@ -81,7 +81,7 @@ private function checkReturnType(mixed $response): void $returnType = $method->getReturnType(); - if ($response === null && $returnType?->allowsNull()) { + if ($response === null && $returnType->allowsNull()) { return; } @@ -137,7 +137,7 @@ private function addSpecialTypes(array $returnTypeArray): array * @return array */ private function getTypeArray( - ReflectionIntersectionType|ReflectionNamedType|ReflectionUnionType|null $returnType + \ReflectionType|null $returnType ): array { $returnTypeArray = []; if ($returnType instanceof ReflectionUnionType || $returnType instanceof ReflectionIntersectionType) { diff --git a/src/Proxy/Events/ProxyPreInterceptor.php b/src/Proxy/Events/ProxyPreInterceptor.php index 55f6ec4..43a16ed 100644 --- a/src/Proxy/Events/ProxyPreInterceptor.php +++ b/src/Proxy/Events/ProxyPreInterceptor.php @@ -99,7 +99,7 @@ private function checkReturnType(mixed $response): void $returnType = $method->getReturnType(); - if ($response === null && $returnType?->allowsNull()) { + if ($response === null && $returnType->allowsNull()) { return; } @@ -155,7 +155,7 @@ private function addSpecialTypes(array $returnTypeArray): array * @return array */ private function getTypeArray( - ReflectionIntersectionType|ReflectionNamedType|ReflectionUnionType|null $returnType + \ReflectionType|null $returnType ): array { $returnTypeArray = []; if ($returnType instanceof ReflectionUnionType || $returnType instanceof ReflectionIntersectionType) { From 96d08f69ac9204179b7838201ce89eab14f58db0 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 12:14:39 +0100 Subject: [PATCH 09/14] Fix: stan --- phpstan-baseline.neon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 23d9aea..89a46c1 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -6,7 +6,7 @@ parameters: path: src/Proxy/Events/ProxyEvent.php - - message: "#^Parameter \\#1 \\$returnType of method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\Proxy\\\\Events\\\\ProxyEvent\\:\\:getTypeArray\\(\\) expects ReflectionIntersectionType\\|ReflectionNamedType\\|ReflectionUnionType\\|null, ReflectionType\\|null given\\.$#" + message: "#^Parameter \\#1 \\$returnType of method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\Proxy\\\\Events\\\\ProxyEvent\\:\\:getTypeArray\\(\\) expects ReflectionIntersectionType\\|ReflectionNamedType\\|ReflectionUnionType\\|null, ReflectionType(\\|null)? given\\.$#" count: 1 path: src/Proxy/Events/ProxyEvent.php @@ -16,7 +16,7 @@ parameters: path: src/Proxy/Events/ProxyPreInterceptor.php - - message: "#^Parameter \\#1 \\$returnType of method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\Proxy\\\\Events\\\\ProxyPreInterceptor\\:\\:getTypeArray\\(\\) expects ReflectionIntersectionType\\|ReflectionNamedType\\|ReflectionUnionType\\|null, ReflectionType\\|null given\\.$#" + message: "#^Parameter \\#1 \\$returnType of method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\Proxy\\\\Events\\\\ProxyPreInterceptor\\:\\:getTypeArray\\(\\) expects ReflectionIntersectionType\\|ReflectionNamedType\\|ReflectionUnionType\\|null, ReflectionType(\\|null)? given\\.$#" count: 1 path: src/Proxy/Events/ProxyPreInterceptor.php From 2a18a3b55b8160f4e853232f41569293992e87e8 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 12:17:14 +0100 Subject: [PATCH 10/14] Fix: stan --- phpstan-baseline.neon | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 89a46c1..baed8d1 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -30,6 +30,10 @@ parameters: count: 2 path: src/Proxy/Factory/RemoteObject/RemoteObjectFactory.php + - + message: "#^Method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\DependencyInjection\\\\Configuration\\:\\:getConfigTreeBuilder\\(\\) return type with generic class Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\TreeBuilder does not specify its types\\: T$#" + path: DependencyInjection/Configuration.php + - message: "#^Method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\.* has parameter .* with no value type specified in iterable type array\\.$#" path: ** From 44b49f3729915e5ea7540b1fba282d375683e562 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 12:19:39 +0100 Subject: [PATCH 11/14] Fix: stan --- phpstan-baseline.neon | 1 + 1 file changed, 1 insertion(+) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index baed8d1..7281640 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -32,6 +32,7 @@ parameters: - message: "#^Method Pimcore\\\\Bundle\\\\StaticResolverBundle\\\\DependencyInjection\\\\Configuration\\:\\:getConfigTreeBuilder\\(\\) return type with generic class Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\TreeBuilder does not specify its types\\: T$#" + count: 1 path: DependencyInjection/Configuration.php - From 6c73cec236af291a958df86d40cc22c09a2908ee Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 12:25:29 +0100 Subject: [PATCH 12/14] Fix: stan --- src/DependencyInjection/Configuration.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 5634938..d10d03b 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -25,6 +25,8 @@ class Configuration implements ConfigurationInterface { /** * {@inheritdoc} + * + * @return TreeBuilder */ public function getConfigTreeBuilder(): TreeBuilder { From 0eccdcb330d3b2e1de02799f8d38838968b5b891 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 12:28:46 +0100 Subject: [PATCH 13/14] Fix: stan --- src/DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index d10d03b..1239803 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -26,7 +26,7 @@ class Configuration implements ConfigurationInterface /** * {@inheritdoc} * - * @return TreeBuilder + * @return TreeBuilder */ public function getConfigTreeBuilder(): TreeBuilder { From c3cc1c7f69272b3d3d5e6c731c1ef9fda943fe6b Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Fri, 13 Mar 2026 12:40:38 +0100 Subject: [PATCH 14/14] Fix: stan --- src/DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 1239803..ea782e7 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -26,7 +26,7 @@ class Configuration implements ConfigurationInterface /** * {@inheritdoc} * - * @return TreeBuilder + * @return TreeBuilder<'array'> */ public function getConfigTreeBuilder(): TreeBuilder {