Merge pull request #8651 from wallabag/dependabot/composer/friendsofphp/php-cs-fixer-3.93.0

This commit is contained in:
Jérémy Benoist
2026-01-26 16:26:49 +01:00
committed by GitHub
27 changed files with 50 additions and 50 deletions

16
composer.lock generated
View File

@ -15891,16 +15891,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.92.5",
"version": "v3.93.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "260cc8c4a1d2f6d2f22cd4f9c70aa72e55ebac58"
"reference": "50895a07cface1385082e4caa6a6786c4e033468"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/260cc8c4a1d2f6d2f22cd4f9c70aa72e55ebac58",
"reference": "260cc8c4a1d2f6d2f22cd4f9c70aa72e55ebac58",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/50895a07cface1385082e4caa6a6786c4e033468",
"reference": "50895a07cface1385082e4caa6a6786c4e033468",
"shasum": ""
},
"require": {
@ -15932,14 +15932,14 @@
},
"require-dev": {
"facile-it/paraunit": "^1.3.1 || ^2.7",
"infection/infection": "^0.31",
"infection/infection": "^0.32",
"justinrainbow/json-schema": "^6.6",
"keradus/cli-executor": "^2.3",
"mikey179/vfsstream": "^1.6.12",
"php-coveralls/php-coveralls": "^2.9",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6",
"phpunit/phpunit": "^9.6.31 || ^10.5.60 || ^11.5.46",
"phpunit/phpunit": "^9.6.31 || ^10.5.60 || ^11.5.48",
"symfony/polyfill-php85": "^1.33",
"symfony/var-dumper": "^5.4.48 || ^6.4.26 || ^7.4.0 || ^8.0",
"symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0"
@ -15983,7 +15983,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.92.5"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.93.0"
},
"funding": [
{
@ -15991,7 +15991,7 @@
"type": "github"
}
],
"time": "2026-01-08T21:57:37+00:00"
"time": "2026-01-23T17:33:21+00:00"
},
{
"name": "friendsoftwig/twigcs",

View File

@ -77,7 +77,7 @@ class ImportCommand extends Command
// Turning off doctrine default logs queries for saving memory
$middlewares = $this->entityManager->getConnection()->getConfiguration()->getMiddlewares();
$middlewaresWithoutLogging = array_filter($middlewares, fn (Middleware $middleware) => !$middleware instanceof LoggingMiddleware);
$middlewaresWithoutLogging = array_filter($middlewares, static fn (Middleware $middleware) => !$middleware instanceof LoggingMiddleware);
$this->entityManager->getConnection()->getConfiguration()->setMiddlewares($middlewaresWithoutLogging);
if ($input->getOption('useUserId')) {

View File

@ -48,7 +48,7 @@ class UrlCommand extends Command
{
// Turning off doctrine default logs queries for saving memory
$middlewares = $this->entityManager->getConnection()->getConfiguration()->getMiddlewares();
$middlewaresWithoutLogging = array_filter($middlewares, fn (Middleware $middleware) => !$middleware instanceof LoggingMiddleware);
$middlewaresWithoutLogging = array_filter($middlewares, static fn (Middleware $middleware) => !$middleware instanceof LoggingMiddleware);
$this->entityManager->getConnection()->getConfiguration()->setMiddlewares($middlewaresWithoutLogging);
if ($input->getOption('useUserId')) {

View File

@ -131,7 +131,7 @@ class EntryRestController extends WallabagRestController
}
if (false === $returnId) {
$results = array_map(fn ($v) => null !== $v, $results);
$results = array_map(static fn ($v) => null !== $v, $results);
}
$results = $this->replaceUrlHashes($results, $urlHashMap);

View File

@ -346,7 +346,7 @@ class ConfigController extends AbstractController
$backupCodes = (new BackupCodes())->toArray();
$backupCodesHashed = array_map(
fn ($backupCode) => password_hash((string) $backupCode, \PASSWORD_DEFAULT),
static fn ($backupCode) => password_hash((string) $backupCode, \PASSWORD_DEFAULT),
$backupCodes
);

View File

@ -73,7 +73,7 @@ class EntryController extends AbstractController
if (isset($values['tags'])) {
$labels = array_filter(explode(',', (string) $values['tags']),
function ($v) {
static function ($v) {
$v = trim($v);
return '' !== $v;

View File

@ -29,7 +29,7 @@ class AuthenticatorProvider implements ExpressionFunctionProviderInterface
{
return new ExpressionFunction(
'request_html',
function (): void {
static function (): void {
throw new \Exception('Not supported');
},
fn (array $arguments, $uri) => $this->requestHtmlFunctionClient->request('GET', $uri)->getContent()
@ -40,10 +40,10 @@ class AuthenticatorProvider implements ExpressionFunctionProviderInterface
{
return new ExpressionFunction(
'preg_match',
function (): void {
static function (): void {
throw new \Exception('Not supported');
},
function (array $arguments, $pattern, $html) {
static function (array $arguments, $pattern, $html) {
preg_match($pattern, $html, $matches);
if (2 !== \count($matches)) {
@ -59,10 +59,10 @@ class AuthenticatorProvider implements ExpressionFunctionProviderInterface
{
return new ExpressionFunction(
'xpath',
function (): void {
static function (): void {
throw new \Exception('Not supported');
},
function (array $arguments, $xpathQuery, $html) {
static function (array $arguments, $xpathQuery, $html) {
try {
$crawler = new Crawler((string) $html);

View File

@ -28,8 +28,8 @@ class ClientType extends AbstractType
$builder->get('redirect_uris')
->addModelTransformer(new CallbackTransformer(
fn ($originalUri) => $originalUri,
fn ($submittedUri) => [$submittedUri]
static fn ($originalUri) => $originalUri,
static fn ($submittedUri) => [$submittedUri]
))
;
}

View File

@ -46,7 +46,7 @@ class EntryFilterType extends AbstractType
'condition_operator' => FilterOperands::OPERATOR_LOWER_THAN_EQUAL,
'attr' => ['min' => 0],
],
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) use ($user) {
'apply_filter' => static function (QueryInterface $filterQuery, $field, $values) use ($user) {
$lower = $values['value']['left_number'][0];
$upper = $values['value']['right_number'][0];
@ -93,7 +93,7 @@ class EntryFilterType extends AbstractType
'label' => 'entry.filters.created_at.label',
])
->add('domainName', TextFilterType::class, [
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
'apply_filter' => static function (QueryInterface $filterQuery, $field, $values) {
$value = $values['value'];
if (empty($value) || \strlen($value) <= 2) {
return false;
@ -111,7 +111,7 @@ class EntryFilterType extends AbstractType
],
])
->add('httpStatus', NumberFilterType::class, [
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
'apply_filter' => static function (QueryInterface $filterQuery, $field, $values) {
$value = (int) $values['value'];
if (false === \array_key_exists($value, Response::$statusTexts)) {
return false;
@ -143,7 +143,7 @@ class EntryFilterType extends AbstractType
->add('isUnread', CheckboxFilterType::class, [
'label' => 'entry.filters.unread_label',
'data' => $options['filter_unread'],
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
'apply_filter' => static function (QueryInterface $filterQuery, $field, $values) {
if (false === $values['value']) {
return false;
}
@ -158,7 +158,7 @@ class EntryFilterType extends AbstractType
->add('isAnnotated', CheckboxFilterType::class, [
'label' => 'entry.filters.annotated_label',
'data' => $options['filter_annotated'],
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
'apply_filter' => static function (QueryInterface $filterQuery, $field, $values) {
if (false === $values['value']) {
return false;
}
@ -172,7 +172,7 @@ class EntryFilterType extends AbstractType
'data' => $options['filter_parsed'],
])
->add('previewPicture', CheckboxFilterType::class, [
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
'apply_filter' => static function (QueryInterface $filterQuery, $field, $values) {
if (false === $values['value']) {
return false;
}
@ -186,7 +186,7 @@ class EntryFilterType extends AbstractType
'label' => 'entry.filters.preview_picture_label',
])
->add('isPublic', CheckboxFilterType::class, [
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
'apply_filter' => static function (QueryInterface $filterQuery, $field, $values) {
if (false === $values['value']) {
return false;
}

View File

@ -291,7 +291,7 @@ class DownloadImages
preg_match_all($pattern, $srcsetAttribute, $matches);
$srcset = \call_user_func_array('array_merge', $matches);
$srcsetUrls = array_map(fn ($src) => trim(explode(' ', (string) $src, 2)[0]), $srcset);
$srcsetUrls = array_map(static fn ($src) => trim(explode(' ', (string) $src, 2)[0]), $srcset);
$urls = array_merge($srcsetUrls, $urls);
}

View File

@ -40,7 +40,7 @@ abstract class HtmlImport extends AbstractImport
return false;
}
$entries = $hrefs->each(fn (Crawler $node) => [
$entries = $hrefs->each(static fn (Crawler $node) => [
'url' => $node->attr('href'),
'tags' => $node->attr('tags'),
'created_at' => $node->attr('add_date'),

View File

@ -56,7 +56,7 @@ class PocketHtmlImport extends HtmlImport
return false;
}
$entries = $hrefs->each(fn (Crawler $node) => [
$entries = $hrefs->each(static fn (Crawler $node) => [
'url' => $node->attr('href'),
'tags' => $node->attr('tags'),
'created_at' => $node->attr('time_added'),

View File

@ -290,7 +290,7 @@ class EntryRepository extends ServiceEntityRepository
if ('metadata' === $detail) {
$fieldNames = $this->getClassMetadata()->getFieldNames();
$fields = array_filter($fieldNames, fn ($k) => 'content' !== $k);
$fields = array_filter($fieldNames, static fn ($k) => 'content' !== $k);
$qb->select(\sprintf('partial e.{%s}', implode(',', $fields)));
}

View File

@ -23,7 +23,7 @@ class TagRestControllerTest extends WallabagApiTestCase
$this->assertArrayHasKey('label', $content[0]);
$this->assertArrayHasKey('nbEntries', $content[0]);
$tagLabels = array_map(fn ($i) => $i['label'], $content);
$tagLabels = array_map(static fn ($i) => $i['label'], $content);
$this->assertNotContains($this->otherUserTagLabel, $tagLabels, 'There is a possible tag leak');
}

View File

@ -1230,7 +1230,7 @@ class ConfigControllerTest extends WallabagTestCase
->willReturn('DUMMYSECRET');
$googleAuthenticatorMock
->method('checkCode')
->willReturnCallback(function ($user, $code) {
->willReturnCallback(static function ($user, $code) {
return '123456' === $code;
});

View File

@ -129,7 +129,7 @@ class PocketCsvControllerTest extends WallabagTestCase
'https://reporterre.net/Des-abeilles-pour-resoudre-les-conflits-entre-les-humains-et-les-elephants',
];
$matchedEntries = array_map(function ($expectedUrl) use ($entries) {
$matchedEntries = array_map(static function ($expectedUrl) use ($entries) {
foreach ($entries as $entry) {
if ($entry->getUrl() === $expectedUrl) {
return $entry;

View File

@ -95,7 +95,7 @@ class ChromeImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $chromeImport->setMarkAsRead(true)->import();

View File

@ -95,7 +95,7 @@ class FirefoxImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $firefoxImport->setMarkAsRead(true)->import();

View File

@ -97,7 +97,7 @@ class InstapaperImportTest extends TestCase
$this->em
->expects($this->once())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $instapaperImport->setMarkAsRead(true)->import();

View File

@ -95,7 +95,7 @@ class PocketCsvImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $pocketCsvImport
->setMarkAsRead(true)

View File

@ -95,7 +95,7 @@ class PocketHtmlImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $pocketHtmlImport
->setMarkAsRead(true)

View File

@ -206,7 +206,7 @@ JSON, ['response_headers' => ['Content-Type: application/json']]),
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived() && (bool) $persistedEntry->isStarred()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived() && (bool) $persistedEntry->isStarred()));
$entry = new Entry($this->user);
@ -295,7 +295,7 @@ JSON, ['response_headers' => ['Content-Type: application/json']]),
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$entry = new Entry($this->user);

View File

@ -95,7 +95,7 @@ class ReadabilityImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $readabilityImport->setMarkAsRead(true)->import();

View File

@ -95,7 +95,7 @@ class ShaarliImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $shaarliImport
->setMarkAsRead(true)

View File

@ -99,7 +99,7 @@ class WallabagV1ImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $wallabagV1Import->setMarkAsRead(true)->import();

View File

@ -93,7 +93,7 @@ class WallabagV2ImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
->with($this->callback(static fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $wallabagV2Import->setMarkAsRead(true)->import();

View File

@ -15,7 +15,7 @@ if (!isPartialRun()) {
'--force',
'--env=test',
'--no-debug',
]))->run(function ($type, $buffer): void {
]))->run(static function ($type, $buffer): void {
echo $buffer;
});
@ -25,7 +25,7 @@ if (!isPartialRun()) {
'doctrine:database:create',
'--env=test',
'--no-debug',
]))->mustRun(function ($type, $buffer): void {
]))->mustRun(static function ($type, $buffer): void {
echo $buffer;
});
@ -37,7 +37,7 @@ if (!isPartialRun()) {
'--env=test',
'--no-debug',
'-vv',
]))->mustRun(function ($type, $buffer): void {
]))->mustRun(static function ($type, $buffer): void {
echo $buffer;
});
@ -48,7 +48,7 @@ if (!isPartialRun()) {
'--no-interaction',
'--env=test',
'-v',
]))->mustRun(function ($type, $buffer): void {
]))->mustRun(static function ($type, $buffer): void {
echo $buffer;
});
}
@ -60,6 +60,6 @@ if (!isPartialRun()) {
'--no-interaction',
'--env=test',
'--no-debug',
]))->mustRun(function ($type, $buffer): void {
]))->mustRun(static function ($type, $buffer): void {
echo $buffer;
});