Release 2.9.0 (#4526)
* added fix to work around bc break in new phpword version * fix phpoffice deprecations * mark unused option as deprecated * support for DateTimeInterface and DateTimeImmutable where possible * use TRUSTED_PROXIES setting - fixes #4533 * re-enable Kimai test in docker test build script (#4541) * bump dependencies
This commit is contained in:
@@ -64,7 +64,7 @@ final class InvoiceCreateCommand extends Command
|
||||
->addOption('project', null, InputOption::VALUE_OPTIONAL, 'Comma separated list of project IDs', null)
|
||||
->addOption('by-customer', null, InputOption::VALUE_NONE, 'If set, one invoice for each active customer in the given timerange is created')
|
||||
->addOption('by-project', null, InputOption::VALUE_NONE, 'If set, one invoice for each active project in the given timerange is created')
|
||||
->addOption('set-exported', null, InputOption::VALUE_NONE, 'Whether the invoice items should be marked as exported')
|
||||
->addOption('set-exported', null, InputOption::VALUE_NONE, '[DEPRECATED] this flag has no meaning any more: invoiced items are always exported')
|
||||
->addOption('template', null, InputOption::VALUE_OPTIONAL, 'Invoice template', null)
|
||||
->addOption('search', null, InputOption::VALUE_OPTIONAL, 'Search term to filter invoice entries', null)
|
||||
->addOption('exported', null, InputOption::VALUE_OPTIONAL, 'Exported filter for invoice entries (possible values: exported, all), by default only "not exported" items are fetched', null)
|
||||
@@ -156,10 +156,12 @@ final class InvoiceCreateCommand extends Command
|
||||
return Command::FAILURE;
|
||||
}
|
||||
}
|
||||
if (!$start instanceof \DateTime) {
|
||||
if (!$start instanceof \DateTimeInterface) {
|
||||
$start = $dateFactory->getStartOfMonth();
|
||||
}
|
||||
$start->setTime(0, 0, 0);
|
||||
|
||||
$start = \DateTimeImmutable::createFromInterface($start);
|
||||
$start = $start->setTime(0, 0, 0);
|
||||
|
||||
$end = $input->getOption('end');
|
||||
if (!empty($end)) {
|
||||
@@ -171,17 +173,18 @@ final class InvoiceCreateCommand extends Command
|
||||
return Command::FAILURE;
|
||||
}
|
||||
}
|
||||
if (!$end instanceof \DateTime) {
|
||||
if (!$end instanceof \DateTimeInterface) {
|
||||
$end = $dateFactory->getEndOfMonth();
|
||||
}
|
||||
$end->setTime(23, 59, 59);
|
||||
|
||||
$end = \DateTimeImmutable::createFromInterface($end);
|
||||
$end = $end->setTime(23, 59, 59);
|
||||
|
||||
$searchTerm = null;
|
||||
if (null !== $input->getOption('search')) {
|
||||
$searchTerm = new SearchTerm($input->getOption('search'));
|
||||
}
|
||||
|
||||
$markAsExported = false;
|
||||
if ($input->getOption('preview') !== null) {
|
||||
$this->previewUniqueFile = (bool) $input->getOption('preview-unique');
|
||||
$this->previewDirectory = rtrim($input->getOption('preview'), '/') . '/';
|
||||
@@ -191,7 +194,7 @@ final class InvoiceCreateCommand extends Command
|
||||
return Command::FAILURE;
|
||||
}
|
||||
} elseif ($input->getOption('set-exported')) {
|
||||
$markAsExported = true;
|
||||
@trigger_error('The "set-exported" option of kimai:invoice:create command has no meaning anymore, it will be removed soon', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
// =============== VALIDATION END ===============
|
||||
|
||||
Reference in New Issue
Block a user