Questions tagged [symfony-4.3]

Symfony is a PHP framework developed by SensioLabs. Symfony 4.3 was released in May 2019.

Symfony is a PHP web framework first released in July 2011 and was created by SensioLabs. Symfony 4.3 was released in May 2019.

Bug fixes

  • bug #31654 [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping (@vilius-g)

Documentation / Resources

  • Overview: Documentation for current version.
  • Flex: New way to manage Symfony apps.
  • Best Practices: Best practices for developing web apps, esp. the ones using the full-stack Symfony framework.
  • Symfony Recipes Server: Includes official and community recipes.
92 questions
0
votes
1 answer

Api Platform access_control : adding role is not working

I am building a symfony 4 cmf. I am using API Platform. In the page.php entity, i have added the following
Ajir
  • 215
  • 1
  • 10
0
votes
1 answer

call Service in Connection which extends \Doctrine\DBAL\Connection

I'm trying to create a dynamic connection to databases. For that I have: // App/Services/Config/Database/Connection.php
0
votes
1 answer

How do I authenticate user in functional test on Symfony 4

I'm testing a page protected with IsGranted('ROLE_ADMIN') annotation. How do I make a request that simulate an autheticated user with role 'ROLE_ADMIN'?
sitrakay
  • 81
  • 9
0
votes
1 answer

How to use a DoctrineParamConverter from inside a Data Transformer Object class for a request?

I will start saying I am using Symfony 4.3.4 and Api Platform (called AP from now on). Having said that this how my custom controller (used for AP) looks like: declare(strict_types=1); namespace App\Controller\CaseWork\Pend; use…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
0
votes
1 answer

Symfony4, log out the user if the IP has changed

I want to log out the user if the IP has changed. I managed to make it by creating a field lastLoginIp in the Users table, setting it in the onAuthenticationSuccess, and then checking in the User::isEqualTo() method: if($user->getLastLoginIp() !==…
the_nuts
  • 5,634
  • 1
  • 36
  • 68
0
votes
0 answers

Symfony/process Permission denied

I'm using Symfony/Process to run a test from Laravel Dusk in a route of web.php in Laravel. This is the code that I'm using: Route::get('/scraping', function () { $process = new Process('cd pathtoartisan && C:\xampp\php\php.exe artisan dusk…
Mmelo
  • 31
  • 1
  • 6
0
votes
1 answer

Can the 'auto' algorithm of the Symfony Security encoder change encoding method?

In Symfony 4.3, it is recommended to use the auto option for encoding algorithm: # config/packages/security.yaml security: # ... encoders: # use your user class name here App\Entity\User: # Use native password encoder # This…
Sheepwall
  • 125
  • 2
  • 12
0
votes
1 answer

JMS Serializer does not load metadata config in Symfony 4

I have configured JMS Serializer like this: jms_serializer: visitors: xml_serialization: format_output: '%kernel.debug%' metadata: auto_detection: true directories: App: …
Caslav Sabani
  • 421
  • 6
  • 20
0
votes
1 answer

How to exclude password field from the user entity with JMS serializer using FOS User Bundle and Symfony 4?

I have implemented simple API with login functionality using FOSUserBundle and JWT (using LexikJWTAuthenticationBundle). All works well and I can login and get a jwt token. But when I created API endpoint to get user details the password field is…
0
votes
1 answer

Invalid JWT Token with LexikJWTAuthenticationBundle

i developed an api on symfony4 and I manage my tokens with LexikJWTAuthenticationBundle. In localhost everything works fine but on my test server (ubuntu mate on raspbery pi,apache, https) the server sends me a 401 error and Invalid JWT Token. As…
0
votes
0 answers

How log in symfony 4.3 webserver

While developing a web service in Symfony 4.3 I need to show logs in the terminal to check the content of some variables. For this I initialize the server with: symfony server:start --port=8000 And the server starts [OK] Web server listening on…
Belen
  • 673
  • 2
  • 10
  • 25
0
votes
1 answer

Symfony 4.3 How to enable a Bundle if cloned as git submodule

I want to develop on symfony bundle. So i cloned this in to my project as git submodule add. But how must i enable this bundle in my Symfony Project, because its not in the vendor, its direct under my project. So the way to enable this in…
0
votes
1 answer

How to get a config parameter in package in config specific bundle

I've create my bundle so i want to get some config value imk_form: form_template: '%kernel.project_dir%/templates/forms' I want to get form_template in my service or in my class imk_form: form_template: '%kernel.project_dir%/templates/forms'
ywoume
  • 21
  • 3
0
votes
1 answer

Deprecation on a service: Symfony asks to change service name

I am currently trying for the first time to migrate from Symfony 3.4 to 4.3. I'm at the stage where I have to remove the depreciation so that I can update the dependencies via composing as the doc says I have solved all the deprecations except one…
Jboucly
  • 720
  • 6
  • 17
0
votes
0 answers

Composer cannot find class from repository in vendor directory

I can't resolve problem with loading class in my symfony application. Core of the application is in separate gitlab repository, loaded as dependency in composer. This package is located in: ProjectRoot/vendor/officer/* composer.json for this…