mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
7afab3043d
commit
823bc3b9ce
@ -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`.
|
||||
|
Loading…
Reference in New Issue
Block a user