My profiler toolbar isn't showing up in symfony 4.3.1
In my .env file, I have specified my app environment to be dev and debug to be true like so:APP_ENV=devAPP_DEBUG=trueIn my config/packages/dev/web_profiler.yaml file I have the following:web_profiler:...
View ArticleUncaught PHP Exception...
I just started following a symfony 4 tutorialI set up the whole project with composer and got the index file showing up in browser http://127.0.0.1:8000/I'm stuck on the very first...
View ArticleErreur : An exception has been thrown during the rendering of a template ("Some
In my project I have members who each have different galleries. I'm looking to make a method that allows me to have all the showrooms associated with my member. I have a OneToMany relationship between...
View ArticleConfirming form after form has been submitted and validated in Symfony
I have a appointment form once it has been submitted you get a confirmation of the data you've filled in, The confirmation has a button that when pressed on it it should insert the data to the...
View ArticleSymfony service decoration, what does it actually mean?
I am new to Symfony. I read about service decoration but I don't still understand it. What does it actually mean to decorate a service in Symfony?
View ArticleI've defined a bundle Controller and Routing, but I get "Error: the...
I have created a controller class under a module directory in Symfony 4. My bundle's routing file references it. My root's routing file includes the bundle's routing file.However I get an error 500,...
View ArticleSymfony 4.3 PHP: How to read the cookie from a 302 redirection response?
What I want to do (in the controller)Receive a request, based on whichSend an external HTTP requestParse the response, based on whichReturn a responseI plan to have multiple functions that all follow...
View ArticleSymfony JWT - Change the login way using symfony lexik JWT Authentication Bundle
In the Symfony Lexik JWT Authentication bundle, It is explained how to authenticate users using a table in the database.In my case, My users aren't in the database but are in another application that I...
View ArticleSymfony 4 Form file upload field does not show selected filename with...
Using Symfony 4.2.5, I made a Form with a FileType file upload field as described at upload file. I used the Bootstrap 4 theme as described at form_themes and bootstrap4.config/packages/twig.yaml...
View ArticleHow to filter annotation for Many To Many on an API platform
I've follow the implementation of filters with annotation to load only the sources concern for one user. Very usefull, work...
View ArticleHow to force locale after setLocale is deprecated?
I need to render documents in different languages. Therefore I used to use the following code:use...
View ArticleUse integer for relation
I'm implementing a REST API, and I would like to implement a quick and easy way to create and persist entities.Therefore, I created an entity like so, where $plain is a basic associative array: public...
View ArticleAutowire request body to controller
I'm searching for a clean and simple way to autowire a POST request's body as a controller action argument, and deserialize it at the same time if application/json is set.I've looked at events or...
View ArticlePrevent exceptions from being displayed on the terminal in Symfony 4.4
I'm working on a Symfony 4.4 console command and I want to prevent exceptions from being displayed on the terminal. I've already set up a logger to log the exceptions, but they still appear on the...
View ArticleTemplate is showing only in html
I have a problem with rendering a page with expanding in base template it only shows in html with no css or js.This is what is shows:imgI'm trying to understand the problem and it seems illogical cause...
View ArticleHow to embed images in a symfony mail?
So I designed an email template for my reset-password system.In the email templates, there are Images (logo).I placed those images inside a folder called Email_Images and that folder is placed inside...
View ArticleSymfony 4 Flex Database connection using `urlencode`
I am starting a new project using Symfony 4 + Flex. At this time I'm trying to connect my new app to a MySQL database.I'm following the Symfony Documentation, and I have already add doctrine to my...
View ArticleSymfony 6.4 multiple connections, update not always working
I'm using Symfony 6.4 with multiple connections.I have 2 databases (P2223 and P2324) with the same datatables struct, but with different data.My...
View ArticleHow to add placeholder on an input in Symfony 4 form?
In a Symfony 4 form, I am trying to get a placeholder on my input. I tried the code below, but I get an error telling me it's not allowed. Any ideas how else I can achieve...
View ArticleOPTIONS request gets a "401 Unauthorized" response
I crafted an API with Symfony 4 that uses a custom token verification. I tested the API on Postman and everything works perfectly, now I want to use the API using jQuery and fetch all the data , but in...
View ArticleHow can I make a symfony 4 command to be registered only in dev environment...
In my App I have a helper class App\Command\GenerateFixturesCommand that provides a command named my-nice-project:generate-fixtures.This command consumes a service of my own project named...
View ArticleHow to get .env parameter from a controller?
From symfony 4, I want create a global parameter and get the value of this parameter from a controller. This parameter is the path of an another app in the server. So, I thinked add the paramerter in...
View ArticleEasyadmin : display tooltip in index page
Is there anyway to add tooltip functionality to easyadmin 'index' page?In documentation, the sethelp function can be used only in the 'detail', 'edit' and 'new' pages.
View Articlesymfony 4 : How to get "/public" from RootDir
I have an image under the public folder.How can I get my image directory in symfony4 ?In symfony 3, it's equivalent is :$webPath = $this->get('kernel')->getRootDir() . '/../web/';
View ArticleSymfony PHPUnit - Inject dependency
I want to test this TokenProvider<?phpdeclare(strict_types=1);namespace App\Services\Provider;use App\Repository\UserRepository;use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;use...
View ArticleHow to enable profiler in symfony 4
Solved:I re-install it all over again and now it contains the web_profiler.yalm inside. Thanks to all.The original question was:I´m just starting to learn Symfony so I downloaded the free videos at...
View ArticleThere is no extension able to load the configuration for "sentry"
I have this error in my symfony 4 project :There is no extension able to load the configuration for "sentry" (in C:\SourceGit\Sentry\taxeapprentissage\config/packages/sentry.yaml). Looked for namespace...
View ArticleSerialization of 'Symfony\Component\HttpFoundation\File\File' is not allowed,...
I've added an avatar image to my User class. When I wanted to render my edit form, I got this errorSerialization of 'Symfony\Component\HttpFoundation\File\File' is not allowedI tried to solve the...
View ArticleHow to load a custom config file in a Bundleless application with Treebuilder?
I'm trying to import a custom config file called test.yaml.I put the test.yaml in the config/packages/local folder and in config/packages folder.The test.yaml file looks like this:#...
View ArticleSymfony Authenticator doesn't Authenticate properly (Authenticator doesn't...
Recently I was stuck in a bug and I have no idea why it doesn't work I hope u guys have an idea.So the point is I wanna create a login for my admin so I create it entity \App\Entity\Admin, controller...
View Article