diff options
| author | Greg Roach <fisharebest@gmail.com> | 2021-05-04 09:23:18 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2021-05-04 09:23:18 +0100 |
| commit | 00c45d2300a5375d4779bf9dbe157d4ef56b9443 (patch) | |
| tree | 227fee1ab9ef7d96d85af0d46e6453214bd5326c /index.php | |
| parent | 56afe05fa72eb037740c3a05c02828a7ba30f9a9 (diff) | |
| download | webtrees-00c45d2300a5375d4779bf9dbe157d4ef56b9443.tar.gz webtrees-00c45d2300a5375d4779bf9dbe157d4ef56b9443.tar.bz2 webtrees-00c45d2300a5375d4779bf9dbe157d4ef56b9443.zip | |
Revert "Move PSR17 factories to the registry"
This reverts commit 56afe05fa72eb037740c3a05c02828a7ba30f9a9.
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 19 |
1 files changed, 7 insertions, 12 deletions
@@ -40,23 +40,18 @@ if (PHP_SAPI === 'cli-server') { } // Create the application. -$webtrees = new Webtrees(); -$webtrees->registerErrorHandler(); -$webtrees->registerFactories(); +$application = new Webtrees(); +$application->bootstrap(); + +// Select a PSR message factory. +$application->selectMessageFactory(); // The application is defined by a stack of middleware and a PSR-11 container. -$middleware = $webtrees->middleware(); +$middleware = $application->middleware(); $container = app(); $dispatcher = new Dispatcher($middleware, $container); // Build the request from the PHP super-globals. -$server_request_creator = new ServerRequestCreator( - Registry::serverRequestFactory(), - Registry::uriFactory(), - Registry::uploadedFileFactory(), - Registry::streamFactory() -); - -$request = $server_request_creator->fromGlobals(); +$request = app(ServerRequestCreator::class)->fromGlobals(); $dispatcher->dispatch($request); |
