Skip to content

Commit 4d1e998

Browse files
authored
bump: Infra 1.19 (#229)
* bump: Infra 1.19 * bump: update PHP version to 8.4 in build configuration * init fixtures update
1 parent e693b39 commit 4d1e998

File tree

19 files changed

+42
-26
lines changed

19 files changed

+42
-26
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
PHP_VERSION: ${{ matrix.php }}
3030
strategy:
3131
matrix:
32-
php: [ "8.3" ]
32+
php: [ "8.3", "8.4" ]
3333
dependencies: [ lowest, highest ]
3434
steps:
3535
-
@@ -48,12 +48,12 @@ jobs:
4848
-
4949
name: Composer install
5050
env:
51-
PHP_VERSION: 8.3
51+
PHP_VERSION: 8.4
5252
run: make composer/install
5353
-
5454
uses: shivammathur/setup-php@v2
5555
with:
56-
php-version: 8.3
56+
php-version: 8.4
5757
-
5858
name: Run build
5959
working-directory: tests/functional/site
@@ -76,12 +76,12 @@ jobs:
7676
-
7777
name: Composer install
7878
env:
79-
PHP_VERSION: 8.3
79+
PHP_VERSION: 8.4
8080
run: make composer/install
8181
-
8282
uses: shivammathur/setup-php@v2
8383
with:
84-
php-version: 8.3
84+
php-version: 8.4
8585
-
8686
name: Run init
8787
working-directory: tests/functional/init

bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
$skipBundles = [];
1717
if (getenv('YASSG_SKIP_BUNDLES') !== false) {
18-
$skipBundles = array_map(static fn (string $name): string => trim($name), explode(',', getenv('YASSG_SKIP_BUNDLES')));
18+
$skipBundles = array_map(static fn (string $name): string => mb_trim($name), explode(',', getenv('YASSG_SKIP_BUNDLES')));
1919
}
2020
$GLOBALS['YASSG_SKIP_BUNDLES'] = $skipBundles;
2121

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"require-dev": {
3535
"phpunit/phpunit": "^11.4 || ^12.0",
36-
"sigwin/infra": "~1.16.0"
36+
"sigwin/infra": "^1.19.0"
3737
},
3838
"autoload": {
3939
"psr-4": {

phpstan.baseline.neon

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
parameters:
22
ignoreErrors:
3+
-
4+
message: '#^Parameter \#2 \$string of function explode expects string, string\|false given\.$#'
5+
identifier: argument.type
6+
count: 1
7+
path: bootstrap.php
8+
39
-
410
message: '#^PHPDoc tag @var for variable \$composer has no value type specified in iterable type array\.$#'
511
identifier: missingType.iterableValue
@@ -456,6 +462,12 @@ parameters:
456462
count: 2
457463
path: src/Bridge/Twig/Extension/ImageExtension.php
458464

465+
-
466+
message: '#^Possibly impure call to function mb_rtrim\(\) in pure method Sigwin\\YASSG\\Bridge\\Twig\\Extension\\ImageExtension\:\:encode\(\)\.$#'
467+
identifier: possiblyImpure.functionCall
468+
count: 1
469+
path: src/Bridge/Twig/Extension/ImageExtension.php
470+
459471
-
460472
message: '#^Result of && is always false\.$#'
461473
identifier: booleanAnd.alwaysFalse

psalm.baseline.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="6.8.9@e856423a5dc38d65e56b5792750c557277afe393">
2+
<files psalm-version="6.12.1@e71404b0465be25cf7f8a631b298c01c5ddd864f">
33
<file src="bootstrap.php">
44
<PossiblyFalseArgument>
55
<code><![CDATA[getenv('YASSG_SKIP_BUNDLES')]]></code>
@@ -461,6 +461,9 @@
461461
<code><![CDATA[\is_object($item)]]></code>
462462
<code><![CDATA[\is_string($value)]]></code>
463463
</DocblockTypeContradiction>
464+
<ImpureFunctionCall>
465+
<code><![CDATA[mb_rtrim]]></code>
466+
</ImpureFunctionCall>
464467
<InvalidArrayAccess>
465468
<code><![CDATA[$options['attrs']['class']]]></code>
466469
</InvalidArrayAccess>

src/AssetQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function add(AssetCopy|AssetFetch $specification): void
4242
public function flush(?callable $callable = null): array
4343
{
4444
foreach ($this->queue as $specification) {
45-
$destination = $this->buildDir.'/'.ltrim($specification->destination, '/');
45+
$destination = $this->buildDir.'/'.mb_ltrim($specification->destination, '/');
4646
if (file_exists($destination)) {
4747
continue;
4848
}

src/Bridge/Symfony/Command/GenerateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5656
* @psalm-suppress UnnecessaryVarAnnotation Psalm's Symfony plugin solves this, but not PHPStan's
5757
*/
5858
$buildUrl = $input->getArgument('url');
59-
$buildUrl = rtrim($buildUrl, '/');
59+
$buildUrl = mb_rtrim($buildUrl, '/');
6060

6161
/**
6262
* @phpstan-var bool $indexFile

src/Bridge/Symfony/Command/InitCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5959
* @var string $namespace
6060
*/
6161
$namespace = $input->getOption('namespace');
62-
$namespace = trim($namespace, '\\');
62+
$namespace = mb_trim($namespace, '\\');
6363

6464
$style->section(\sprintf('Namespace: %1$s', $namespace));
6565

src/Bridge/Symfony/DependencyInjection/CompilerPass/ConfigureDatabasesCompilerPass.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public function process(ContainerBuilder $container): void
7474
throw new \LogicException(\sprintf('Unsupported type "%1$s" at "sigwin_yassg.data_sources.%2$s", allowed values: %3$s', $type, $name, implode(', ', array_keys($supportedStorageTypes))));
7575
}
7676

77-
$databaseClass = ltrim($database['class'], '\\');
77+
/** @var class-string $databaseClass */
78+
$databaseClass = mb_ltrim($database['class'], '\\');
7879

7980
$storageDefinition = new Definition($supportedStorageTypes[$type]);
8081
$storageDefinition

src/Bridge/Symfony/HttpKernel/Fragment/RelativeUrlInlineFragmentRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(private InlineFragmentRenderer $fragmentRenderer, pr
3030
public function render(string|\Symfony\Component\HttpKernel\Controller\ControllerReference $uri, Request $request, array $options = []): \Symfony\Component\HttpFoundation\Response
3131
{
3232
if (\is_string($uri)) {
33-
$uri = rtrim(str_replace($this->urlGenerator->getContext()->getBaseUrl(), '', $uri), '/');
33+
$uri = mb_rtrim(str_replace($this->urlGenerator->getContext()->getBaseUrl(), '', $uri), '/');
3434
}
3535

3636
return $this->fragmentRenderer->render($uri, $request, $options);

0 commit comments

Comments
 (0)