13 questions
0
votes
1
answer
343
views
"This value should be of type string" in Symfony DataTime validation, while mapping a request
In Symfony 7 app, I'm mapping request with MapQueryString/MapRequestPayload attributes. Controller's endpoint returns validation errors if request's parameter is of the wrong type. Here it is of type ...
-1
votes
1
answer
520
views
Symfony HttpKernel Component not resolving controllers nor showing any errors in standalone setup
The HttpKernel component from Symfony is, alone, a powerful component to deal with the Request to Response conversion during the Client browser's HTTP Requests. I have been, however, struggling to get ...
1
vote
1
answer
4k
views
Symfony HttpKernel surequest "There is currently no session available" error
Symfony 5.3.10
PHP 8.0.8
I have a public webhook used for user activation (by clicking a link in an email).
Something like: https://mydomain.fake/user/123-5346-6787-89-789/1234678567945asd
The ...
0
votes
3
answers
520
views
symfony 3.4 redirect a user on a page depending on his status
Goal : redirect a user depending on a status, on the whole website when the user is logged.
I need to force the user to be on one page until he has changed his profile
So i try to make a ...
5
votes
1
answer
12k
views
How can I find app/AppKernel.php in Symfony 4?
I want to register a bundle in the AppKernel Class in Symfony 4 according to this tutorial:
https://symfony.com/doc/3.3/bundles.html
But I do not find a folder "app", and also not the file AppKernel....
1
vote
1
answer
261
views
How to retrieve Symfony 3's Kernel instance in an application?
I would like to access Symfony 3's Kernel.getEnvironment() in a service implementing the ContainerAwareTrait.
I am wondering whether I should implement an instance of the Kernel object or whether one ...
2
votes
0
answers
44
views
Implementing Symfony Kernel with custom Routing Mechanism
I am trying to implement Symfony Kernel into a legacy application I developed which had a custom mechanism for handling URL routing.
Is there a way of replacing the routing mechanism supplied by ...
6
votes
2
answers
10k
views
Get kernel root dir in Twig template with Symfony 2
I need to get kernel.root_dir in my twig template, I found solutions here, but it does not work. I get error about non existing method Kernel in this class. Realy in GlobalVariables class method ...
2
votes
0
answers
115
views
Can you create your own spool in symfony 2?
I'm trying to log stats after my response has been sent in Symfony 2.
I'm using the kernel.terminate event but I can't use the session from it because headers have been sent.
So I'd like to use a ...
12
votes
3
answers
20k
views
How can I dynamically set a parameter in Symfony2?
I'm trying to dynamically set a parameter in Symfony2 (that I cannot statically set in my parameters.yml file). My approach is to use an EventListener:
namespace Acme\AcmeBundle\EventListener;
use ...
5
votes
2
answers
2k
views
Symfony2 - Access kernel from a compiler pass
Is there a way to access the kernel from inside a compiler pass? I've tried this:
...
public function process(ContainerBuilder $container)
{
$kernel = $container->get('kernel')...
7
votes
1
answer
3k
views
Symfony2 Kernel vs HttpKernel
I'm trying to follow this article:
http://fabien.potencier.org/article/62/create-your-own-framework-on-top-of-the-symfony2-components-part-12
Also looking at HttpKernel
https://github.com/symfony/...
6
votes
2
answers
4k
views
Service DependencyInjection in Symfony2
I needed to move my model from the controller method, so I got help to change it to a service. The service by itself works, but I need to be able to connect to doctrine and the kernel from inside of ...