Releases: flightphp/core
Releases · flightphp/core
v3.15.1
v3.15.0
v3.14.0
What's Changed
- Added PUT, PATCH, DELETE methods for data by @KnifeLemon in #620
- Update README.md with correct version upgrading from v2 to v3 by @kgathuru in #625
- Simplify Flight and faster performance by @joanhey in #623
- Removed utf8 from json function, add default flags, and more unit tests by @n0nag0n in #627
- Added ability to generate new requests/responses on duplicate start() by @n0nag0n in #622
- Removed cache breaking behavior by @n0nag0n in #630
New Contributors
- @KnifeLemon made their first contribution in #620
- @kgathuru made their first contribution in #625
- @joanhey made their first contribution in #623
Full Changelog: v3.13.1...v3.14.0
v3.13.1
What's Changed
- add php 8.4 to workflow matrix by @lubiana in #609
- Fixed README badges by @fadrian06 in #614
- Added some fixes to get this working in windows locally by @n0nag0n in #615
- Fixed multiple trailing slashes issues. by @n0nag0n in #618
Full Changelog: v3.13.0...v3.13.1
v3.13.0
What's Changed
- add case for Macos in ResponseTest::testResponseBodyCallbackGzip by @lubiana in #605
- add unit-test workflow by @lubiana in #606
- reenable controller command test by @lubiana in #607
- Group compact syntax by @fadrian06 in #596
You can now easily add a new resource route to help standardize your API routes. For examples, defining a resource with Flight::resource('/posts', PostsController::class);
will allow the following routes by default:
$defaultMapping = [
'index' => 'GET ',
'create' => 'GET /create',
'store' => 'POST ',
'show' => 'GET /@id',
'edit' => 'GET /@id/edit',
'update' => 'PUT /@id',
'destroy' => 'DELETE /@id'
];
And the ensuing controller file will look like this:
class PostsController
{
public function index(): void
{
}
public function show(string $id): void
{
}
public function create(): void
{
}
public function store(): void
{
}
public function edit(string $id): void
{
}
public function update(string $id): void
{
}
public function destroy(string $id): void
{
}
}
Full Changelog: v3.12.0...v3.13.0
v3.12.0
What's Changed
- feat: method to download files easily by @pierresh in #601 Documentation
- Added ability to handle file uploads in a simple way by @n0nag0n in #602 Documentation
New Contributors
Full Changelog: v3.11.1...v3.12.0
v3.11.1
v3.11.0
v3.10.1
What's Changed
- Fix/bug with multiple view renders by @fadrian06 in #581
Old behaviour
Flight::render('input', ['required'=>true);
Flight::render('component'); // required is still true
New behaviour (activable)
Flight::view()->preserveVars = false;
Flight::render('input', ['required'=>true);
Flight::render('component'); // PHP Warning: undefined variable required
// You can provide default values
Flight::view()->set('globalVariable', 'value');
// or set default in view components
// input.php
$required ??= false;
Full Changelog: v3.10.0...v3.10.1
v3.10.0
What's Changed
- Simplified php version constraint by @fadrian06 in #588
- Added ability to throw a method not found instead of 404 by @n0nag0n in #591
- Maintains headers on redirect, error, and halt. Added
Flight::jsonHalt()
by @n0nag0n in #594
Full Changelog: v3.9.0...v3.10.0