Added FOS Rest Bundle

This commit is contained in:
Kevin Frantz 2018-09-16 12:58:39 +02:00
parent 66008bc309
commit 6cf929ada7
5 changed files with 227 additions and 1 deletions

View File

@ -6,6 +6,7 @@
"ext-ctype": "*",
"ext-iconv": "*",
"fresh/doctrine-enum-bundle": "~6.2",
"friendsofsymfony/rest-bundle": "^2.4",
"friendsofsymfony/user-bundle": "~2.1",
"knplabs/knp-menu-bundle": "^2.0",
"sensio/framework-extra-bundle": "^5.1",

View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ba590f1add8e4ab85f0695854acb1a6d",
"content-hash": "ea89b479cd43fa4f2bfb407f9583cc94",
"packages": [
{
"name": "doctrine/annotations",
@ -1361,6 +1361,108 @@
],
"time": "2018-06-02T09:50:27+00:00"
},
{
"name": "friendsofsymfony/rest-bundle",
"version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfSymfony/FOSRestBundle.git",
"reference": "3725279a6554c1d894eee0b377f49d3f69e3c217"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/3725279a6554c1d894eee0b377f49d3f69e3c217",
"reference": "3725279a6554c1d894eee0b377f49d3f69e3c217",
"shasum": ""
},
"require": {
"doctrine/inflector": "^1.0",
"php": "^5.5.9|~7.0",
"psr/log": "^1.0",
"symfony/config": "^2.7|^3.0|^4.0",
"symfony/debug": "^2.7|^3.0|^4.0",
"symfony/dependency-injection": "^2.7|^3.0|^4.0",
"symfony/event-dispatcher": "^2.7|^3.0|^4.0",
"symfony/finder": "^2.7|^3.0|^4.0",
"symfony/framework-bundle": "^2.7|^3.0|^4.0",
"symfony/http-foundation": "^2.7|^3.0|^4.0",
"symfony/http-kernel": "^2.7|^3.0|^4.0",
"symfony/routing": "^2.7|^3.0|^4.0",
"symfony/security-core": "^2.7|^3.0|^4.0",
"symfony/templating": "^2.7|^3.0|^4.0",
"willdurand/jsonp-callback-validator": "^1.0",
"willdurand/negotiation": "^2.0"
},
"conflict": {
"jms/serializer": "1.3.0",
"jms/serializer-bundle": "<1.2.0",
"sensio/framework-extra-bundle": "<3.0.13"
},
"require-dev": {
"jms/serializer-bundle": "^1.2|^2.0",
"phpoption/phpoption": "^1.1",
"psr/http-message": "^1.0",
"sensio/framework-extra-bundle": "^3.0.13|^4.0|^5.0",
"symfony/asset": "^2.7|^3.0|^4.0",
"symfony/browser-kit": "^2.7|^3.0|^4.0",
"symfony/css-selector": "^2.7|^3.0|^4.0",
"symfony/dependency-injection": "^2.7.20|^3.0|^4.0",
"symfony/expression-language": "~2.7|^3.0|^4.0",
"symfony/form": "^2.7|^3.0|^4.0",
"symfony/phpunit-bridge": "^4.0",
"symfony/security-bundle": "^2.7|^3.0|^4.0",
"symfony/serializer": "^2.7.11|^3.0.4|^4.0",
"symfony/twig-bundle": "^2.7|^3.0|^4.0",
"symfony/validator": "^2.7|^3.0|^4.0",
"symfony/web-profiler-bundle": "^2.7|^3.0|^4.0",
"symfony/yaml": "^2.7|^3.0|^4.0"
},
"suggest": {
"jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires ^1.0",
"sensio/framework-extra-bundle": "Add support for the request body converter and the view response listener, requires ^3.0",
"symfony/expression-language": "Add support for using the expression language in the routing, requires ^2.7|^3.0",
"symfony/serializer": "Add support for basic serialization capabilities and xml decoding, requires ^2.7|^3.0",
"symfony/validator": "Add support for validation capabilities in the ParamFetcher, requires ^2.7|^3.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-4": {
"FOS\\RestBundle\\": ""
},
"exclude-from-classmap": [
"Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Lukas Kahwe Smith",
"email": "smith@pooteeweet.org"
},
{
"name": "FriendsOfSymfony Community",
"homepage": "https://github.com/friendsofsymfony/FOSRestBundle/contributors"
},
{
"name": "Konstantin Kudryashov",
"email": "ever.zet@gmail.com"
}
],
"description": "This Bundle provides various tools to rapidly develop RESTful API's with Symfony",
"homepage": "http://friendsofsymfony.github.com",
"keywords": [
"rest"
],
"time": "2018-08-21T16:54:14+00:00"
},
{
"name": "friendsofsymfony/user-bundle",
"version": "v2.1.2",
@ -5070,6 +5172,98 @@
],
"time": "2018-01-29T19:49:41+00:00"
},
{
"name": "willdurand/jsonp-callback-validator",
"version": "v1.1.0",
"source": {
"type": "git",
"url": "https://github.com/willdurand/JsonpCallbackValidator.git",
"reference": "1a7d388bb521959e612ef50c5c7b1691b097e909"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909",
"reference": "1a7d388bb521959e612ef50c5c7b1691b097e909",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~3.7"
},
"type": "library",
"autoload": {
"psr-0": {
"JsonpCallbackValidator": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "William Durand",
"email": "william.durand1@gmail.com",
"homepage": "http://www.willdurand.fr"
}
],
"description": "JSONP callback validator.",
"time": "2014-01-20T22:35:06+00:00"
},
{
"name": "willdurand/negotiation",
"version": "v2.3.1",
"source": {
"type": "git",
"url": "https://github.com/willdurand/Negotiation.git",
"reference": "03436ededa67c6e83b9b12defac15384cb399dc9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/willdurand/Negotiation/zipball/03436ededa67c6e83b9b12defac15384cb399dc9",
"reference": "03436ededa67c6e83b9b12defac15384cb399dc9",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-4": {
"Negotiation\\": "src/Negotiation"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "William Durand",
"email": "will+git@drnd.me"
}
],
"description": "Content Negotiation tools for PHP provided as a standalone library.",
"homepage": "http://williamdurand.fr/Negotiation/",
"keywords": [
"accept",
"content",
"format",
"header",
"negotiation"
],
"time": "2017-05-14T17:21:12+00:00"
},
{
"name": "zendframework/zend-code",
"version": "3.3.1",

View File

@ -16,4 +16,5 @@ return [
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
FOS\UserBundle\FOSUserBundle::class => ['all' => true],
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
];

View File

@ -0,0 +1,15 @@
# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
fos_rest: ~
# param_fetcher_listener: true
# allowed_methods_listener: true
# routing_loader: true
# view:
# view_response_listener: true
# exception:
# codes:
# App\Exception\MyException: 403
# messages:
# App\Exception\MyException: Forbidden area.
# format_listener:
# rules:
# - { path: ^/api, prefer_extension: true, fallback_format: json, priorities: [ json, html ] }

View File

@ -104,6 +104,15 @@
"ref": "81dee417d2cc60cd1c9d6208dff2ec22a1103e93"
}
},
"friendsofsymfony/rest-bundle": {
"version": "2.2",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "2.2",
"ref": "258300d52be6ad59b32a888d5ddafbf9638540ff"
}
},
"friendsofsymfony/user-bundle": {
"version": "v2.1.2"
},
@ -497,6 +506,12 @@
"webmozart/assert": {
"version": "1.3.0"
},
"willdurand/jsonp-callback-validator": {
"version": "v1.1.0"
},
"willdurand/negotiation": {
"version": "v2.3.1"
},
"zendframework/zend-code": {
"version": "3.3.1"
},