mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
chore: drop the need for a json-api-server
fork (#3986)
* chore: drop the need for a json-api-server fork * chore: custom Serializer * chore * chore: adapt * fix * phpstan
This commit is contained in:
@@ -18,6 +18,7 @@ parameters:
|
||||
|
||||
# We know for a fact the JsonApi object used internally is always the Flarum one.
|
||||
- stubs/Tobyz/JsonApiServer/JsonApi.stub
|
||||
- stubs/Tobyz/JsonApiServer/Context.stub
|
||||
|
||||
services:
|
||||
-
|
||||
|
@@ -40,3 +40,7 @@ parameters:
|
||||
|
||||
# This assumes that the phpdoc telling it it's not nullable is correct, that's not the case for internal Laravel typings.
|
||||
- message: '#^Property [A-z0-9-_:$,\\]+ \([A-z]+\) on left side of \?\? is not nullable\.$#'
|
||||
|
||||
# Ignore overriden classes from packages so that it's always easier to keep track of what's being overriden.
|
||||
- message: '#^Method Flarum\\Api\\Serializer\:\:[A-z0-9_]+\(\) has parameter \$[A-z0-9_]+ with no type specified\.$#'
|
||||
- message: '#^Method Flarum\\Api\\Endpoint\\[A-z0-9_]+\:\:[A-z0-9_]+\(\) has parameter \$[A-z0-9_]+ with no type specified\.$#'
|
||||
|
11
php-packages/phpstan/stubs/Tobyz/JsonApiServer/Context.stub
Normal file
11
php-packages/phpstan/stubs/Tobyz/JsonApiServer/Context.stub
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Tobyz\JsonApiServer;
|
||||
|
||||
/**
|
||||
* @mixin \Flarum\Api\Context
|
||||
*/
|
||||
class Context
|
||||
{
|
||||
|
||||
}
|
Reference in New Issue
Block a user