dbalabka / php-enumeration

Implementation of enumeration classes in PHP. The better alternative for enums
MIT License
53 stars 4 forks source link

DebugClassLoader is hijacking loadClass so __constructStatic is never called #22

Open oleg-andreyev opened 4 years ago

oleg-andreyev commented 4 years ago

index.php (default for symfony 4.4) inconjucation with https://github.com/dbalabka/php-enumeration/pull/20

<?php

use App\Kernel;
use Symfony\Component\Debug\Debug;
use Symfony\Component\HttpFoundation\Request;

require dirname(__DIR__) . '/config/bootstrap.php';

if ($_SERVER['APP_DEBUG']) {
    umask(0000);

    Debug::enable();
}

bootstrap.php

<?php

use Dbalabka\StaticConstructorLoader\StaticConstructorLoader;
use Symfony\Component\Dotenv\Dotenv;

$composer = require dirname(__DIR__) . '/vendor/autoload.php';
$loader = new StaticConstructorLoader($composer);