I have some commands that format the output to the console. Those commands are written using the Symfony Console component and formatted using its styles. When run in the console, the formatting is …
Tag: symfony
api platform – Unable to generate an IRI for the item
I’m starting with API Platform and I’m using the example entity “Foo”: I succesfully see the new Entity in dashboard (See image): API Platform Dhasboard And I had the following error when I try to get all Foo collection: I tried different formats and check the the routes too: It’s possible what I need some special library in my server?
Symfony 3.4 Use view inside my bundle
I’ve some trouble for the configuration of a new repository using Symfony 3.4. I’ve used the symfony command for create him with last LTS (3.4) and I add a new Bundle using command too. My new Bundle is up and work well but I can’t use view stored inside this bundle. I show you the structure of my Bundle :
Enabling php ext-xml?
While trying to use Composer to create a Symfony 4 project I got the following error: I did search in php.ini for ext-xml to see if I could uncomment it in order to enable it but I did not find any mention of ext-xml. I have not searched anywhere else because I am very unsure about what I am doing.
How to disable csrf in symfony?
I used the code below and it has csrf too. But how can I disable its csrf? I searched and Disable CSRF token on login form did not help, as there createFormBuilder() is not used in my case below, so what should I do? Answer
Programmatically load Entity in symfony
I am trying to load in Entity classes and use within a loop in order to load content in dynamically from files into relating tables. Is there any way i can load in all Entity files from the following …
symfony @oneToMany relation returns only last object in collection
I have a situation and not really sure what I’m doing wrong. in Sumfony 3.3 I’ve created a relation between entity Page and Language, where Page is related to multiple Languages, and when I search for a Page and get Page object but property Languages returns collection with only last Language object. No matter how many objects are there in
Instantiate new class instance inside Symfony services (Best practice)
In Symfony when I create a service and I need an instance of some classes, I pass them as parameter in service or I can create a new instance inside my functions service. I ask this because some Classes constructor needs parameters which I don’t have yet when passing the class as parameter. Answer you pass them as params in
Laravel – store() method suddenly not working
I have a file upload method for a single image working properly, using the following code: $file = $request->file(‘file’); if ($file && $file->isValid()) { $photo[‘size’] = $…
Doctrine select with null
Is there a possibility to execute something like: $builder = $this->getEntityManager()->createQueryBuilder(); $builder->select( ‘f.id’, … ‘NULL AS missing_attribute’…