Files
Yassine Guedidi b9965765b7 Deprecate web/app.php and web/app_dev.php
Both files now delegate to web/index.php and emit an E_USER_DEPRECATED
notice. A defined() guard prevents the notice from firing twice when
Symfony Runtime re-executes the entry script via SCRIPT_FILENAME.

The deprecated wrappers set APP_ENV/APP_DEBUG to match their legacy
environments (prod/0 and dev/1) so existing web server configurations
that point to these files keep working until wallabag 3.0 removes them.

Debug::enable() is no longer called explicitly — SymfonyRuntime handles
it when APP_DEBUG is truthy.
2026-03-17 01:53:32 +01:00

15 lines
360 B
PHP

<?php
if (!defined('WALLABAG_APP_PHP_DEPRECATED')) {
define('WALLABAG_APP_PHP_DEPRECATED', true);
trigger_error(
'web/app.php is deprecated and will be removed in wallabag 3.0. Use web/index.php instead.',
E_USER_DEPRECATED
);
}
$_SERVER['APP_ENV'] ??= 'prod';
$_SERVER['APP_DEBUG'] ??= '0';
return require __DIR__.'/index.php';