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

Symfony 4 dump function doesn't work properly

I'm developing some REST APIS and the dump function stopped working in my dev env, it doesn't show any information about anything or return the usual outputI tried to debug using the dump() function...

View Article


Symfony doctrine lazy load properties

I have an entity that stores large files as blobs to the DB.I would now like to get Symfony to never ever load these blobs unless I specifically request them via the appropriate getter.In essence I...

View Article


An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for...

I followed this documentationto add doctrine to my symfony project(v4.2). But when doctrine is installed it deosn't add this line to my project ( in my .env file like mentioned in the doc...

View Article

Expected to find class X in file while importing services from resource...

In Symfony 4 I get:Expected to find class "App\Controller\Quote\QuoteController" in file "/var/www/MyApp/src/Controller/Quote/QuoteController.php" while importing services from resource "../src/", but...

View Article

Did we migrate incorrectly? Validation not happening in forms migrated from...

In code migrated from Symfony 2.7 to 4.0, validation no longer happens on my form, allowing bad data to pass through and cause a Doctrine constraint violationI'm new to Symfony and was asked to migrate...

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

How can I filter my array by elements that are present in another array

I need to filter my array by elements that are present in another array. More in details, I have two variables (arrays) in my Controller: one contains ALL users, another - users that are participated...

View Article

Symfony 4 > Twig > MySQL datatype: longtext > format doctrine: DC2Type:array...

In my table column i have 2 formats data:A version) incorrect format records in table (column: mylinks > longtext > DC2Type:array) - approximately 1330 records:a:4:{s:7:"content";s:11:"link 1...

View Article


How to output instance of DC2Type:array

In my table column i have 2 formats data:A version) incorrect format records in table (column: mylinks > longtext > DC2Type:array) - approximately 1330 records:a:4:{s:7:"content";s:11:"link 1...

View Article


Symfony 4 make:entity --regenerate fail with: No entities were found in the...

from composer.json{"name": "symfony/website-skeleton","type": "project","license": "MIT","description": "A skeleton to start a new Symfony website","require": {"php": "^7.1.3","ext-iconv":...

View Article

How to access a symfony 4 local project from another computer using the same...

I'm currently working on a symfony 4 project and I would like to test it out on another computer that use the same network my project is run withe the symfony server on localhost:8000. I am using Wamp....

View Article

How to create go back button after reload Symfony/twig

I use Symfony 4.4. I have a go back button in my Twig template.{% if previousPageboolean == false %}<a class="d-block text-decoration-none cursor px-4 pt-3"...

View Article

Symfony4 UserInterface missing ->getId() how to access users id

Why is there no getId() method inside the UserInterface in Symfony 4? I tried to pass UserInterface $user to my Controller method to actually access the current logged in user's id with...

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

Using VichUploaderBundle to upload a file through an API

So, what I need is a basic file upload. What I have is Symfony 4 and VichUploaderBundle, integrated exactly as described...

View Article


How to convert json Request to an array in symfony?

I am trying to convert the JSON Request $request to an array. I have output something like this:^ Symfony\Component\HttpFoundation\Request {#45+attributes: Symfony\Component\HttpFoundation\ParameterBag...

View Article

User Deprecated: Bundle inheritance is deprecated as of 3.4 and will be...

I am updating an old Symfony 3 application to 4 (and hopefully to the next versions, too). I am checking the deprecations and I get the following:User Deprecated: Bundle inheritance is deprecated as of...

View Article


Symfony 3 -> 4 service is private

I am currently updating an old application from Symfony 3.4. I get the following deprecation:User Deprecated: The "security.encoder_factory" service is private, getting it from the container is...

View Article

How to add another column in counting the value using createQueryBuilder?

This code works properly when I query the details of the user in counting the devices connecting to each user. $em = $this->getEntityManager(); $query = 'SELECT u.id, u.email, COALESCE(c, 0) devices...

View Article

You cannot create the client used in functional tests if the "framework.test"...

i am trying to apply functional test using WebTestCase.class CalculatorControllerTest extends WebTestCase{ public function testSumPost() { $client = static::createClient(); $client->request('GET',...

View Article
Browsing all 3925 articles
Browse latest View live


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