Framework: [5.4] Form Request issue

Created on 31 Dec 2016  路  3Comments  路  Source: laravel/framework

  • Laravel Version: dev-master dbd20f2
  • PHP Version: 7.1.0
  • Database Driver & Version: _not relevant_

Description:

Issue when submitting a form and the controller method use a form request.

Steps To Reproduce:

When a form is submitted and the controller method is using a form request an exception is thrown.

Exception thrown

Type error: Argument 1 passed to Symfony\Component\HttpFoundation\Request::setSession() must be an instance of Symfony\Component\HttpFoundation\Session\SessionInterface, instance of Illuminate\Session\Store given, called in /app/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php on line 60

Most helpful comment

The method you need is now called setLaravelSession. Also, note that dev-master is now Laravel 5.5, not 5.4. :)

All 3 comments

The method you need is now called setLaravelSession. Also, note that dev-master is now Laravel 5.5, not 5.4. :)

The method you need is now called setLaravelSession.

Looking at the framework code, looks like Taylor missed a few places when he did the refactoring. Thanks for the report. :)

@brunogaspar Please let me know if https://github.com/laravel/framework/pull/17064 fixes your issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JamborJan picture JamborJan  路  3Comments

CupOfTea696 picture CupOfTea696  路  3Comments

jackmu95 picture jackmu95  路  3Comments

RomainSauvaire picture RomainSauvaire  路  3Comments

Fuzzyma picture Fuzzyma  路  3Comments