formers/former

Not able to set up Standalone version

manuelRod opened this issue · 2 comments

Hello guys,

I'm trying to integrate a standalone Former version.
Following the instruction on Readme

If you don't use Laravel, you can add Former to your Composer file, then use it with:
use Former\Facades\Former;

But when I try to use it, I get the following error:

[Tue Jul 25 15:14:49.288229 2017] [php7:notice] [pid 14166] [client 192.168.33.1:62902] PHP Fatal error: Uncaught TypeError: 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 /var/www/public/xxx/wp-content/plugins/xxxx/Vendors/former-master/src/Former/FormerServiceProvider.php on line 106 and defined in /var/www/public/xxxx/wp-content/plugins/xxxx/Vendors/former-master/vendor/symfony/http-foundation/Request.php:864\nStack trace:\n#0 /var/www/public/xxxx/wp-content/plugins/xxxxx/Vendors/former-master/src/Former/FormerServiceProvider.php(106):

BTW: I'm not using composer to add this project (will be used inside a wp plugin), I downloaded, run composer install, and required by hand the autoload.php file created by composer inside vendors.

Any ideas? Am I missing something?

Thanks

claar commented

Hi @manuelRod -- I don't use Former standalone, so I'm not going to be of much help. If you or others get it figured out, please submit a PR!

Hello,

I have the same issue with a standalone implementation. I found that the main issue the function called : setSession() from FormerServiceProvider. I found out that if it is replaced with setLaravelSession() it works.

I'm using a composer version so overriding it would be a mess, could you check it?

Thank you!