Simplified upgrading docs around index.php

No need to paste the file there if we're auto upgrading it.
The guide is long enough already :)
This commit is contained in:
Ingo Schommer 2017-10-10 10:26:11 +02:00
parent 7afab3043d
commit 823bc3b9ce

View File

@ -99,29 +99,6 @@ cd ~/Project/Root
This will ensure that your `.htaccess` and `index.php` are set to a reasonable default value
for a clean installation.
After upgrade the `index.php` should look something similar to the below:
```php
<?php
use SilverStripe\Control\HTTPApplication;
use SilverStripe\Control\HTTPRequestBuilder;
use SilverStripe\Core\CoreKernel;
use SilverStripe\Core\Startup\ErrorControlChainMiddleware;
require __DIR__ . '/vendor/autoload.php';
// Build request and detect flush
$request = HTTPRequestBuilder::createFromEnvironment();
// Default application
$kernel = new CoreKernel(BASE_PATH);
$app = new HTTPApplication($kernel);
$app->addMiddleware(new ErrorControlChainMiddleware($app));
$response = $app->handle($request);
$response->output();
```
#### Upgrade references to renamed and namespaced classes
Nearly all core PHP classes have been namespaced. For example, `DataObject` is now called `SilverStripe\ORM\DataObject`.