mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-09 13:36:07 +09:00
* Migrate Email, Extension, Support modules to Doctrine ORM * Add 'initialises' to cspell.json custom words * Add patch76 and fix extension deactivation event * Bump database patch version to 76 * Refactor Support APIs to mapped Doctrine flows * Handle legacy email queue and ticket filters * Migrate Support module to Doctrine ORM * Refactor services to use typed repositories * Route order ticket count and ticket messages through repositories Drops the last two thin Support\Service wrappers, calling the SupportTicketRepository and SupportTicketMessageRepository directly from the cross-module callers. * Rename email queue table and add patch * Preserve unlimited email queue processing * Preserve unlimited email queue processing
26 lines
648 B
PHP
26 lines
648 B
PHP
<?php
|
|
|
|
/**
|
|
* Copyright 2022-2026 FOSSBilling
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*
|
|
* @copyright FOSSBilling (https://www.fossbilling.org)
|
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Helpers;
|
|
|
|
/**
|
|
* Force the value of an entity's `id` property via reflection.
|
|
*
|
|
* Doctrine entities have private `id` properties; tests need to set them
|
|
* directly to simulate a persisted row without going through the database.
|
|
*/
|
|
function setEntityId(object $entity, int $id): void
|
|
{
|
|
$reflection = new \ReflectionProperty($entity, 'id');
|
|
$reflection->setValue($entity, $id);
|
|
}
|