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

Symfony 4 EasyAdmin Bundle Create Entities Linked by a ManyToMany Relationship

I am working on a small project to manage the pay slips of a small enterprise with Symfony4 and I use easyAdmin as a beginner. I have three classes (Employe, Lot and Bulletin) linked by ManyToOne -...

View Article


Symfony Mailer TLS Certificate Validation Error

How can I turn off SSL certificate validations when using the new Mailer component with TLS and Symfony 5?

View Article


Symfony 4 Fos Rest : Error 415 Unsupported Media Type

Impossible to create a new event, I always get 415 error I test with postman, if I test the same endpoint with ParamConverter annotation, I can reach the function. So the error should come from...

View Article

You have requested a non-existent service "fos_user.manager"

I use symfony 4.1.13 and FOSUser v2.1.2 I got this error when I try to clear cache.You have requested a non-existent service "fos_user.manager".Here is my controller function /** * Create New User *...

View Article

How 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:...

View Article


Symfony4. How to work with 2 swiftmail configurations?

I have 2 smtp-servers. How can I switch between them? My service should decide via wich smtp-server to send a mail.In my swiftmailer.yaml, I have only the following configuration.swiftmailer: url:...

View Article

Validate symfony 4 formfield filetype with mapped false and multiple true

I got a project about snowboard tricks. In my project, I got an entity Trick, that itslef has an attribute "illustrations" that is a collection of another entity : Illustration. I'm trying to do a form...

View Article

Symfony 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 Article


Attempted to load class "WebProfilerBundle" from namespace...

We have a Symfony 4.3 web application hosted on Heroku. This is a new setup and we never managed to have the dev mode to work correctly. There are plenty of similar issues online but none fixes the...

View Article


Symfony Mailer TLS Certificate Name Validation Error

How can I turn off name validations in symfony/mailer TLS connections. I am getting the following error.Warning: stream_socket_enable_crypto(): Peer certificate CN=smtp.somename.com' did not match...

View Article

Symfony 4 - How to run Doctrine migrations before test?

I know that there are a lot of similar questions (Codeception & Symfony - run Doctrine migrations before tests) but do I really need to run migrations in tests like exec(...) or there is a better...

View Article

Symfony 4 Bundle: AuthenticationUtils but no such service exists

I'm trying to make a Bundle (Symfony 4) for managing users of all our projects and I'm having a problem.Cannot autowire argument $authenticationUtils of...

View Article

Using an environment variable (from `.env` file) in custom Twig function in...

How can I use an environment variable from the .env file in a custom Twig function (\Twig_SimpleFunction) in Symfony 4?

View Article


How to bypass error "Invalid type "json_array""

I have an entity:<?php namespace App\Entity\Aero; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="App\Repository\Aero\ScheduleRepository") */ class Schedule { /** * @ORM\Id() *...

View Article

Symfony 4 Twig Custom Form Field Template For Collection Of Checkboxes

I've used a custom template no problem when using a collection of checkboxes to change the html to be in a table like this:{% form_theme form _self %} {% block...

View Article


CSRF token is always invalid on localhost - Symfony 4 forms

My form can never validate on localhost unless I deactivate my csrf field on localhost.It works perfectly fine on prod.I was thinking it could come from my config:router.request_context.host:...

View Article

when I try to write a dql query there is an error for lag & over (...

I'm trying to convert a MySQL8 query to Doctrine DQL in Symfony4. I used to https://github.com/beberlei/DoctrineExtensions extensions. But there are still errors. Query is work well.SELECT id,...

View Article


How to pass an array to a function with class dependency? [closed]

Before I was using $allMovies = $this->findAll(); to retrieve object data.array:2908 [ 0 => App\Entity\Movie {#450 -id: 39 -title: "ozcMpVxIWJ" -count: "0" } 1 => App\Entity\Movie {#453 -id:...

View Article

Symfony 4 + Swift Mailer [closed]

I'd like to use the bundle Swift Mailer to send templated mails, but all documentations I find (including https://symfony.com/doc/4.3/email.html) doesn't seem to work...My .env file is configured this...

View Article

Symfony login doing nothing [closed]

I ran in strange problem with Symfony 4.4. I'm using default login and registration system from Symfony 4.4 documentation. It is working fine locally, but when I upload it to other server - login does...

View Article
Browsing all 3918 articles
Browse latest View live


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