mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)
* Update Symfony lib to version ~6.4.0 * Update code missing return type * Add an iTop general configuration entry to store application secret (Symfony mandatory parameter) * Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Command;
|
||||
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Translation\Command\XliffLintCommand as BaseLintCommand;
|
||||
|
||||
/**
|
||||
@@ -22,11 +23,9 @@ use Symfony\Component\Translation\Command\XliffLintCommand as BaseLintCommand;
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
#[AsCommand(name: 'lint:xliff', description: 'Lint an XLIFF file and outputs encountered errors')]
|
||||
class XliffLintCommand extends BaseLintCommand
|
||||
{
|
||||
protected static $defaultName = 'lint:xliff';
|
||||
protected static $defaultDescription = 'Lints an XLIFF file and outputs encountered errors';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$directoryIteratorProvider = function ($directory, $default) {
|
||||
@@ -37,17 +36,12 @@ class XliffLintCommand extends BaseLintCommand
|
||||
return $default($directory);
|
||||
};
|
||||
|
||||
$isReadableProvider = function ($fileOrDirectory, $default) {
|
||||
return str_starts_with($fileOrDirectory, '@') || $default($fileOrDirectory);
|
||||
};
|
||||
$isReadableProvider = fn ($fileOrDirectory, $default) => str_starts_with($fileOrDirectory, '@') || $default($fileOrDirectory);
|
||||
|
||||
parent::__construct(null, $directoryIteratorProvider, $isReadableProvider);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function configure()
|
||||
protected function configure(): void
|
||||
{
|
||||
parent::configure();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user