Files
wallabag-mirror/tests/object-manager.php
Yassine Guedidi b3b06e42bc Read the table prefix from WALLABAG_TABLE_PREFIX
Add WALLABAG_TABLE_PREFIX defaults, map database_table_prefix to it, switch the remaining service consumers to the env interface, and boot Dotenv in the PHPStan object-manager bootstrap.

The table prefix is the last database-related scalar after DATABASE_URL, and the static-analysis bootstrap needs the same env-first defaults as the runtime container. Keeping that bootstrap repair in this commit leaves the new env contract self-contained for both runtime and PHPStan.

The later CI job tweak, legacy-parameter cleanup, and documentation updates stay separate so this step remains focused on the table-prefix contract itself.
2026-04-06 13:43:19 +02:00

20 lines
420 B
PHP

<?php
use Symfony\Component\Dotenv\Dotenv;
/**
* Required for PHPStan.
*
* @see https://github.com/phpstan/phpstan-doctrine#configuration
*/
require __DIR__ . '/../vendor/autoload.php';
if (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__) . '/.env');
}
$kernel = new AppKernel('test', true);
$kernel->boot();
return $kernel->getContainer()->get('doctrine')->getManager();