Skip to content

Commit d60fc59

Browse files
valentindrdtsoyuka
authored andcommitted
feat: api-platform/json-hal component (#6621)
* feat: add hal support for laravel * feat: quick review * fix: typo & cs-fixer * fix: typo in composer.json * fix: cs-fixer & phpstan * fix: forgot about hal item normalizer, therefore there's no more createbook nor updatebook test as Hal is a readonly format
1 parent f5736c4 commit d60fc59

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed

Serializer/ObjectNormalizer.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Symfony\Component\Serializer\Exception\LogicException;
1818
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
1919
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
20-
use Symfony\Component\Serializer\Serializer;
2120

2221
/**
2322
* Decorates the output with JSON HAL metadata when appropriate, but otherwise

composer.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "api-platform/json-hal",
3+
"description": "API Hal support",
4+
"type": "library",
5+
"keywords": [
6+
"REST",
7+
"API",
8+
"HAL"
9+
],
10+
"homepage": "https://api-platform.com",
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Kévin Dunglas",
15+
"email": "[email protected]",
16+
"homepage": "https://dunglas.fr"
17+
},
18+
{
19+
"name": "API Platform Community",
20+
"homepage": "https://api-platform.com/community/contributors"
21+
}
22+
],
23+
"require": {
24+
"php": ">=8.1",
25+
"api-platform/state": "^3.4 || ^4.0",
26+
"api-platform/metadata": "^3.4 || ^4.0",
27+
"api-platform/serializer": "^3.4 || ^4.0"
28+
},
29+
"autoload": {
30+
"psr-4": {
31+
"ApiPlatform\\Hal\\": ""
32+
},
33+
"exclude-from-classmap": [
34+
"/Tests/"
35+
]
36+
},
37+
"config": {
38+
"preferred-install": {
39+
"*": "dist"
40+
},
41+
"sort-packages": true,
42+
"allow-plugins": {
43+
"composer/package-versions-deprecated": true,
44+
"phpstan/extension-installer": true
45+
}
46+
},
47+
"extra": {
48+
"branch-alias": {
49+
"dev-main": "4.0.x-dev",
50+
"dev-3.4": "3.4.x-dev"
51+
},
52+
"symfony": {
53+
"require": "^6.4 || ^7.1"
54+
}
55+
},
56+
"scripts": {
57+
"test": "./vendor/bin/phpunit"
58+
},
59+
"require-dev": {
60+
"phpunit/phpunit": "^11.2"
61+
}
62+
}

0 commit comments

Comments
 (0)