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

Setting HWIAuthBundle without FOSUserBundle

In HWIOAuthBundle,There is samples to use FOSUserbundle in the document.my.oauth_aware.user_provider.service: class: HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider arguments: -...

View Article


Symfony4 : ./node_modules/.bin/encore: No such file or directory

I try to use webpack to generate assets on Symfony4I started by adding it using yarn :yarn add @symfony/webpack-encore --dev On the installation I get this error error An unexpected error occurred:...

View Article


Symfony profiler error regarding not available messages when using custom domain

I have the following code under user profile form:public function __construct(TranslatorInterface $translator) { $this->translator = $translator; } public function buildForm(FormBuilderInterface...

View Article

Image may be NSFW.
Clik here to view.

AOuth login User data is stored but no login-ed. with HWIAOuthBundle and...

I am using HWIAOuthBundle and Custom UserProvider on Symfony 4.4in MyUserProviderIt stored the access_token and create new user. It works successfully.namespace App\Security; use...

View Article

How to start local server with symfony 5 or downgrade version to 4.4?

I started a new project in new Symfony 5 and i can't open my local server.On symfony 4.4 the command PHP bin/console server:run is OK, but with Symfony 5 the command is not...

View Article


How to post data in symfony using objectManager?

I am trying to post to table. I am using objectManager.use Doctrine\Common\Persistence\ObjectManager; public function postListsAction(ObjectManager $objectManager, Request $request) { dump($request);...

View Article

Image may be NSFW.
Clik here to view.

How to modelize privilèges in Symfony 4 database? [closed]

Hello everyone I want to model a privilege system in my database under symfony 4 and I would like to know if my design is good or not? Here is an overview of the system of privileges I would have for...

View Article

Adding the repository to construct gives user deprecated error

I have following lines of code in my controller.<?php namespace App\Controller; use App\Repository\TaskListRepository; use FOS\RestBundle\Controller\AbstractFOSRestController; class ListController...

View Article


Image may be NSFW.
Clik here to view.

AOuth login can't store session token, but userdata is stored correctly in DB...

I am using HWIAOuthBundle and Custom UserProvider on Symfony 4.4in MyUserProviderIt stored the access_token and create new user. It works successfully.namespace App\Security; use...

View Article


How to add $request into the construct method?

I have defined Request inside the construct method of this class./** * @var Request */ protected $request; public function __construct(Request $request) { $this->request = $request; } Now when I try...

View Article

List of entites not converting to json instead I get an array of empty objects

I have the following code:public function adminListAction(Request $request) { if (!$this->isGranted('ROLE_ADMIN')) { return new JsonResponse("Not granted"); } $page =...

View Article

ODBC Driver 17 unable to establish connection to MSSQL 2008 R2

I'm having an issue concerning my Debian 9 server on Apache2, php7.3, ODBC Driver 17, sqlsrv (7.3). I can't connect it to my Microsoft SQL Server 2008 R2 running on a Windows Server 2005.I tried using...

View Article

Download PhpSpreadsheet file without save it before

I'm using PhpSpreadsheet to generate an Excel file in Symfony 4. My code is:$spreadsheet = $this->generateExcel($content); $writer = new Xlsx($spreadsheet); $filename = "myFile.xlsx";...

View Article


Image may be NSFW.
Clik here to view.

Symfony 4 : why the attributes of the 'first_options' doesn't apply in a form...

I'm doing a form with 2 fields to ask a password and to confirm the password.I would like to have a message on the first field if the pattern is not the good one.I tried to put attributes in 'options',...

View Article

Sonata Admin CollectionType to add one-to-many entities

I'm using Sonata Admin Bundle 3.4 with Symfony 4.3.I'm trying to figure out how to add multiple somethings to an entity. For the sake of this example, it could be GalleryHasMedias to a Gallery, as...

View Article


Limit login attempts under Symfony 4 and FOSRestBundle

I use FOSRestBundle in Symfony 4 and I want to secure my Login Form using this.I want to set up a limited number of connection attempts on the login form (5 maximum for 15 minutes, then 30 minutes then...

View Article

Symfony 4 autowiring not working properly

Here is the context: Installed beanstalk bundle with composer "composer require leezy/pheanstalk-bundle"I'm trying to using inside a command but i get this errorCannot autowire service...

View Article


Error content-type after update Symfony from 4.3 to 4.4

I have updated Symfony project (api platform) from 4.3 to 4.4 with composer update, but now I receive this error in POST requests:The content-type "application/json" is not supported. Supported MIME...

View Article

Including Assets (CSS, JS) in Symfony 4 / Twig Template

Im learning Symfony and trying to set up a boilerplate app in Symfony 4This Symfony document describes how to include assets in your page, namely using the asset package like so..<img src="{{...

View Article

Can't create postgres database with doctrine in symfony 4.4

I'm using Symfony 4.4 with PHP 7.2 and postgres 11I have enabled extension=pdo_pgsql and extension=pgsql in file php.ini (/etc/php/7.2/fpm/php.iniAnd then, I have restarted PHP and Nginx server.I have...

View Article
Browsing all 3918 articles
Browse latest View live


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