Questions tagged [Symfony] (1561)

1
answer

How to pass a parameter to the Symfony command?

Run the console command that takes an id parameter, how do I transfer it there?
Skylar41 asked March 31st 20 at 13:58
0
answer

In essence Symfony 4.3 (field type datetime) is to give default_value NULL?

Database is MySQL/MariaDB, c datetime field default value = "0000-00-00 00:00:00". On the recommendations of the NULL is not put, because default_value faster sample rate from the database.//src/Entity/Customer.php /** * @var \DateTime * * @ORM\Column(name="last_bill_date", type="datetime", nullable=false, options={"defa...
Leilani2 asked March 30th 20 at 01:29
1
answer

How to call a Symfony service to call in different places?

Hi all. There Is A ClassBaseBuilderpublic function __construct(string $file, array $mapping) { $this->file = $file; $this->mapping = $mapping; } This class I use two different services that are called in different ways.FirstBuilder: public: true autowire: false class: App\Builder\BuilderBase arguments: $file: '...
Kurt_Kilback asked March 30th 20 at 01:27
1
answer

Symfony ChoicesType?

Hi. Guys like me choicestype to load your category?$builder->add('category_id', ChoiceType::class, [ 'choices' =>$this->getCategory(), 'by_reference' => false, 'placeholder' => 'Select category', 'required' => false, 'label' => 'Category', ]);public function getCategory(){ $w = new \Doctrine\ORM\...
Bobby asked March 30th 20 at 01:27
1
answer

Normal is the architecture?

Prompt, please, who understands the patterns and DDD. In the context of Symfony. situation: We have to work with comments. To create comments for API to pay via API to create a review, you need only the comment text and the id of that comment, 2 fields. Made for this model CommentNew { text; commentable; } After the comment...
Allene.Strac asked March 30th 20 at 01:21
2
answers

How to force Symfony 4.3 razlozhenii user ID?

The administrator should periodically change user roles. The problem is that the current role of the user is cached when zalogina. And change of roles in the database does not change the actual permissions of the access methods IS_GRANTED (annotations, twig, etc.) Tell me how to force razlozhenii need a user ID ? Thanks in ...
Seth.Bli asked March 30th 20 at 01:08
3
answers

Symfony multiple cores?

Colleagues, good afternoon. The question is addressed to experts in Symfony Have 2 of the same controller, but with different surroundings. As the project is implemented multicore. But there isn't a nice feature. admin.food.local/product.get api.food.local/product.get Depending on the associated address, called the controll...
saul59 asked March 30th 20 at 01:01
0
answer

How to fix Serialization of 'Symfony\Component\HttpFoundation\File\File' is not allowed?

Class Customer implements UserInterface added a ManyToMany relationship with the Specialist class, which contains in its properties File. Got error Serialization of 'Symfony\Component\HttpFoundation\File\File' is not allowed How to fix it without crutches? Google offers to make a crutch in the form of the essence of the lin...
Easton3 asked March 30th 20 at 01:00
0
answer

Marketplace on Symfony — what to take for a basis?

You need to develop a fairly specific marketplace. To begin with a clean slate is not desirable. Taking as a basis the hardened dinosaur type OpenCart is also dumb in the days of php 7.3 and cool new frameworks. I know that Symfony is, at least, 3 online store, which are more designers than ready-made solutions. But they h...
Junior3 asked March 30th 20 at 01:00
4
answers

Does it make sense to start learning Symfony if more or less familiar with Laravel?

I am in General familiar with Laravel (can blozhik to write or store there is one..), and in General it is quite convenient as a base for projects, but I was wildly infuriating marvelesque documentation, which sort of is, but in fact it as not because she is overloaded with terms and set out very inconsistently, designed fo...
riley62 asked March 30th 20 at 00:43