Skip to content

Commit ac25626

Browse files
committed
Used autoloaded AppKernel
Composer is perfectly capable of autoloading AppKernel (via the `classmap` autoloader), this is the approach used in the [Symfony Standard Edition](https://github.com/symfony/symfony-standard/blob/05bca699ef631d03d4b114b4366ad0c180b55ecb/composer.json#L8).
1 parent 117f244 commit ac25626

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Bootstraps/Symfony.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ public function __construct($appenv)
2727
*/
2828
public function getApplication()
2929
{
30-
if (file_exists('./app/AppKernel.php')) {
31-
require_once './app/AppKernel.php';
32-
}
33-
3430
$this->includeAutoload();
3531

3632
$app = new \AppKernel($this->appenv, false);

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,12 @@ HttpKernel adapter for use of Symfony and Laravel frameworks with PHP-PM. See ht
1212

1313
composer require php-pm/httpkernel-adapter:dev-master
1414

15+
> **Note**: Make sure your `AppKernel` is autoloaded in your `composer.json`:
16+
>
17+
> ```
18+
> {
19+
> "autoload": {
20+
> "classmap": ["app/AppKernel.php"]
21+
> }
22+
> }
23+
> ```

0 commit comments

Comments
 (0)