1
0
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:
Franz Liedke
2015-05-27 00:29:31 +02:00
parent 910d96f905
commit 3ff230dc26
32 changed files with 264 additions and 323 deletions

View File

@@ -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';
}