symfony-2.8 Questions

3

Solved

What is best way to convert Doctrine entity persistent collection to array with symfony 2 ? I want to get the values and later by using that array value, need to get the second entity values which ...
Orpah asked 12/3, 2019 at 12:27

1

I want to have that a filtered field in sonata admin datagrid mapper can be OR or AND connected with the user given filter values ... for example the field "Name" can be "John" or "Sandy" ... In th...
Finbar asked 11/12, 2017 at 11:9

2

In the documentation it lists examples for applying a class validation constraint to Annotations, XML and YAML but not for PHP. Since the validation is not applied to a property, where do I add th...
Doggery asked 23/3, 2017 at 16:19

3

Solved

I am changing my assets from PNGs to SVGs, where appropriate, however I am having difficultly including these SVGs in my Twig templates. I am trying to include the SVG like this: {{ source('/asse...
Arica asked 25/10, 2017 at 13:40

8

Solved

In Symfony 2.8/3.0, with our fancy new security components, how do I get the currently logged User (i.e. FOSUser) object in a service without injecting the whole container? Is it even possib...
Scene asked 26/4, 2016 at 16:8

2

So, I am working on a project and I am having an issue as I keep getting both errors and warnings. I am quite new to PHP so be gentle. The program runs fine using PHP 5.5 However when I run the pro...
Polymerism asked 11/10, 2016 at 15:53

6

Solved

How can I rewrite this code in order to get last inserted record from the table? $repository = $entityManager->getRepository('AdminBundle:MyTable'); $product = $repository->find($id); I t...
Roethke asked 3/1, 2018 at 6:34

2

My goal is to return a message to my web-page, where it is to be displayed, but instead of just the message, the value returned contains the message and html code for an error page! Here is the Sym...
Mannos asked 14/3, 2021 at 3:5

2

Solved

I am working on the project which is already build on Symfony. The versions and server details are as below PHP: 7.2 Webserver: apache 2.4.6 Symfony: 2.8.1.1 I am getting below warning while i...
Anthrax asked 31/10, 2018 at 9:11

5

What is the best way to get the root app directory from inside the controller? Is it possible to get it outside of the controller? Now I get it by passing it (from parameters) to the service as an...
Aryan asked 9/2, 2012 at 17:29

2

Solved

Symfony 2.8 is the last release of the 2.x branch and the previous LTS. Symfony 3.4 is the last release of the 3.x branch and the current LTS. What steps are required in order to upgrade Symfony ...
Rosaline asked 17/9, 2018 at 21:20

3

Solved

the adutomatic crud operation generated by symfony and also the symfony demo application has the following code structure for the delete action /** * Deletes a testing entity. * * @Route("/{id...
Graptolite asked 5/1, 2016 at 6:26

1

Solved

I wanted to upgrade my old Symfony project from 2.8 to 4.0 but I stacked at upgrade from 2.8 to 3.4. I used this tutorial for the upgrade Moving to Symfony 3.4. I got some errors while trying to u...
Niggerhead asked 19/4, 2018 at 9:31

1

When I run php -d memory_limit=2G ../composer/composer.phar install, I get an error about the non-existent parameter "database_driver" parameter. However, if I remove all references from my paramet...
Mesne asked 28/6, 2017 at 3:59

1

Solved

I have a Symfony rest api build with fos restbundle and I'm deserializing a json PUT request in order to update a doctrine entity with a to-many relation. However, the to-many child objects which a...
Autolysis asked 30/3, 2018 at 11:29

2

Solved

How to have the debug bar on all the website ? In the administration side I activate the debug mode, but the Symfony debug-bar is visible only in the "modules" part. Is it possible to display it on...
Drove asked 19/12, 2017 at 13:14

1

I'm using symfony 2.8, I'm new to symfony,I have implemented login and registration, registration is working fine but when I login it showing this error Type error: Argument 4 passed to Symfony\C...
Parrnell asked 25/9, 2017 at 9:52

1

I have downloaded and installed Symfony 2.8 from my own PC. I copied my project and paste it in our companies' pc. I have not created and connected to the database yet. I tried to do php app/consol...
Osmometer asked 1/8, 2017 at 8:52

3

I have created a script that read data from a CSV file, check if the data already exists in the database and import it if it does not. If the data does exist (the code of a specific product) then t...
Chromoplast asked 18/8, 2017 at 14:31

2

I am trying to unit test my bundle and I want to get unit of work from EventManager Mock. Basically, I want to get the last persisted object. I know in normal application, I can do the same with a ...
Discobolus asked 27/6, 2017 at 14:16

4

Solved

I'm trying to use the new LdapUserProvider in Symfony 2.8. I believe I have configured everything per the docs. My user can successfully authenticate, and then gets redirected to the secured page....
Tammy asked 18/12, 2015 at 23:30

1

I want to store database connections in a static database. On demand I want to create a new database, store the credentials in my static database and then create the schema inside the new database ...
Prostatectomy asked 30/3, 2016 at 11:3

2

Solved

in my project I have some forms with choice types with a lot of options. So I decided to build an autocomplete choice type based on jquery autocomplete, which adds new <option> HTML elements...
Gabbey asked 17/2, 2016 at 12:2

2

Solved

Is there a correct way to customize a form depending on the role of the user that requests it? My scenario is pretty simple: I need to hide some fields if the user has not the ROLE_ADMIN granted. ...
Interlanguage asked 16/2, 2016 at 12:59

2

Solved

Doing a composer update today suddenly getting the following error: [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] You have requested a non-existent service "fos_us...
Shaggy asked 27/1, 2016 at 7:41

© 2022 - 2024 — McMap. All rights reserved.