Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Browsing all 3925 articles
Browse latest View live

After updating from 10.6 pimcore v to 11 version, facing version count issue

I have updated pimcore 10.6 v to pimcore 11, followed all the steps as per pimcore documentation.i executed 2 commands. In the version command getting below error attachedcommand => php...

View Article


JMSSerializerBundle deserialization skip groups exclusion on id property...

I'm using jms/serializer-bundle 2.4.3 on a symfony 4.2 and a I noticed an annoying problem in my application : when I post an entity, the DoctrineObjectConstructor uses id in content to retrieve...

View Article


API Platform serialization groups with multiple views

I'm sure I'm probably misunderstanding the documentation or the point of serialization groups. But I'd like to be able to specify that, for example, an index of reports not include the JSON data of the...

View Article

Symfony 4, get .env parameter from a controller, is it possible and how?

From symfony 4, I want create a global parameter and get the value of this parameter from a controller. This parameter is the path of an another app in the server. So, I thinked add the paramerter in...

View Article

How to migrate deprecated symfony doctrine ObjectType into dunglas...

We are using Symfony 4.4 and before doing next major updateswe want to switch from deprecated Doctrine\DBAL\Types\ObjectTypeto dunglas/doctrine-json-odm.I am now looking for an easy way to convert all...

View Article


How to fix "https://repo.packagist.org/packages.json does not contain valid...

I've an issue with composer running on a vagrantbox (Centos 7), which started to just suddenly happen.I've already tried manually running the command/solution mentioned on the link below but to no...

View Article

symfony4.3 can't use ValidatorInterface in controller when using ajax

I'm trying to validate a form submitted with ajax in my controller using the ValidatorInterface.But I get this error:Could not resolve argument $validator of...

View Article

Symfony 4 Flex Database connection using `urlencode`

I am starting a new project using Symfony 4 + Flex. At this time I'm trying to connect my new app to a MySQL database.I'm following the Symfony Documentation, and I have already add doctrine to my...

View Article


Multiple conditional count in one to many data fetching with Doctrine ORM

I got the following situation:I have a Parent entity, which has many Child entities. The Child entity has a property named 'Score'.What I aim is to fetch the Parent entities with the following data...

View Article


EasyAdmin: is there any way to have entity's fileds when calling...

Is there any way to get more than one filed of an entity when calling setTemplatePath() method in easyadmin ?for example :I have an entity called OperatorSystem which has 3 properties : id, label and...

View Article

Image may be NSFW.
Clik here to view.

Uncaught PHP Exception...

I just started following a symfony 4 tutorialI set up the whole project with composer and got the index file showing up in browser http://127.0.0.1:8000/I'm stuck on the very first...

View Article

Image may be NSFW.
Clik here to view.

Custom FormType for EntitiesCollection Error on Transformer

I try to create a custom form control for editing a EntityCollection in my EntityMy customFormType is like :$hiddenInput = $builder->create($builder->getName(), TextType::class);...

View Article

dynamic class loading - Attempted to load class _CLASS_ from namespace...

So i try to load a class inside a service in Symfony4.It doesn't matter if i load it as classname or as App\to\class\name\classname.It generates the same error.Other posts said you need to add the...

View Article


how to avoid creating a slug that already exists as a Route "Symfony 4"

I have the entity Page identified by slug. Also I have the action to view a page in the Page controler :class PageController extends AbstractController{ /** * @Route("/{slug}", name="fronend_page") */...

View Article

symfony factory pass custom parameters for use after persist -...

EDITForgot to include the package i am using: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.htmlI am trying to figure out how i can pass extra data to the factory to use afer persist...

View Article


What's the propper way to insert data one to many relation symfony4?

It's simple im doing a permission table from Companies and Users where i have to store the user id and the company id right now i have this and i get this error Expected value of type...

View Article

Image may be NSFW.
Clik here to view.

Shopware 6 Plugin: How to Implement Custom Fields for Customers?

I'm working on a Shopware 6 project where I need to implement custom fields for customers. The task involves creating a custom field set named "Swag Customer" with two additional fields: "Purchase on...

View Article


Get initial value of entity in FormExtension

In my update form, I want to add a data attribute on the inputs that will contains the initial value of the entity. This way, I will be able to highlight the input when the user will modify it.In the...

View Article

Prefix routes with dynamic locale depending on user preferences - symfony 4

I’m trying to make the base locale change depending on the user preferences. I know I can change the prefix rules in the config, but I don't know how to make dynamic.app: resource: "../src/Controller/"...

View Article

How to inject Response object to Symfony service during authentication

I am writing Symfony Cookie based Authenticator. After getting response from configured UserProvider (remote service call) I would need to set cookie in the final Response. I don't know how can I...

View Article
Browsing all 3925 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>