mirror of
https://github.com/flarum/core.git
synced 2025-08-05 16:07:34 +02:00
Change API to use PSR-7 style requests and responses
This required some interface changes (mostly changing Laravel's or Symfony's request and response classes to those of Zend's Diactoros. Some smaller changes to the execution flow in a few of the abstract action base classes, but nothing substantial. Note: The request and response classes are immutable, so we usually need to return new instances after modifying the old ones.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php namespace Flarum\Api;
|
||||
|
||||
use Flarum\Http\Router;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Flarum\Api\Serializers\BaseSerializer;
|
||||
|
||||
class ApiServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -17,6 +17,8 @@ class ApiServiceProvider extends ServiceProvider
|
||||
'Flarum\Api\ExceptionHandler'
|
||||
);
|
||||
|
||||
$this->app->singleton('Flarum\Http\Router', function() { return new Router(); });
|
||||
|
||||
include __DIR__.'/routes.php';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user