flightphp / core

An extensible micro-framework for PHP
https://docs.flightphp.com
MIT License
2.6k stars 407 forks source link

Upgrade from 3.2.0 to 3.6.1 breaks Flight::json ? #557

Closed ghdi closed 3 months ago

ghdi commented 3 months ago

Hi,

After upgrading from 3.2.0 to 3.6.1 it looks like Flight::json no longer populates 'data' in the response object in the browser. Downgrading back to 3.2.0 fixes this problem.

Looks like it's caused by this statement (not present in 3.2.0, present in 3.6.1):

if ($this->response()->v2_output_buffering === true) { $this->response()->send(); }

In 3.2.0 that reads:

$this->response()->send();

Did I miss something about 'v2_output_buffering' ?

n0nag0n commented 3 months ago

Yes, if you look on the readme or check out the Migrating to v3 part of the docs, you'll see a bit about output buffering. We had to make a "hard correction" in 3.5 in the framework that only affected some users with how they implemented their projects. If this doesn't fix your problem, let me know.

n0nag0n commented 3 months ago

I'm assuming this is fixed. Thanks