I have two entities, Offer and Candidate, with a OneToMany relationship between them. The relevant code parts are the followings: In Offer.php: In Candidate.php: In OfferCrudController.php: In CandidateCrudController.php: My problem is that while in the case of Candidates EasyAdmin displays the Offer linked t…
Tag: symfony
Symfony 5.4.9 Composer detected issues in your platform:
I am totally new to Symfony. After I installed Symfony on my local ddev machine, I get this error I tried to composer install –ignore-platform-reqs as well, and soon as I run it, I get this error message My php version is Compose.json Thanks for help Answer Edit these 2 things in your composer.json to s…
postUpdate, postRemove, postPersist – is the data in the database yet?
For the purposes of the question I’ll ask about postUpdate but I’m assuming they’re all analogous. If I fetch an existing entity, modify it, and then flush, then I can subscribe to a postUpdate event about this. At the point that this event fires, is the data actually in the database yet? Or…
In Symfony/Panther when scraping, waitfor function will throw exception if it timesout – i need it to continue if item is not found
I have a database of clinics, and an url to each clinic. All clinic pages are the same in terms of html/css, with different content to scrape. However, some clinics have no content on their page, and this causes trouble for me. I have: If .facility is not present, the waitFor() will throw exception because of…
Symfony6 changing the controller manually using the “kernel.controller” event. How to inject the service container?
The application that I am building is not going to work in a traditional way. All the routes ar going to be stored in the database. And based on the route provided I need to get the correct controller and action to be executed. As I understand this can be achieved using the “kernel.controller” eve…
Symfony, constraint for User
Good day! Just started learning Symfony on my own. I’m making a news portal. The administrator can download news from an Excel file. I am converting a file to an associative array. For example: Next, I want to send this array to the form and use ‘constraints’ to validate it. There are no pro…
delete or clear session in symfony 4.4
I am saving the current user s data in a session, I am using Symfony 4.4 I am getting and setting the data to the session variable this way is there any way to clear and delete the session after logging out I tried and deleting the session one by using remove and nothing happened Answer i randomly came across
find all from collection returns array with empty objects when returned as a JsonResponse
So, I am new to symfony and need to create an api in it for a project at college. Normally I would go through some tutorials, but I do not have the time to properly learn symfony and we were only taught the basics. I have a collection of users containing name, email, password and I want to return all
Error with Symfony The option “constraints” does not exist
Symfony question, I’m just starting to learn it. The user uploads a file with data that I want to submit to the form for validation in the form of an array (key-value). I call the method to build the form, pass an array there and try to check, for example, that the length of the title (‘title̵…
Symfony 5 – A problem with the form to registrate a credit card with MangoPay
I’m trying to register a credit card with MangoPay. I’ve installed the mangopay/php-sdk-v2 package. To register a credit card, it needs three steps. Create a token of the card Post card info (using a url created by the token) that will render a string that start with data= Add the registered card …