Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Browsing index pages (3935 articles)

How to Test a Form with Multiple Submit

I have a form with 2 submit// src/Form/FooType.php$builder ->add('mainsubmit', SubmitType::class, []) ->add('extrasubmit', SubmitType::class, [])In my controller, I do some different treatment...

View Article


Symfony 4 - encrypt/decrypt fields used in doctrine with a Service?

So I have fields in my database in an entity class Person{ // other fields /** * @var string * * @ORM\Column(name="last_name", type="string", length=50, nullable=false) */ private $lastName; /** * @var...

View Article


Symfony 4.0.0 Services argument wiring error

I am making a ProductBundle based on FOSUserbundle, but I'm having trouble with the autowiring of service arguments to the FormFactory and ProductManager classes.I keep getting the error: Cannot...

View Article

Image may be NSFW.
Clik here to view.

How to add image in the twig template?

It start getting bit annoying now. My images are inside public/images/ folder. I am trying to add an image to the my TemplatedEmailIn my twig template, I have tried everything I found in the...

View Article

How do I compare the date from the user with the date in the database in...

I use Symfony 4. When I compare date I can only compare years as below, not days or months. If it is in different months and days in the same year, it shows equal to each other. I want to compare days,...

View Article


Set custom port when starting symfony local web server

I want to start a server with symfony server:start using the port that is set in my .env file. Is there a way to do this?

View Article

"Connection refused" while trying to connect to docker mysql container

How do I configure a connection to a MySQL container?Here is my docker-compose.ymlversion: '3'services:php: build: ./php-fpm volumes: - ./iym:/var/www/iym - ./php-fpm/php.ini:/usr/local/etc/php/php.ini...

View Article

Image may be NSFW.
Clik here to view.

Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE)...

I have some syntax errors from symfony vendor when i'm trying to composer install my project.Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE)...

View Article


How to exclude deprecation messages from logs in Symfony 4?

I have migrated an application from Symfony 3.4 to Symfony 4.4.Now I have a lot of deprecations for each request/ Sf command (I can't fix that deprecations).How can I exclude deprecations from the log...

View Article


More than one application per project repository with Symfony 4

I have three old applications (running on Symfony 2) where each one has been developed in separated git repositories and configured in their respective vhosts:company.com Company...

View Article

Symfony Authenticator doesn't Authenticate properly (Authenticator doesn't...

Recently I was stuck in a bug and I have no idea why it doesn't work I hope u guys have an idea.So the point is I wanna create a login for my admin so I create it entity \App\Entity\Admin, controller...

View Article

How to load a custom config file in a Bundleless application with Treebuilder?

I'm trying to import a custom config file called test.yaml.I put the test.yaml in the config/packages/local folder and in config/packages folder.The test.yaml file looks like this:#...

View Article

Serialization of 'Symfony\Component\HttpFoundation\File\File' is not allowed,...

I've added an avatar image to my User class. When I wanted to render my edit form, I got this errorSerialization of 'Symfony\Component\HttpFoundation\File\File' is not allowedI tried to solve the...

View Article


There is no extension able to load the configuration for "sentry"

I have this error in my symfony 4 project :There is no extension able to load the configuration for "sentry" (in C:\SourceGit\Sentry\taxeapprentissage\config/packages/sentry.yaml). Looked for namespace...

View Article

How to enable profiler in symfony 4

Solved:I re-install it all over again and now it contains the web_profiler.yalm inside. Thanks to all.The original question was:I´m just starting to learn Symfony so I downloaded the free videos at...

View Article


Symfony PHPUnit - Inject dependency

I want to test this TokenProvider<?phpdeclare(strict_types=1);namespace App\Services\Provider;use App\Repository\UserRepository;use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;use...

View Article

symfony 4 : How to get "/public" from RootDir

I have an image under the public folder.How can I get my image directory in symfony4 ?In symfony 3, it's equivalent is :$webPath = $this->get('kernel')->getRootDir() . '/../web/';

View Article


Easyadmin : display tooltip in index page

Is there anyway to add tooltip functionality to easyadmin 'index' page?In documentation, the sethelp function can be used only in the 'detail', 'edit' and 'new' pages.

View Article

How to get .env parameter from a controller?

From symfony 4, I want create a global parameter and get the value of this parameter from a controller. This parameter is the path of an another app in the server. So, I thinked add the paramerter in...

View Article

How can I make a symfony 4 command to be registered only in dev environment...

In my App I have a helper class App\Command\GenerateFixturesCommand that provides a command named my-nice-project:generate-fixtures.This command consumes a service of my own project named...

View Article
Browsing index pages (3935 articles)


Latest Images