Skip to content
Advertisement

Tag: symfony

“Error [Semantical Error] The annotation “@DoctrineORMMappingOnetoMany” in property” on Gitlab CI but not in local env or production [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed last year. Improve this question I’ve

symfony CLI, how to open ports on mac? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 11 months ago. Improve this question I’m trying out Symfony for the first time, so I installed all the stuff required to create ant run apps, but I’m having problems with

Doctrine – relation of three tables

I have trouble with writing Doctrine Query Builder. I have a Posts table which is related to the AccountToken table like: I am writing a query builder where I want to pull all the results which are related to that table via UUID and have a specific status. The type value is defined in the AccountToken table. In that table,

How should one get Session object in a controller on Symfony 5.3?

I’m a little confused as to the “right” way to retrieve the current session object within a controller in Symfony 5.3. The current documentation says to typehint an argument as SessionInterface. However, this Symfony blog post says SessionInterface has been deprecated in favor of using RequestStack. In services it’s clear that I should inject RequestStack and call $requestStack->getSession(). However, in

php write csv to file returns blank file

I have some csv data that looks like this: When I try to export this csv to a file like this: I get an empty file, what am I doing wrong here Answer From the Symfony docs: https://symfony.com/doc/current/components/http_foundation.html#request If you just created the file during this same request, the file may be sent without any content. This may be due

Symfony mocking repository for testing

I’m trying to mock a repository containing all modules, and it has a method called findAll() that returns all elements from that repository. I cant seem to be able to pull any data from the mocked repository. Any ideas how I could fix it? Mocking repository: Trying to use method from ModuleRepository class called findAll() that returns all elements from

Only annotation mapping is supported by Maker Bundle

I have changed the configuration of my Symfony project to use PHP attributes with Doctrine in my Entities. I was really happy about this and wanted to give it a try. I have changed my doctrine.yaml from annotation to attribute and use attributes in my entities With this configuration my php bin/console do:sc:up -f works well. But when I try

Can I use autowired EntityManager across different services with DB locking?

In my Symfony 5 project I have 2 services and I autowire EntityManager into both of them: and I run some DB transaction inside one of the MyService2 functions: and I call some helper function from MyService1 which uses also its own $entityManager property and should be executed also inside that same DB transaction. My question is: am I guaranteed

Advertisement