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

Unwanted characters in Doctrine cache

We are using Redis for as the caching driver for Doctrine in Symfony4.4. We are using the Doctrine's metadata_cache_driver, query_cache_driver, result_cache_driver which saves the cache data into...

View Article


Session based authentication in api-platform

I am trying to setup session based authentication instead of JWT that I have currently in use, because I don´t want to store JWT token in local storage. I have managed to authenticate myself using this...

View Article


How to display a datepicker on Symfony?

I want to set up a date-picker for my date type fields based on symfony documentation. I have installed the package since packagist 'eternicode / bootstrap-datepicker'. I am able to apply my defined...

View Article

Use kernel.environnement in Symfony Expression Language

I am using Symfony 4.4 and I want to grant access to some routes only in dev or test environments.My route is defined (using Api Platform) in the entity by:* "postUserTest"={* "security" =...

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


Symfony template override doesn't work on production

I am working on an app written with Symfony 4.4.It uses the EWZRecaptchaBundle to handle captchas.However, this bundle doesn't deal well when there are two captchas on the same page.To address this...

View Article

Symfony4 / Doctrine2 / FOSRestBundle - Inserting / Updating entities

It's my first time here so I hope so don't be to hard on me.I'm trying to develop an API Rest on Symfony4 with FosRestBundle, Doctrine2 and JMSSerializer.Here's my problem:I have 3 entities organized...

View Article

Why are Cookies not being set in request headers?

I am updating the authorization process on an old Symfony REST API / AngularJS App combo.On authentication, the server provides cookies, containing a couple of token to be stored on the browser so that...

View Article


Save EntityType choice as string - Symfony 4

I have entity1 and entity2.In the entity1's form, I am displaying a choice list where the options are comming from entity2.I want to save the selected choice as string inside a column in entity1's...

View Article


Minify images using webpack encore

I've been trying to configure Encore for a new project. The CSS and JS work perectly but I want to go a bit further with the images. So far I'm only creating a copy of my images in my build respecting...

View Article

Why are .env files preferred over .yaml files for environment variables?

What is/are the main reason(s), for which Symfony preferres to use .env files - for holding values of environment variables in them - instead of using the more flexible .yaml files?I am asking this,...

View Article

Phpspec with Symfony 4+ how to test Controller that uses AbstractController...

Any test case that uses anything from Symfony AbstractController can not be really tested... or can it?Simple example:class TestController extends AbstractController{ public function index() { if...

View Article

Implement a custom error controller in Symfony 4.4

What i have done:I have created this custom controller cause I want to pass to the error pages some extra variables.#Controller/CustomErrorControler.phpnamespace App\Controller;use...

View Article


Error for file validation then using symfony validator as standalone class in...

I work on a php project and implement symfony validation as a standalone class. Everything is ok, but then I try to validate file I have an error and I don't know how to solve it. Can somebody help...

View Article

Symfony 4.4 http_client service "Couldn't resolve host name" issue

I use on a project the http_client service of symfony (v4.4) to call an external API.Everything works fine on staging and production.But in local development, I have a frequent error indicating...

View Article


Symfony run event after expiration command

I develop in symfony 6 as part of my application. I have to do a task where a User XYZ create an order. after X time (30 minutes for example) certain actions are done on this order automatically...

View Article

Symfony, doctrine, API platform - problem with filter

I get my data into Vue Js app with API platform mechanism called - “properties[]”. My URL look like “http://address/resource?properties[subresources]=id. I have custom doctrine extension to checking...

View Article


Symfony 4 type: The option "0" does not exist

I found an answer to a similar problem than mine, but I don't understand how it works and what should I change in my code. So I ask you for help, I have this error message :The option "0" does not...

View Article

Symfony4: Unable to find the controller for path "/api/login_check". The...

I am tyring to set up symfony4 api JSON login by JWT.The api platform core bundle is installed and I followed this instruction: https://api-platform.com/docs/core/jwt/I created the custom user provider...

View Article

Image may be NSFW.
Clik here to view.

Set easyadmin_autocomplete Select Null by default. Symfony

I would like to know if there is any way to put null value by default in the easyadmin_autocomplete select.The first item in the list is selected and filled with data from database but i need a null...

View Article
Browsing all 3925 articles
Browse latest View live


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