In 2013 the "Symfony Plugin" for PhpStorm was born. Today we see over 1 million downloads and several other plugins for projects like Laravel, Drupal, Shopware, ... that help to improve your productivity.
I will talk about Symfony related features and will give you some tips and tricks. Also, we take a look at the infrastructure behind these plugins and how I maintain all of them.
11. “There are to be some PSI structure changes; I see that your plugin use YAML extensively
so something will definitely break. To be honest, I wanted to do some changes which
may even break compilation, but I can leave some legacy code. However, one will need to
fix the usage of PSI so I don't think it's a big problem.”
JetBrains API
12.
13. “There is a patch to master which compiles but leads to about 60 tests failing.
However, you can look through the changes to have an idea of what's
happening.”
JetBrains API
31. Events
final class KernelEvents
{
/**
* @Event("SymfonyComponentHttpKernelEventFilterControllerEvent")
*/
const CONTROLLER = 'kernel.controller';
}
*
* This event allows you to change the controller that will handle the
* request. The event listener method receives a
* SymfonyComponentHttpKernelEventFilterControllerEvent instance.
*
* @var string
*
* @api
*/
const CONTROLLER = 'kernel.controller';
Symfony Event Definition
41. Twig Doc (controller)
public function indexAction()
{
$this->render('index.html.twig');
$this->renderView('index.html.twig');
$this->renderResponse('index.html.twig');
}
42. Twig Doc (controller)
public function indexAction()
{
return ['foo_request' => new Request()];
return $this->render(null, ['foo_request_render' => new Request()]);
}