Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Browsing all 3924 articles
Browse latest View live

Generate query on doctrine querybuilder

I have three entities Compound, ComponentQuantity, and Component the Compound has a ManyToMany relationship with ComponentQuantity and ComponentQuantity has a ManyToMany relationship with Component.I...

View Article


Symfony, set a lock in a command to lock another command

On Symfony 4.4, I am trying to establish a lock in a command and keep it alive until explicitly released. Reading the docs I understand that this should be obtained with the $autoRelease param of...

View Article


Error trying to send email with Symfony Mailer

How do you configure Symfony Mailer? I'm swapping Swiftmailer to Symfony Mailer because Swiftmailer is now deprecated. However, I haven't been able to send a single email with Symfony Mailer yet....

View Article

Image may be NSFW.
Clik here to view.

Symfony 4.4 getResult hydrator slow - PHP 8.1

I updated my old Symfony 4.3 application to 4.4 and i moved the application on a new server with PHP8.1 and mySQL8. Before i used a Server with PHP7.4.I noticed now that my application is very slow on...

View Article

Image may be NSFW.
Clik here to view.

"php bin/console server:run" immediately followed by "composer require...

I'm working on a Symfony project and would like to know why whenever I run the following command in terminal php bin/console server:run it would be immediately followed by this one composer require...

View Article


Image may be NSFW.
Clik here to view.

Upgrading Symfony 2.3 to 4.4 [closed]

How time consuming is migrating a medium/large sized legacy Symfony application from version 2.3 to 4.4 compared to rewriting it in a different framework?From the research I've done it seems like quite...

View Article

Image may be NSFW.
Clik here to view.

How to get only text instead of list item from form_errors

I'm trying to display an error message for a repeated password field in Symfony 4.4.Here is the relevant code in the form class file:->add('password', RepeatedType::class, array('required' =>...

View Article

Get base url on symfony 3.4 command

I'm trying to get the base url on a command to get localhost on local and the production url on producction but all the exmaples I found are using the reuqest object but Idon't have it on a...

View Article


How to pass UserInterface as a parameter to the encodePassword function

I would like to know how to pass UserInterface as a parameter to the encodePassword function. Actually, when running the following command line php bin/console doctrine:fixtures:load , I got this...

View Article


Symfony PHPUnit tests don't authenticate user

I have a Symfony 4.4 project. Login, authentication, and authorization work fine on web.To simulate authentication in unit tests, I'm using Symfony's example....but that's not working. The user is not...

View Article

Passing argument as array in Symfony 4.4 Process Component

This is the process command I have to execute, The argument contactIds is an array. $process = new Process(["php","../fairgate4/bin/console","contactlist:remove", $contactIds // array ]);...

View Article

Symfony 4.4 - Swift Mailer installation failed

I'm a beginner in Symfony and would like to know how to deal with the following installation issue:I'm using Symfony 4.4 and trying to install Swift Mailer. Following the documentation on this link,...

View Article

Authenticator with user activation system: modify login error message

I'm implementing a security system that, apart from credential, checks if user is enabled. To check if user is enabled after checking credentials is easy in my AppAuthenticator.But the problem is I...

View Article


Validating username password with LexikJWTAuthenticationBundle before...

I want to perform traditional validation of username( character count and valid email) and password (character count) before authentication is performed. The users are in database and I don't want to...

View Article

Syntax Error - line 0, col 50: Error: Expected end of string, got '.'"

I'm using symfony 4 and doctrine. This is my doctrine query.public function paginationQueryByAttributes($attributes) { $qb = $this->createQueryBuilder("c"); $qb->select('c'); if...

View Article


Symfony 4.4 not iclude .env.local

4 (upgraded) . And .env.local is not included what can be a reason ?requirements "symfony/acl-bundle": "^1.0","symfony/asset": "^4.4","symfony/console": "^4.4","symfony/expression-language":...

View Article

ParseError: syntax error, unexpected 'EntityManagerInterface' (T_STRING),...

This code produces the error:/** * @var EntityManagerInterface */private EntityManagerInterface $entityManager;public function __construct(EntityManagerInterface $entityManager){...

View Article


Overriding the label of a single form field to include HTML in Symfony 4.4

I am having issues overriding a label in my form in my Symfony 4.4 application:{{ form_row(form.legal, {'label' : 'personal.form.fields.legal'|trans}) }}personal.form.fields.legal looks like this:I...

View Article

How to load route from a deactivable bundle

After many searches, I don't find how to load dynamically routes from a bundle that could be "deactivated". In a legacy project using Symfony 4.4, a custom script could enable or disable a bundle. This...

View Article

Bulk setting Symfony form field values with setData in SF4.4

In my Symfony 4.4 application I have the following code inside my controller. I am attempting to pre-populate the form based on previous submissions or data pulled from the database. Importantly, the...

View Article
Browsing all 3924 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>