I’m using Symfony 4.x and currently including components in Twig templates like this: my-template.twig {% include ‘/components/my-component.twig’ with { data1 : some_array, …
Tag: symfony
Prestashop Repository not found
Good morning. i have a problem using the new Symfony architecture. i created a modern controller where routing is working perfect. now i want to search products with ProductRepository. MyModule/src/…
Doctrine query builder – where IN with non string column names can’t be generated
I can’t sleep because of this, I either must be missing something really obvious or it can’t be done like that. I have this Doctrine Query Builder thingy: $this->queryBuilder ->…
How to Add message to the @Assert?
I am trying to customize Symfony validator messages! * @UniqueEntity(fields={“email”}, message=”The Email is already used.”) The unique entity error message works perfectly fine and shows up like …
Symfony – creating new entity instead of updating existing
I have the following structure: Category property that contains link to property and its value:
Manually hash (i.e. encode) a string value in Symfony 3.4
Is there a way in Symfony 3.4 to use the password encoder without an entity that implements UserInterface? Details I want to hash a random string value in Symfony 3.4. I can always use password_hash, but I’m trying to do this the Symfony way and take advantage of the framework. Here’s where I’m getting stuck: The Symfony Documentation has an
Sonata Admin: how validate remove action?
How check conditions before remove action and set flash message in sonata-admin? I do not want remove super-user. My current code: public function preRemove($object) { parent::…
Symfony 4 CollectionType Constraints – array of strings
I have a very simple array of strings being stored in a database and provided via an API. Using Symfony’s form types I’m adding validation for various bits of data. I’ve hit a wall with a …
Issue with Category tree in symfony
I created a Category Tree in symfony 5 I’ve following: Category.php Entity: /** * @ORMId() * @ORMGeneratedValue() * @ORMColumn(type=”integer”) */ private $id; /** * @ORMColumn(type=”…
why is composer not working centos symfony4
my English is very bad, I have a problem at install project symfony4.4 in server centos7 , with php7.3 , not php7.4 in windows is OK with php7.3 i run the command line /opt/plesk/php/7.3/bin/php /…