What are you trying to do?
Lumen PDO Fetch Style
How would I switch to PDO::FETCH_ASSOC in Lumen for mysql database? In Laravel I used be able to change it in config/database.php under 'fetch' parameter.
Yeah sorry, a bit sleepy so I've missed that call to setFetchMode doesn't return the instance of the same object, but you got the point.
Just wanted to make sure it's on by default and you're right, apparently it got changed from PDO::FETCH_CLASS to PDO::FETCH_OBJ like a month ago. You can see it in the commits history if you like.
Anyways, as for your 2nd question of finding it redundant - I'd agree. There is a simple workaround for this and no need to make a pull request as this is something that's already been taken care of.
Create a config directory within your project root, and copy into it the vendor/laravel/lumen-framework/config/database.php file.
Then just edit the file you just copied , which is your/project/root/config/database.php:
'fetch' => PDO::FETCH_CLASS,
to whatever you like.
Hope I could help.
Please or to participate in this conversation.