I'm trying to use Doctrine's MongoDB ODM with FlightPHP in what I thought would be a pretty quick little project.
I've registered the DocumentManager class with Flight like so:
$dm = DocumentManager::create( $connection, $config );
Flight::register('dm', 'Doctrine\ODM\MongoDB\DocumentManager', array($connection, $config));
// Endpoints
Flight::route( '/api/create', function ( )
{
$thing = new Thing();
$dm = Flight::dm();
$dm->persist( $thing );
$dm->flush();
} );
And it appears that flight tries to call Doctrine's constructor which is protected? What are my options to get around this?
Fatal error: Call to protected Doctrine\ODM\MongoDB\DocumentManager::__construct() from context 'flight\core\Loader' in /../vendor/mikecao/flight/flight/core/Loader.php on line 116