fix(Discovery): Add comprehensive debug logging for router initialization
- Add initializer count logging in DiscoveryServiceBootstrapper - Add route structure analysis in RouterSetup - Add request parameter logging in HttpRouter - Update PHP production config for better OPcache handling - Fix various config and error handling improvements
This commit is contained in:
@@ -4,8 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Context;
|
||||
|
||||
use App\Framework\Config\Environment;
|
||||
use App\Framework\Config\EnvKey;
|
||||
use App\Framework\Config\AppConfig;
|
||||
use App\Framework\Http\ServerEnvironment;
|
||||
|
||||
final readonly class ExecutionContext
|
||||
@@ -68,10 +67,8 @@ final readonly class ExecutionContext
|
||||
], $this->metadata);
|
||||
}
|
||||
|
||||
public static function detect(?Environment $environment = null): self
|
||||
public static function detect(?AppConfig $appConfig = null): self
|
||||
{
|
||||
#$environment->get(EnvKey::APP_ENV);
|
||||
|
||||
// Debug logging
|
||||
#error_log("ExecutionContext::detect() - SAPI: " . php_sapi_name());
|
||||
#error_log("ExecutionContext::detect() - REQUEST_METHOD: " . ($_SERVER['REQUEST_METHOD'] ?? 'not set'));
|
||||
@@ -80,7 +77,7 @@ final readonly class ExecutionContext
|
||||
|
||||
// Test Environment
|
||||
if (defined('PHPUNIT_COMPOSER_INSTALL') ||
|
||||
isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] === 'testing') {
|
||||
($appConfig !== null && $appConfig->type->isTesting())) {
|
||||
return new self(ContextType::TEST, ['detected_by' => 'phpunit_or_env']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user