1
0
mirror of https://github.com/flarum/core.git synced 2025-08-11 10:55:47 +02:00

refactor: JSON:API (#3971)

* refactor: json:api refactor iteration 1
* chore: delete dead code
* fix: regressions
* chore: move additions/changes to package
* feat: AccessTokenResource
* feat: allow dependency injection in resources
* feat: `ApiResource` extender
* feat: improve
* feat: refactor tags extension
* feat: refactor flags extension
* fix: regressions
* fix: drop bc layer
* feat: refactor suspend extension
* feat: refactor subscriptions extension
* feat: refactor approval extension
* feat: refactor sticky extension
* feat: refactor nicknames extension
* feat: refactor mentions extension
* feat: refactor lock extension
* feat: refactor likes extension
* chore: merge conflicts
* feat: refactor extension-manager extension
* feat: context current endpoint helpers
* chore: minor
* feat: cleaner sortmap implementation
* chore: drop old package
* chore: not needed (auto scoping)
* fix: actor only fields
* refactor: simplify index endpoint
* feat: eager loading
* test: adapt
* test: phpstan
* test: adapt
* fix: typing
* fix: approving content
* tet: adapt frontend tests
* chore: typings
* chore: review
* fix: breaking change
This commit is contained in:
Sami Mazouz
2024-06-21 09:36:32 +01:00
committed by GitHub
parent 10514709f1
commit a8777c6198
296 changed files with 7148 additions and 8860 deletions

View File

@@ -74,11 +74,12 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@potato',
],
'relationships' => [
'discussion' => ['data' => ['id' => 2]],
'discussion' => ['data' => ['type' => 'discussions', 'id' => 2]],
],
],
],
@@ -107,11 +108,12 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@potato',
],
'relationships' => [
'discussion' => ['data' => ['id' => 2]],
'discussion' => ['data' => ['type' => 'discussions', 'id' => 2]],
],
],
],
@@ -138,6 +140,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@"POTATO$"#3',
],
@@ -169,6 +172,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@“POTATO$”#3',
],
@@ -200,6 +204,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@"franzofflarum"#82',
],
@@ -231,6 +236,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@"TOBY$"#4 @"POTATO$"#p4 @"franzofflarum"#82 @"POTATO$"#3',
],
@@ -284,6 +290,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@"potato_"#3',
],
@@ -314,6 +321,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@"potato_"#3',
],
@@ -369,6 +377,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@"Bad "#p6 User"#5',
],
@@ -421,6 +430,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@"Bad _ User"#5',
],
@@ -452,6 +462,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@"Bad _ User"#5',
],
@@ -480,6 +491,7 @@ class UserMentionsTest extends TestCase
'authenticatedAs' => 1,
'json' => [
'data' => [
'type' => 'posts',
'attributes' => [
'content' => '@"Bad _ User"#5',
],