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

API Platform - GraphQL - how to query for a Calculated Field?

We need to use Calculated Fields (the equivalent of JMSSerializer's @VirtualProperty for API Platform) and all is fine and dandy when we interact with the backend the old school way. However, we can't...

View Article


Symfony 4 modal form

I have a list of cars, each car has a button, and pressing the button allows me to access a modal form to write a ticket for that specific car. Example: https://imgur.com/a/t82H9UTThe problem is that...

View Article


How to modify user Information after requiring his password with Symfony 4

I would like to create a page that allows the user to modify his personal infos. I want him to enter his current password to modify any information. I created a form based on the connected user when...

View Article

PHP Symfony4 DoctrineORM OneToMany

There are 2 entities Courses and UserTask. They have OneToMany relation, respectively. For some reason, when a user logs in and makes a task in my application, the course id is not set to database,...

View Article

Image may be NSFW.
Clik here to view.

Symfony 4 in subdirectory

I'm a French developer and I did install Symfony 4 on a subdirectory of my wamp localhost. My project is named "cardMaker".I've a .htaccess file to redirect towards the public directory (index.php)...

View Article


Symfony 4.4 : could not find driver when make:entity relation field but php...

I need to add to my entity Agency, a relation to the Country entity. When I run php bin/console make:entity Agency I can add string fields, int fields, etc... But when I wan to add my country field...

View Article

Symfony 4.3 Unit Tests Not Using Test DB

I am having problems getting my Symfony 4.3 app to use a test database for unit tests. I have been through the documentation on the Symfony website for setting up a database for testing but I must be...

View Article

Symfony GuzzleHttp Crawler cannot find all elements on the page

I am trying to get data from the amazon product page. But the search for the price always result in The current node list is empty. . The other elements like title are present in the result. $jar = new...

View Article


Request self api with Symfony and Api Platform

I used Api Platform with Symfony 4.4 Front: http://127.0.0.1:8000API: http://127.0.0.1:8000/apiApi call from front controller:$client = HttpClient::create();$response = $client->request('GET',...

View Article


How to use entity with DBAL sqlsrv for easybundle admin

Hello I have 2 databases connexion in my symfony and I want use an Entity and repository for simplify and finality use a EasyBundleAdmin, thanks advanceDBAL config :doctrine: dbal: default_connection:...

View Article

Pass custom data to Form Theme in Symfony/Twig

I'm new to Symfony, currently working with 4.4, and am trying to implement a simple form theme for one specific form, i.e. the theme is in the same file as the form's html.twig file. I have my own...

View Article

How with Symfony ExceptionListener return JsonResponse or regular Response...

For example, we have two actions. One return regular Response with rendered twig template, another return JsonResponse.Both call same method and in this method we throw exception. What i try to achieve...

View Article

How to change input "id" in FormType.php Symfony 4

I have tried to change the attr "id" in a FormType.php file :->add('content', TextareaType::class,(['label' => "Description détaillée",'attr' => ['placeholder' => "Donnez une description...

View Article


I have username which is type string in entity User, but in form builder i...

public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('username', TextType::class, array('label' => 'Username: ', 'attr'=>array('class'=>'form-control...

View Article

Installation failed while installing Laravel's Valet due to conflicts

I was having some problems with Laravel's Valet, so I attempted to uninstall and reinstall. Upon reinstallation, when I type the command composer global require laravel/valet I get this extremely...

View Article


EasyAdmin image path

I can't figure out how to display an image uploaded via EasyAdmin. When it uploads the image it displays an absolute path on the server and stores the whole thing together with the filename to the...

View Article

How to index files from a directory with FOSElastica, without a Doctrine entity

I would like to index in a Elastic instance the files (mainly images) from an upload directory.I'm using the FOSElastica bundle for Symfony 4.Now I know how to do this by having a Doctrine Image...

View Article


Api Platform custom swagger/openapi context body

I am using Api Platform with Symfony 4, and I want to create a custom endpoint. Everything works fine, but I cannot change 2 things: body and response format (in openapi documentation).Parameters and...

View Article

How to store an array to the cache in Symfony?

I have an array to display from database and after many business implementations which is taking time of 1~2 minute to get me final output. So this process is annoying me while testing with UI. So I...

View Article

Add addEventListener in new generated field in addEventListener in Symfony 4

I have 3 fields, one of them is generated when the creation of the form is invoked. But the problem is that each of the following fields are dependent with their children. The idea is because by...

View Article
Browsing all 3917 articles
Browse latest View live


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