mirror of
https://github.com/wallabag/wallabag.git
synced 2026-11-08 23:14:05 +01:00
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.
20 lines
420 B
PHP
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();
|