From 0272e33728fa8ef330250f8182294d3f8cce25a2 Mon Sep 17 00:00:00 2001 From: Marc Heying Date: Fri, 8 Mar 2024 13:39:57 +0100 Subject: [PATCH 1/3] Apply codestyle from current config with friendsofphp/php-cs-fixer:v3.51.0 --- src/CacheWarmer/SerializerCacheWarmer.php | 2 +- src/DependencyInjection/ExerciseHTMLPurifierExtension.php | 2 +- src/HTMLPurifierConfigFactory.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CacheWarmer/SerializerCacheWarmer.php b/src/CacheWarmer/SerializerCacheWarmer.php index 4e7fe7cf..932bd9b0 100644 --- a/src/CacheWarmer/SerializerCacheWarmer.php +++ b/src/CacheWarmer/SerializerCacheWarmer.php @@ -37,7 +37,7 @@ public function __construct(array $paths, array $profiles, HTMLPurifiersRegistry $this->filesystem = $filesystem; } - public function warmUp($cacheDir, string $buildDir = null): array + public function warmUp($cacheDir, ?string $buildDir = null): array { foreach ($this->paths as $path) { $this->filesystem->remove($path); // clean previous cache diff --git a/src/DependencyInjection/ExerciseHTMLPurifierExtension.php b/src/DependencyInjection/ExerciseHTMLPurifierExtension.php index fc55d169..861feca3 100644 --- a/src/DependencyInjection/ExerciseHTMLPurifierExtension.php +++ b/src/DependencyInjection/ExerciseHTMLPurifierExtension.php @@ -113,7 +113,7 @@ private static function resolveProfileInheritance(string $parent, array $configs $resolved[$parent]['blank_elements'] = $configs[$parent]['blank_elements']; } - private static function getResolvedConfig(string $parameter, array $parents, array $definition = null): array + private static function getResolvedConfig(string $parameter, array $parents, ?array $definition = null): array { if (null !== $definition) { return array_filter(array_merge( diff --git a/src/HTMLPurifierConfigFactory.php b/src/HTMLPurifierConfigFactory.php index 9ba5d1aa..6eac59fb 100644 --- a/src/HTMLPurifierConfigFactory.php +++ b/src/HTMLPurifierConfigFactory.php @@ -24,7 +24,7 @@ class HTMLPurifierConfigFactory public static function create( string $profile, array $configArray, - \HTMLPurifier_Config $defaultConfig = null, + ?\HTMLPurifier_Config $defaultConfig = null, array $parents = [], array $attributes = [], array $elements = [], From d3a203c6179469e5f15b8dd200fa960e4ab9a5a5 Mon Sep 17 00:00:00 2001 From: Marc Heying Date: Fri, 8 Mar 2024 13:39:57 +0100 Subject: [PATCH 2/3] Fix composer lowest build relates to https://github.com/symfony/symfony/pull/52846 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 66c7335c..95e829f4 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require-dev": { "symfony/form": "^5.4 || ^6.0 || ^7.0", - "symfony/phpunit-bridge": "^7.0", + "symfony/phpunit-bridge": "^7.0.1", "twig/twig": "^2.4.4 || ^3.0" }, "autoload": { From cbeb56acb55b4bee64263a57c7cfa15205df6425 Mon Sep 17 00:00:00 2001 From: Marc Heying Date: Fri, 8 Mar 2024 13:50:05 +0100 Subject: [PATCH 3/3] update to latest action version and get rid of node deprecations warnings like > The following actions uses node12 which is deprecated and will be forced to run on node16 [...] --- .github/workflows/qa.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index 4abccde0..15519dc3 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP, extensions and composer with shivammathur/setup-php uses: shivammathur/setup-php@v2 @@ -58,7 +58,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP, extensions and composer with shivammathur/setup-php uses: shivammathur/setup-php@v2