the Symfony 3.x specific tag. Use it in addition to the symfony3 tag if your question is specific to any version of Symfony 3.
Questions tagged [symfony3.x]
174 questions
2
votes
1 answer
Reset (clear) a table in Doctrine ORM 2.5 and Symfony 3.4
Using Smyfony 3.4 and Doctrine ORM 2.5 (mySql) I am looking for a way to "reset" a table.
By reset I mean I want to delete all entries of that table and reset the autoincrement for the id column. Basically I want to get the initial state when the…

user3440145
- 793
- 10
- 34
2
votes
1 answer
How can I improve the performance of a large data import in symfony?
I have to do a import in db from large csv file, about 100,000 records.
To do this I have tried dql and with the orm, but with the two options it takes me about 9 hours to complete the process.
I made the same load with Node.js and it was going much…

Tlaloc-ES
- 4,825
- 7
- 38
- 84
2
votes
2 answers
Dynamic parameters depending on environment variables (Vhost)
I’m currently working on a symfony project for our company. And I have issues figuring out how to build a dynamic configuration from an environment variable.
My main problem here is that symfony caches my “defaut_database” once, and then never…
2
votes
2 answers
Why does Symfony provide an OrderedHashMap
Symfony provides an OrderedHashMap. Its documentation states
Unlike associative arrays, the map keeps track of the order in which keys were added and removed. This order is reflected during iteration.
I'm confused by this statement, because I…

fishbone
- 3,140
- 2
- 37
- 50
2
votes
2 answers
Symfony form ChoiceType is ignoring the required attribute
On a form I add a field like this
$builder->add('cse',
ChoiceType::class,
array(
'label' => '',
'required' => true,
'translation_domain' => 'messages',
'choices' => array(
'I agree' => true
),
'expanded' => true,
…

user3440145
- 793
- 10
- 34
2
votes
1 answer
ServiceNotFoundException Symfony 3.3
In a Symfony 3.3 Project I defined a class at
../AppBundle/Helper/ProgramHelper
like this
class ProgramHelper implements ContainerAwareInterface
{
use ContainerAwareTrait;
protected $em;
public function __construct(EntityManager $em)
…

user3440145
- 793
- 10
- 34
2
votes
1 answer
Symfony4 migration: The "doctrine.database_create_command" service is private
I'm starting to migrate my application to symfony4 but I have the following deprecation notice in one of my third-party bundle ( tbbcmoneybundle . And I would like to know what to change in order to propose a PR
Currently the build is failing…

allan.simon
- 3,886
- 6
- 35
- 60
2
votes
0 answers
Symfony 3 - "Class was not found in the chain configured namespaces" when trying to build a relationship between two entities of two bundles
Using Symfony 3.4.2 , I am trying to build a relationship between two entities of two different bundles which uses their own databases located on different servers.
In other words, we have two databases, and then two entities managers :
One…

Levure
- 335
- 1
- 4
- 16
2
votes
2 answers
extend UserManager to search User by relation (symfony3)
I installed FOSUserbundle and HWI Oauth bundle.
My problem is: I want to access data from my user entity that is stored in a relation. I'd like to access the data from the fields social_network_slug and social_identifier from UserInSocialNetworks…

sneaky
- 439
- 1
- 6
- 18
2
votes
1 answer
Symfony - composer update - Dependency Injection Configuration class not found
Our project is partly made of three bundles, two of them consist of a web backend application and an associated API consumed by our Customer's Frontend Single Page Application, the last one "CoreBundle" is where common resources live.
These bundles…

Stphane
- 3,368
- 5
- 32
- 47
2
votes
2 answers
Unable to set custom data in show action field in symfony sonata admin
I have a show page and I want to add a custom value.
I have tried doing what I did in other actions which is to add an array to the
third parameter with the data key like so:
protected function configureShowFields(ShowMapper $showMapper)
{
…

Sandeep Gajera
- 229
- 4
- 14
2
votes
1 answer
TemplateListener error when trying to Symfony 3.4 beta3
I'm trying to migrate from Symfony 3.3.10 to Symfony 3.4 beta3. I have the following error:
Type error: Argument 1 passed to Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::__construct() must be an instance of…

Tokeeen.com
- 718
- 7
- 19
2
votes
1 answer
Empty $request->files (FileBag) when using a custom form (not the built in Type from SF)
I'm having issues with file uploads... I'm adding manually a few inputs within a Symfony form (Offer) to allow the user to create a new Company if he doesn't want to use one that already exists, it works very well for the text/textarea fields, but…

Jb R.
- 115
- 1
- 6
1
vote
0 answers
Symphony 3.0 Password Change security.yml
A friend who has a Symfony tool asks me to change his password. I am a PHP developer but I don't know Symfony...
I found the security.yml file with the password encrypted in bcrypt (12 passes). When I replace the password by another bcrypt password…

exexalex
- 11
- 2
1
vote
1 answer
Symfony3 Doctrine schema update after switched git branch displays error
For a Symfony 3.4 project, after having switched on an existing branch on git, I made a
php bin/console doctrine:schema:update --force
in order to create new needed fields in database.
I'm facing an error:
In AbstractMySQLDriver.php line 60: An…

olivierf
- 33
- 3