[3.0] Update Symfony to 7.4 and dependencies, removed deprecated code, removed API password (#5622)

* deactivate deprecated auto-mapping
* use native month-picker with fallback on old browser
* bump dependencies to new major versions
* replace deprecated ARRAY column type with JSON
* named arguments
* nullable arguments
* native lazy ghosts
* update routes to use php config
* disable PHP < 8.4
* use static RTL configuration
* new qr code package
* clear out env file
* recipe updates
* fix deprecations
* preset new env variable if not existing
* bump maria db version examples
* remove deprecated api-token support
* fix validator deprecations
* remove timesheet category column
* fix broken validator autoconfiguration
* stabilize tests
* fix migration syntax compatibility
* fix doctrine deprecation
* fix datetime format
* remove constructor dependency
* only include visible preferences in invoice templates
* fix test container dependency
* removed ProjectConstraint multi-constraint logic
* allow to disable plugins in certain environments
* refactor TimesheetConstraint to non-service
* activate new interface methods
* prevent update issues with .env
* improved customer fixture
* removed $user->isExportDecimal()
This commit is contained in:
Kevin Papst
2026-01-04 15:04:25 +01:00
committed by GitHub
parent 9e87fc131b
commit 677f8d776c
467 changed files with 3929 additions and 6567 deletions

View File

@@ -34,6 +34,17 @@ use Twig\Environment;
#[CoversClass(ServiceInvoice::class)]
class ServiceInvoiceTest extends TestCase
{
private function getCustomer(string $name, int $id): Customer
{
$customer = new Customer($name);
$reflectionCustomer = new \ReflectionClass(Customer::class);
$customerIdProperty = $reflectionCustomer->getProperty('id');
$customerIdProperty->setValue($customer, $id);
return $customer;
}
private function getSut(array $paths): ServiceInvoice
{
$languages = [
@@ -108,7 +119,7 @@ class ServiceInvoiceTest extends TestCase
$this->expectExceptionMessage('Cannot create invoice model without template');
$query = new InvoiceQuery();
$query->setCustomers([new Customer('foo')]);
$query->setCustomers([$this->getCustomer('foo', 1)]);
$sut = $this->getSut([]);
$sut->createModel($query);
@@ -121,7 +132,7 @@ class ServiceInvoiceTest extends TestCase
$template->setLanguage('it');
$query = new InvoiceQuery();
$query->setCustomers([new Customer('foo')]);
$query->setCustomers([$this->getCustomer('foo', 1)]);
$query->setTemplate($template);
$sut = $this->getSut([]);
@@ -136,7 +147,7 @@ class ServiceInvoiceTest extends TestCase
public function testBeginAndEndDateFallback(): void
{
$timezone = new \DateTimeZone('Europe/Vienna');
$customer = new Customer('foo');
$customer = $this->getCustomer('foo', 1);
$project = new Project();
$project->setCustomer($customer);
@@ -178,8 +189,10 @@ class ServiceInvoiceTest extends TestCase
$template->setNumberGenerator('date');
$template->setLanguage('de');
$customer = $this->getCustomer('foo', 1);
$query = new InvoiceQuery();
$query->setCustomers([new Customer('foo'), $customer]);
$query->setCustomers([$customer, $customer]);
$query->setTemplate($template);
self::assertNull($query->getBegin());
self::assertNull($query->getEnd());
@@ -291,7 +304,7 @@ class ServiceInvoiceTest extends TestCase
self::assertEquals('de', $template->getLanguage());
$query = new InvoiceQuery();
$query->setCustomers([$customer3, new Customer('tröööt'), $customer1, $customer3]);
$query->setCustomers([$customer3, $this->getCustomer('tröööt', 1), $customer1, $customer3]);
$query->setTemplate($template);
self::assertNull($query->getBegin());
self::assertNull($query->getEnd());