1.18.2 (#3190)
* improve console version output * fix empty string issue in csv export (DDE protection) - fixes #3189 * fix twig sort deprecation in php 8 * sort user by displayName in users report * fix missing custom translations in edit modal * fix font-family in invoice.css * invoice template "freelancer pdf" - added customer number, moved some fields around * invoice template "default" - relocate customer number and order number in
This commit is contained in:
@@ -30,9 +30,10 @@ class VersionCommand extends Command
|
||||
->setName('kimai:version')
|
||||
->setDescription('Receive version information')
|
||||
->setHelp('This command allows you to fetch various version information about Kimai.')
|
||||
->addOption('name', null, InputOption::VALUE_NONE, 'Display the major release name')
|
||||
->addOption('short', null, InputOption::VALUE_NONE, 'Display the version only')
|
||||
->addOption('number', null, InputOption::VALUE_NONE, 'Display the version identifier only only')
|
||||
// @deprecated since 1.14.1
|
||||
->addOption('name', null, InputOption::VALUE_NONE, 'DEPRECATED: Display the major release name')
|
||||
->addOption('candidate', null, InputOption::VALUE_NONE, 'DEPRECATED: Display the current version candidate (e.g. "stable" or "dev")')
|
||||
->addOption('semver', null, InputOption::VALUE_NONE, 'DEPRECATED: Semantical versioning (SEMVER) compatible version string')
|
||||
;
|
||||
@@ -46,6 +47,7 @@ class VersionCommand extends Command
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
if ($input->getOption('semver')) {
|
||||
@trigger_error('bin/console kimai:version --semver is deprecated and will be removed with 2.0', E_USER_DEPRECATED);
|
||||
$io->writeln(Constants::VERSION . '-' . Constants::STATUS);
|
||||
|
||||
return 0;
|
||||
@@ -58,18 +60,26 @@ class VersionCommand extends Command
|
||||
}
|
||||
|
||||
if ($input->getOption('name')) {
|
||||
@trigger_error('bin/console kimai:version --name is deprecated and will be removed with 2.0', E_USER_DEPRECATED);
|
||||
$io->writeln(Constants::NAME);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($input->getOption('candidate')) {
|
||||
@trigger_error('bin/console kimai:version --candidate is deprecated and will be removed with 2.0', E_USER_DEPRECATED);
|
||||
$io->writeln(Constants::STATUS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
$io->writeln(Constants::SOFTWARE . ' ' . Constants::VERSION . ' by Kevin Papst and contributors.');
|
||||
if ($input->getOption('number')) {
|
||||
$io->writeln((string) Constants::VERSION_ID);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
$io->writeln(sprintf('%s <info>%s</info> by Kevin Papst and contributors.', Constants::SOFTWARE, Constants::VERSION));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -22,4 +22,14 @@ class ConsoleApplication extends Application
|
||||
{
|
||||
return Constants::VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwritten to prevent unwanted SF core messages to show up here.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLongVersion()
|
||||
{
|
||||
return sprintf('%s <info>%s</info> (env: <comment>%s</>, debug: <comment>%s</>)', $this->getName(), $this->getVersion(), $this->getKernel()->getEnvironment(), $this->getKernel()->isDebug() ? 'true' : 'false');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,11 @@ final class StringHelper
|
||||
|
||||
public static function sanitizeDDE(string $text): string
|
||||
{
|
||||
// see #3189
|
||||
if (\strlen($text) === 0) {
|
||||
return $text;
|
||||
}
|
||||
|
||||
$sanitize = false;
|
||||
|
||||
if (\in_array($text[0], self::DDE_PAYLOADS)) {
|
||||
|
||||
@@ -25,7 +25,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface, LocaleA
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $localDomains = [];
|
||||
private $localDomains;
|
||||
|
||||
public function __construct(BaseTranslator $translator, array $localDomains = [])
|
||||
{
|
||||
@@ -51,8 +51,6 @@ class Translator implements TranslatorInterface, TranslatorBagInterface, LocaleA
|
||||
|
||||
protected function hasLocalOverwrite($id, $domain, $locale = null): bool
|
||||
{
|
||||
$found = false;
|
||||
|
||||
$catalogue = $this->getCatalogue($locale);
|
||||
while (false === ($found = $catalogue->defines($id, $domain))) {
|
||||
if ($cat = $catalogue->getFallbackCatalogue()) {
|
||||
|
||||
Reference in New Issue
Block a user