[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:
@@ -35,10 +35,23 @@ abstract class AbstractRendererTestCase extends KernelTestCase
|
||||
{
|
||||
protected function render(ExportRendererInterface $renderer): Response
|
||||
{
|
||||
$reflectionUser = new \ReflectionClass(User::class);
|
||||
$userIdProperty = $reflectionUser->getProperty('id');
|
||||
|
||||
$reflectionCustomer = new \ReflectionClass(Customer::class);
|
||||
$customerIdProperty = $reflectionCustomer->getProperty('id');
|
||||
|
||||
$reflectionProject = new \ReflectionClass(Project::class);
|
||||
$projectIdProperty = $reflectionProject->getProperty('id');
|
||||
|
||||
$reflectionActivity = new \ReflectionClass(Activity::class);
|
||||
$activityIdProperty = $reflectionActivity->getProperty('id');
|
||||
|
||||
$customer = new Customer('Customer Name');
|
||||
$customer->setNumber('A-0123456789');
|
||||
$customer->setVatId('DE-9876543210');
|
||||
$customer->setMetaField((new CustomerMeta())->setName('customer-foo')->setValue('customer-bar')->setIsVisible(true));
|
||||
$customerIdProperty->setValue($customer, 1);
|
||||
|
||||
$project = new Project();
|
||||
$project->setName('project name');
|
||||
@@ -46,11 +59,13 @@ abstract class AbstractRendererTestCase extends KernelTestCase
|
||||
$project->setOrderNumber('ORDER-123');
|
||||
$project->setMetaField((new ProjectMeta())->setName('project-bar')->setValue('project-bar')->setIsVisible(true));
|
||||
$project->setMetaField((new ProjectMeta())->setName('project-foo2')->setValue('project-foo2')->setIsVisible(true));
|
||||
$projectIdProperty->setValue($project, 1);
|
||||
|
||||
$activity = new Activity();
|
||||
$activity->setName('activity description');
|
||||
$activity->setProject($project);
|
||||
$activity->setMetaField((new ActivityMeta())->setName('activity-foo')->setValue('activity-bar')->setIsVisible(true));
|
||||
$activityIdProperty->setValue($activity, 1);
|
||||
|
||||
$userMethods = ['getId', 'getPreferenceValue', 'getUsername', 'getUserIdentifier'];
|
||||
$user1 = $this->getMockBuilder(User::class)->onlyMethods($userMethods)->disableOriginalConstructor()->getMock();
|
||||
@@ -103,6 +118,7 @@ abstract class AbstractRendererTestCase extends KernelTestCase
|
||||
|
||||
$user = new User();
|
||||
$user->setUserIdentifier('kevin');
|
||||
$userIdProperty->setValue($user, 12);
|
||||
|
||||
$timesheet5 = new Timesheet();
|
||||
$timesheet5->setDuration(400);
|
||||
|
||||
Reference in New Issue
Block a user