Category : symfony4

In deploying a new app to EB, I found that the .ebextensions files that concern httpd are not being deployed to /etc. The files as such are the same as the ones from another app, like this one: /.ebextensions/cors.config files: /etc/httpd/conf.d/cors.conf: mode: "000644" owner: webapp group: webapp content: | SetEnvIf Origin "^https?://localhost:[0-9]+.*|https?://127.0.0.1[:[0-9]+]?|https://mywebsite.com" REQUEST_ORIGIN=$0 Header always ..

Read more

ManyTOMany Relation , using macros Symfony 5. for my project: I need to add a Catalog and have a possibility to add several images in the same form using "macros", The problem is that I have this error and I searched a lot without any results Catalogue Twig : {% macro mediaForm(med) %} <div class=" ..

Read more

I am using symfony 4.1. I will describe my problem. I have 2 database tables: netment netment_status_history With the structure: netment: ID SERIAL netment_status_history: ID NETMENT_ID STATUS Symfony entities: Netment.php: namespace AppEntity; use DoctrineCommonCollectionsArrayCollection; use DoctrineORMMapping as ORM; /** * * @ORMEntity(repositoryClass="AppRepositoryNetmentRepository") */ class Netment { /** * @var integer * * @ORMId * @ORMColumn(type="integer") ..

Read more

I am having an issue with the EntityType class in Symfony 4 where I cannot find a way to make the form row return a string instead of an entity (Categorie). This is what I basically have as part of the form builder: ProduitType $builder ->add(‘nom’) ->add(‘prix’) ->add(‘imgproduit’) ->add(‘categorie’, EntityType::class, [ ‘class’ => Categorie::class, ‘choice_label’ ..

Read more

I had a bug in the Symfony update, as I posted below. As I was debugging, I found that $routeParams was null. Did this go out of scope in the update? There was no change in the $request->attributes->get(‘_route_params’) code. Do not identify modal /* * @Method("GET") * @Route("/manager") * * @Template("@AppBundle/Shop/Image/manager.html.twig") */ public function managerAction(Request ..

Read more