Questions tagged [symfony5]

Use this tag for questions addressing particular features of the PHP framework Symfony in version 5. Otherwise use only the general [symfony] tag plus the language tag [php].

Symfony is a framework for web and CLI-applications built on top of a catalog of Symfony components. It is free software released under the MIT license. The project's homepage is symfony.com.

Symfony 5 was released in November 2019 and includes several changes compared to its predecessor. However there are no new features compared to version 4.4.

1079 questions
-1
votes
1 answer

Is it possible to use cli command to build translation if I use constant in $translator->trans();

Is it possible to use Symfony CLI command (ex: php bin/console translation:update --force -en) to build translation if I use a constant in a translator like that: $translator->trans(self::ANY_CONSTANT); That doesn't work for me now... But, if I…
Muzikool
  • 1
  • 6
-2
votes
1 answer

Symfony 5 Resolving environment variables inside another one

Is their any possible way of referencing an environment variable into another one. Here is the problem I'm trying to solve. I have two deployment server for testing purpose both have different databases, I want to switch the DATABASE_URL secret…
Moeen Basra
  • 733
  • 4
  • 18
-2
votes
1 answer

How to create different the authentication error message in Symfony 5.4?

By default, it shows error "Invalid credentials.". I've already seen answers like "Go to translations, create security.en.yaml and type this: # translations/security.en.yaml 'Invalid credentials.': 'Invalid email or password' But how to create…
Alexander
  • 30
  • 5
-2
votes
1 answer

Symfony 5.4 profilerlistener takes a long time on each request

I have just started a new symfony project with the --web-app command to install all relevant bundles for starting a web application. After creating some controllers I noticed that each request takes a few seconds (which it never dit in previous new…
-2
votes
1 answer

Send array to javascript from Symfony controller

I need to send data array from Controller, but i don't know what is the good way. I think the controller should send the array in json. This is my js code: $.typeahead({ input: '[data-autocomplete="team"]', minLength: 1, …
user3461461
  • 306
  • 2
  • 3
  • 16
-2
votes
1 answer

The parameter "env(DATABASE_URL)" has a dependency on a non-existent parameter "F)". Problem with DATABASE_URL, Symfony

I am trying to run a test site on a server. It's written in Symfony 5.1. I get an error: The parameter "env(DATABASE_URL)" has a dependency on a non-existent parameter "F)". My DATABASE_URL in .env file is in a format…
brnina
  • 27
  • 1
  • 4
-2
votes
1 answer

Unit tests for checking content that is rendered in template

I was browsing a little and was not able to find any solutions for something I want to accomplish. I am in Symofny 5 project and I am writing some Unit tests. The goal of my tests is to check, if the messages will appear as they are defined. The…
makeda202
  • 19
  • 4
-2
votes
1 answer

Configure Symfony 3rd party bundle with container parameters declared in custom container extension / compiler pass

I want to configure the Doctrine bundle to have a DBAL connection. For some reason the configuration needs a bit of logic to retrieve. I tried to use a container extension and then a compiler pass to execute the logic while the container is compiled…
AymDev
  • 6,626
  • 4
  • 29
  • 52
-2
votes
1 answer

How to implement Symfony 5 Authentication without Doctrine?

Am in the process of rewriting an existing PHP project to Symfony 5.3. I want to upgrade its authentication system to Symfony's. Only issue: Doctrine is not an option in this project. How can I use Symfony's authentication (possibly together with…
Charles
  • 179
  • 1
  • 15
-2
votes
1 answer

SYMFONY 5 - I try to put HTML code in mysql and it's not working

So I'm working on a project where I have a database that i've created with Symfony 5 and i'm using easyAdmin as a back-of /** * @ORM\Column(type="text") */ private $description; I try to put html code like :

Test

but the website display me…
Locc35
  • 1
  • 1
-2
votes
1 answer

Symfony 5 / EasyAdmin 3 / exception when trying to turn filters on

Symfony 5.2.6 (env: dev, debug: true) PHP 7.4.9 (cli) (built: Aug 4 2020 11:52:41) ( ZTS Visual C++ 2017 x64 ) EasyAdmin 3.2.7 Simple user entity (using uuids) with manytomany relation to userRoles. Adding filters in adminUserCrudController public…
-2
votes
1 answer

How to map entity to db already created with Doctrine/Symfony5?

I want to deploy my Symfony5 project on to a remote shared hosting (Hostinger). I've already set up an account on Hostinger and I've also managed to create a database through their database module using "phpMyAdmin". Now, how can I work with…
-2
votes
1 answer

How to get the status of the production server symfony

When starting the server locally I executed the command symfony server:prod using the Symfony Local Web Server which gives me to understand that I changed the state of the server environment to production. Since then, each time I run the local…
-2
votes
2 answers

Symfony 5 - Accessing nested object in

Me again :( I am really sorry ... Probably working to long and I can't see the solution. I have a contact form. The form data is handled in the ContactController /** * @Route("/contact", name="contact") * @param Request $request *…
Mark
  • 69
  • 10
-2
votes
1 answer

Symfony 5 - Semantical *** Error has no field or association named category.id

I have this issue and I don't know really why... The Repository : /** * @return Creations[] */ public function displayOne(): array { return $this->createQueryBuilder('c') ->andWhere('c.category.id = 1') …
Locc35
  • 1
  • 1