Skip to content

Commit f385366

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 8e2554e commit f385366

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
@@ -33,10 +33,6 @@ public function __construct($appenv, $debug)
3333
*/
3434
public function getApplication()
3535
{
36-
if (file_exists('./app/AppKernel.php')) {
37-
require_once './app/AppKernel.php';
38-
}
39-
4036
$this->includeAutoload();
4137

4238
$app = new SymfonyAppKernel($this->appenv, $this->debug); //which extends \AppKernel

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)