Can't get the IriConverter from the container because it's not public
I trying to load the api_platform.iri_converter but get an error:The \"api_platform.iri_converter\" service or alias has been removed or inlined when the container was compiled. You should either make...
View ArticleSymfony 4 Access Denied in logged in user submission form
I have a symfony 4 installation and I use the msgphp user bundle in order to authenticate the users. Despite the user logs in normally, when he tries to submit an entity form access denied error...
View ArticleHow to handle routing with locale in Symfony 4.3 KernelTestCase?
I need to test (PHPUnit) a service in Symfony 4.3 application and that service depends on the framework. It uses Translator and Router and it also depends on User. This means I want to write a...
View Articlehow 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 ArticleSymfony self-update failing
When I do symfony self-update I get the following error - how can I solve it?Backup failed, rename D:\SERVER\Symfony\symfony.exe C:\Users\FairyWilbury\.symfo...
View ArticleSymfony 4: Remove methode is not working with js redirectory
when i use this code <td class="d-flex justify-content-center" onclick="fct()"><a href="{{ path('admin_card_delete', {slug:restaurantData.slug,id:restaurant.id}) }}"><img src="{{...
View ArticleWarning: strpos() expects parameter 1 to be string, object given when calling...
Just passing the class name to getRepository() method/** * @Rest\Route("/batches", name="isbn_list_batches", methods={"GET"}) * @Rest\QueryParam(name="page", default=1, requirements="\d+") *...
View ArticleExecute bundle command line
I created a small symfony4 bundle to manage Mysql database backup.I created a packagist folder to implement it easily.after install, my package path...
View ArticleDoctrine: Exception in One-To-Many cascading: Integrity constraint violation...
I am trying to build a very basic CMS using Symfony and Doctrine. I have entities emulating my sites' structure like so:Entity: Page/** *...
View ArticleSymfony deprecated Role entity
I'm trying to migrate from Symfony 3.4 to Symfony 4.4 and I see there are changes.One of which is that they have made Role class to be deprecated.I've searched a bit and found that we could simply...
View ArticleCall js function from external file Symfony Twig
I'm having issues calling functions from twig views in Symfony 4.4. This view is called UserList.html.view and it extends base.html.twigThe beginning of the file is as following : {% extends...
View ArticleSave dates in UTC
I'm currently trying to save my dates in database with de UTC timezone.To get the user timezone, I have a JS function that makes an AJAX request to my back-end like this :import $ from 'jquery'; import...
View ArticlePHP Symfony 4.4.5 Error: Could not load type "Doctrine\DBAL\Types\DateType":...
I am trying to do a Symfony 4 tutorial and I am trying to create a form and it is saying that my class does not implement "Symfony\Component\Form\FormType" even though my class implements...
View ArticleSymfony 4 EasyAdminBundle: Problem with encoding and saving of Plain Password
these are my first steps with Symfony. I try to implement a simple user management with Easyadmin Bundle in Symfony 4.4. I followed the Tutorial on symfony.com and most of it is working correctly (Sign...
View ArticleRestore the full-page error message with Symfony 4.4
Since I remove the now deprecated symfony/webserver, I started working with Symfony Local Web Server. Unfortunately, now Symfony just shows "Oops! An Error Occurred" on errors, while before I had very...
View ArticleHow to create Dependent dropdowns in Sonata Admin?
I have a form in Sonata and I want to create a dependent dropdown like: EEUUCalifornia, Texas, FloridaWhen you select a country, it should only show states from the selected country.I'm using Symfony...
View ArticleFOS Rest bundle - Not able to use customized error controller
I have a project with Symfony 4.4 and FosRestBundle. I'm trying to customize the exception handling by changing the json output. In this particular case I have a controller that receives a query string...
View Articlewhat is missing in my code (symfony 5) so that the image inserted in my form...
I am a beginner in symfony, I wanted to make a form to insert and store files in the database, I created my form, and here is my controller, and the services.yaml in which there is the path to where...
View ArticleMy application keeps loading after trying to clear FilesystemCache
I have an application that runs on Symfony 4. I use the filesystem cache component. I wanted to create a function that empties it, but unfortunately, my entire application is now broken. All pages will...
View ArticleHow to get the client IP using a Symfony 4 application hosted on Azure Web App
I want to log every login attempts on a Web App (Symfony 4.1) hosted on Azure.Based on this question, to get the client IP, I'm using :// $requestStack being...
View Article