Wollte mich heute mal mit Symfony 4 auseinandersetzen, da es ja morgen released werden sollte.
Fängt allerdings schon toll an, nicht einmal das Routing funktioniert:
Code:
app: resource: "@App/Controller/" type: annotation
PHP-Code:
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
class DefaultController extends Controller {
/**
* @Route("/", name="index")
*/
public function indexAction (Request $request) { }
}
[Symfony\Component\Config\Exception\FileLoaderLoadE xception]
Cannot load resource "@App/Controller/". Make sure the "App" bundle is correctly registered and loaded in the application kernel class. If the bundle is registered, make sure the bundle path "@App/Controller/" is not empty.
Cannot load resource "@App/Controller/". Make sure the "App" bundle is correctly registered and loaded in the application kernel class. If the bundle is registered, make sure the bundle path "@App/Controller/" is not empty.
Weiß jemand was ich falsch mache?
Update
Ohne Annotations funktioniert es (will ich aber natürlich nicht):
Code:
index: path: / defaults: { _controller: 'App\Controller\DefaultController::index' }
Einen Kommentar schreiben: