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 ArticleSymfony 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 ArticleAn 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 ArticleExpected 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 ArticleDid 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 ArticleSymfony 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 ArticleHow 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 ArticleSymfony 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 ArticleHow 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 ArticleSymfony 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 ArticleHow 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 ArticleHow 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 ArticleSymfony4 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 ArticleSymfony4: 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 ArticleUsing 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 ArticleHow 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 ArticleUser 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 ArticleSymfony 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 ArticleHow 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 ArticleYou 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