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

How to build a dynamic doctrine query?

I am trying to build a dynamic doctrine query. When I try like this, it works $qb->andWhere($qb->expr()->orX( $qb->expr()->andX( $qb->expr()->eq('t.width', '245'),...

View Article


Image may be NSFW.
Clik here to view.

Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE)...

I have some syntax errors from symfony vendor when i'm trying to composer install my project.Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE)...

View Article


Symfony 4 : Override public services in container

I am migrating our project to Symfony 4. In my test suites, we used PHPUnit for functional tests (I mean, we call endpoints and we check result). Often, we mock services to check different steps.Since...

View Article

Image may be NSFW.
Clik here to view.

Which event is used in backend when deleting an article

I want to know which event is used in Shopware 5 backend when we delete an article, I see in browser's network tab that controllerArticleListmethoddeleteProduct is calledAs it says, an "Event listener...

View Article

How to load a custom config file in a Bundleless application with Treebuilder?

I'm trying to import a custom config file called test.yaml.I put the test.yaml in the config/packages/local folder and in config/packages folder.The test.yaml file looks like this:#...

View Article


What is difference between symfony serve and symfony serve -d

For Run symfony project sometime i usesymfony serveAnd sometimesymfony serve -dAnd sometimesymfony serve:startSo what's main diffrent between all.I just want to know diffrence between all.

View Article

Route function argument with default = null always being injected even when...

In an old Symfony 4.4 application I inheritted, I have two entities, Influencer and InfluencerManagement.The Influencer has an influencerManagement (represented by influencer_management_id in its DB...

View Article

Symfony 5 > Display Roles as "human readable"

I want set up Symfony 5 to use "human readable" roles for display purposes. When displaying user information in TWIG I can use {{ user.roles[0] }}. However, this displays (for example)...

View Article


Symfony OAuth2 Bundle used as multi-tenant

I have started using https://github.com/knpuniversity/oauth2-client-bundle so I can implement AzureAD authentication per company. (I'm using this https://github.com/TheNetworg/oauth2-azure as the...

View Article


Very long loading time for symfony snappy bundle pdf generation

I have a project on symfony 4.4 that uses WhtmlToPDF and knp snappy bundle only locally everything works fine the pdf generation takes barely 3 seconds but as soon as I switch to FTP the loading...

View Article

Image may be NSFW.
Clik here to view.

Symfony 4 parent abstract class does not set all its dependencies

I have an abstract class called CommonService with many properties passed through the constructor and this parent class has 3 children. Until now the children had to pass these depencencies to the...

View Article

How to add Fontawesome 5 to Symfony 4 using Webpack Encore

I want to add Font Awesome 5 to my Symfony 4 project, this is what I did : I added font awesome to my project using yarn : yarn add --dev @fortawesome/fontawesome-freeI imported font awesome in my main...

View Article

PHP Symfony EasyAdmin - configure actions - cant find field choice

I dont know where i can find place to change field from list to checkbox.I want to change form in EasyAdmin, in my field i have:<div class="form-group field-entity">and i want to change it...

View Article


Unable to inject serializer service in parent abstract class in symfony 4.4

I'm just trying to inject the symfony serializer into an abstract class constructor, but that does not seem to work at all :namespace App\DTO;use Symfony\Component\HttpFoundation\Request;use...

View Article

API to download content as file

I would like to create an API which returns a text file.In Symfony I have a controller which is : throw $this->createNotFoundException($message); } $response = new Response();...

View Article


Got warning: 'WARNING [cache] Failed to save key' after update doctrine...

I got a warning: 'WARNING [cache] Failed to save key', after trying to update the doctrine configuration. this error appears when i run bin/console.I tried updating the doctrine configuration to get...

View Article

Sylius liip imagine: Unable to open image

I'm working on a Sylius 1.5 project, everything is working fine on my local environment however when deploying to my dev environment I'm getting an error on filtered images (using liip imagine...

View Article


Attempted to call function \"exif_read_data\"

So I am running a symfony application where I need the exif_read_data(). I have enabled the extension in php.ini file but for some reason the extension is not loaded.DockerfileFROM...

View Article

Unable to pass data to twig file from controller in symfony

I am trying to pass data from the controller to view, but when I passed the data am getting the following errorVariable "products" does not exist.PLease find my controller code below<?phpnamespace...

View Article

Symfony 5 - Doctrine with schema_filter not working

I try to ignore two entities when I execute the command line doctrine:schema:update --force in my project who is writing like this :/** * @ORM\Entity(readOnly=true) *...

View Article
Browsing all 3925 articles
Browse latest View live