From d56bc540b0086b07c59c1ca1f796cfa50c8bdbc1 Mon Sep 17 00:00:00 2001 From: berfinyuksel <99557970+berfinyuksel@users.noreply.github.com> Date: Fri, 31 Jul 2026 12:50:02 +0200 Subject: [PATCH 1/2] Fix php-cs-fixer push trigger: resolve branch ref and repository per event (#150) --- .github/workflows/php-cs-fixer.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php-cs-fixer.yaml b/.github/workflows/php-cs-fixer.yaml index 3ae73eb..dc1a744 100644 --- a/.github/workflows/php-cs-fixer.yaml +++ b/.github/workflows/php-cs-fixer.yaml @@ -18,6 +18,6 @@ jobs: 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 }} + head_ref: ${{ github.head_ref || github.ref_name }} + repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} config_file: .php-cs-fixer.dist.php \ No newline at end of file From 5dd9aab61762153aa630d184aedd02a6aca820db Mon Sep 17 00:00:00 2001 From: berfinyuksel <99557970+berfinyuksel@users.noreply.github.com> Date: Fri, 31 Jul 2026 10:50:16 +0000 Subject: [PATCH 2/2] Apply php-cs-fixer changes --- src/Contract/Lib/FileResolverContract.php | 20 +++++++++++-------- .../Lib/FileResolverContractInterface.php | 5 +++++ src/Contract/Lib/VersionResolverContract.php | 2 +- .../Lib/VersionResolverContractInterface.php | 3 +++ .../Document/DocumentResolverContract.php | 1 - src/Lib/Helper/SystemConfigResolver.php | 2 +- .../DataObjectServiceResolverInterface.php | 1 - 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/Contract/Lib/FileResolverContract.php b/src/Contract/Lib/FileResolverContract.php index b2b8217..f7edc0f 100644 --- a/src/Contract/Lib/FileResolverContract.php +++ b/src/Contract/Lib/FileResolverContract.php @@ -13,38 +13,42 @@ namespace Pimcore\Bundle\StaticResolverBundle\Contract\Lib; -use DateInterval; use League\Flysystem\FilesystemException; use League\Flysystem\FilesystemOperator; -use Pimcore\Cache; use Pimcore\File; class FileResolverContract implements FileResolverContractInterface { - public function getValidFilename(string $tmpFilename, ?string $language = null, string $replacement = '-'): string { + public function getValidFilename(string $tmpFilename, ?string $language = null, string $replacement = '-'): string + { return File::getValidFilename($tmpFilename, $language, $replacement); } - public function putPhpFile(string $path, string $data): void { + public function putPhpFile(string $path, string $data): void + { File::putPhpFile($path, $data); } - public function getContext() { + public function getContext() + { return File::getContext(); } - public function setContext($context): void { + public function setContext($context): void + { File::setContext($context); } - public function getLocalTempFilePath(?string $fileExtension = null, bool $keep = false): string { + public function getLocalTempFilePath(?string $fileExtension = null, bool $keep = false): string + { return File::getLocalTempFilePath($fileExtension, $keep); } /** * @throws FilesystemException */ - public function recursiveDeleteEmptyDirs(FilesystemOperator $storage, string $storagePath): void { + public function recursiveDeleteEmptyDirs(FilesystemOperator $storage, string $storagePath): void + { File::recursiveDeleteEmptyDirs($storage, $storagePath); } } diff --git a/src/Contract/Lib/FileResolverContractInterface.php b/src/Contract/Lib/FileResolverContractInterface.php index d464997..e4e992a 100644 --- a/src/Contract/Lib/FileResolverContractInterface.php +++ b/src/Contract/Lib/FileResolverContractInterface.php @@ -18,15 +18,20 @@ interface FileResolverContractInterface { public function getValidFilename(string $tmpFilename, ?string $language = null, string $replacement = '-'): string; + public function putPhpFile(string $path, string $data): void; + /** * @return null|resource */ public function getContext(); + /** * @param resource $context */ public function setContext($context): void; + public function getLocalTempFilePath(?string $fileExtension = null, bool $keep = false): string; + public function recursiveDeleteEmptyDirs(FilesystemOperator $storage, string $storagePath): void; } diff --git a/src/Contract/Lib/VersionResolverContract.php b/src/Contract/Lib/VersionResolverContract.php index b31a1f1..e250357 100644 --- a/src/Contract/Lib/VersionResolverContract.php +++ b/src/Contract/Lib/VersionResolverContract.php @@ -34,6 +34,6 @@ public function getRevision(): string public function getPlatformVersion(): ?string { - return Version::getPlatformVersion(); + return Version::getPlatformVersion(); } } diff --git a/src/Contract/Lib/VersionResolverContractInterface.php b/src/Contract/Lib/VersionResolverContractInterface.php index 49e5175..4240de6 100644 --- a/src/Contract/Lib/VersionResolverContractInterface.php +++ b/src/Contract/Lib/VersionResolverContractInterface.php @@ -16,7 +16,10 @@ interface VersionResolverContractInterface { public function getMajorVersion(): int; + public function getVersion(): string; + public function getRevision(): string; + public function getPlatformVersion(): ?string; } diff --git a/src/Contract/Models/Document/DocumentResolverContract.php b/src/Contract/Models/Document/DocumentResolverContract.php index e59b24b..bb0fa0a 100644 --- a/src/Contract/Models/Document/DocumentResolverContract.php +++ b/src/Contract/Models/Document/DocumentResolverContract.php @@ -76,5 +76,4 @@ public function setGetInheritedProperties(bool $getInheritedProperties): void { Document::setGetInheritedProperties($getInheritedProperties); } - } diff --git a/src/Lib/Helper/SystemConfigResolver.php b/src/Lib/Helper/SystemConfigResolver.php index d322dfa..6a42608 100644 --- a/src/Lib/Helper/SystemConfigResolver.php +++ b/src/Lib/Helper/SystemConfigResolver.php @@ -13,8 +13,8 @@ namespace Pimcore\Bundle\StaticResolverBundle\Lib\Helper; -use Pimcore\Helper\SystemConfig; use Pimcore\Config\LocationAwareConfigRepository; +use Pimcore\Helper\SystemConfig; /** * @internal diff --git a/src/Models/DataObject/DataObjectServiceResolverInterface.php b/src/Models/DataObject/DataObjectServiceResolverInterface.php index 5c92e48..36ced0d 100644 --- a/src/Models/DataObject/DataObjectServiceResolverInterface.php +++ b/src/Models/DataObject/DataObjectServiceResolverInterface.php @@ -47,7 +47,6 @@ public function enrichLayoutPermissions( ?User $user = null ): void; - public function getCalculatedFieldValue( FieldCollectionData|ObjectbrickData|Concrete $object, ?CalculatedValue $data,