This commit is contained in:
gnieark 2019-12-05 21:44:24 +01:00
parent 22b5033657
commit 634d17732e
7 changed files with 407 additions and 1 deletions

View File

@ -5,6 +5,7 @@
"php": "^7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/api-pack": "^1.2",
"sensio/framework-extra-bundle": "^5.1",
"symfony/asset": "5.0.*",
"symfony/console": "5.0.*",

349
composer.lock generated
View File

@ -4,8 +4,192 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f0aa134c748f7bb4398f0b93f0f19bb9",
"content-hash": "41cc421be47fb7714f093adc77e97231",
"packages": [
{
"name": "api-platform/api-pack",
"version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/api-platform/api-pack.git",
"reference": "41364f8763475d7709c43f790aa77a4157d038e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/api-platform/api-pack/zipball/41364f8763475d7709c43f790aa77a4157d038e2",
"reference": "41364f8763475d7709c43f790aa77a4157d038e2",
"shasum": ""
},
"require": {
"api-platform/core": "^2.1",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^1.6 || ^2.0",
"doctrine/orm": "^2.4.5",
"nelmio/cors-bundle": "^1.5 || ^2.0",
"php": "^7.0",
"phpdocumentor/reflection-docblock": "^3.0 || ^4.0",
"symfony/asset": "*",
"symfony/expression-language": "*",
"symfony/security-bundle": "*",
"symfony/twig-bundle": "*",
"symfony/validator": "*"
},
"type": "symfony-pack",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A pack for API Platform",
"time": "2019-11-12T17:43:33+00:00"
},
{
"name": "api-platform/core",
"version": "v2.5.3",
"source": {
"type": "git",
"url": "https://github.com/api-platform/core.git",
"reference": "2d402688c485457adbc771e347e6498e70c6f232"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/api-platform/core/zipball/2d402688c485457adbc771e347e6498e70c6f232",
"reference": "2d402688c485457adbc771e347e6498e70c6f232",
"shasum": ""
},
"require": {
"doctrine/inflector": "^1.0",
"fig/link-util": "^1.0",
"php": ">=7.1",
"psr/cache": "^1.0",
"psr/container": "^1.0",
"symfony/http-foundation": "^4.3.6 || ^5.0",
"symfony/http-kernel": "^4.3.7 || ^5.0",
"symfony/property-access": "^3.4 || ^4.0 || ^5.0",
"symfony/property-info": "^3.4 || ^4.0 || ^5.0",
"symfony/serializer": "^4.3 || ^5.0",
"symfony/web-link": "^4.1 || ^5.0",
"willdurand/negotiation": "^2.0.3"
},
"conflict": {
"doctrine/common": "<2.7",
"doctrine/mongodb-odm": "<2.0"
},
"require-dev": {
"behat/behat": "^3.1",
"behat/mink": "^1.7",
"behat/mink-browserkit-driver": "^1.3.1",
"behat/mink-extension": "^2.2",
"behat/symfony2-extension": "^2.1.1",
"behatch/contexts": "^3.1.0",
"doctrine/annotations": "^1.7",
"doctrine/common": "^2.11",
"doctrine/data-fixtures": "^1.2.2",
"doctrine/doctrine-bundle": "^1.8 || ^2.0",
"doctrine/doctrine-cache-bundle": "^1.3.5",
"doctrine/mongodb-odm": "^2.0",
"doctrine/mongodb-odm-bundle": "^4.0",
"doctrine/orm": "^2.6.4",
"elasticsearch/elasticsearch": "^6.0",
"friendsofsymfony/user-bundle": "^2.2@dev",
"guzzlehttp/guzzle": "^6.0",
"jangregor/phpstan-prophecy": "^0.4.2",
"justinrainbow/json-schema": "^5.2.1",
"nelmio/api-doc-bundle": "^2.13.4",
"phpdocumentor/reflection-docblock": "^3.0 || ^4.0",
"phpdocumentor/type-resolver": "^0.3 || ^0.4",
"phpspec/prophecy": "^1.8",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.11.10",
"phpstan/phpstan-doctrine": "^0.11.5",
"phpstan/phpstan-phpunit": "^0.11.2",
"phpstan/phpstan-symfony": "^0.11.6",
"phpunit/phpunit": "^7.5.2 || ^8.0",
"psr/log": "^1.0",
"ramsey/uuid": "^3.7",
"ramsey/uuid-doctrine": "^1.4",
"sebastian/object-enumerator": "^3.0.3",
"symfony/asset": "^3.4 || ^4.0 || ^5.0",
"symfony/browser-kit": "^4.3 || ^5.0",
"symfony/cache": "^3.4 || ^4.0 || ^5.0",
"symfony/config": "^3.4 || ^4.0 || ^5.0",
"symfony/console": "^3.4 || ^4.0 || ^5.0",
"symfony/css-selector": "^3.4 || ^4.0 || ^5.0",
"symfony/debug": "^3.4 || ^4.0",
"symfony/dependency-injection": "^3.4 || ^4.0 || ^5.0",
"symfony/doctrine-bridge": "^3.4 || ^4.0 || ^5.0",
"symfony/dom-crawler": "^3.4 || ^4.0 || ^5.0",
"symfony/event-dispatcher": "^3.4 || ^4.0 || ^5.0",
"symfony/expression-language": "^3.4 || ^4.0 || ^5.0",
"symfony/finder": "^3.4 || ^4.0 || ^5.0",
"symfony/form": "^3.4 || ^4.0 || ^5.0",
"symfony/framework-bundle": "^4.3.2 || ^5.0",
"symfony/http-client": "^4.3 || ^5.0",
"symfony/mercure-bundle": "*",
"symfony/messenger": "^4.3 || ^5.0",
"symfony/phpunit-bridge": "^4.3 || ^5.0",
"symfony/routing": "^3.4 || ^4.3 || ^5.0",
"symfony/security-bundle": "^3.4 || ^4.0 || ^5.0",
"symfony/security-core": "^4.3 || ^5.0",
"symfony/twig-bundle": "^3.4 || ^4.0 || ^5.0",
"symfony/validator": "^3.4 || ^4.0 || ^5.0",
"symfony/web-profiler-bundle": "^4.2 || ^5.0",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0",
"twig/twig": "^1.42.3 || ^2.12",
"webonyx/graphql-php": ">=0.13.1 <1.0"
},
"suggest": {
"doctrine/mongodb-odm-bundle": "To support MongoDB. Only versions 4.0 and later are supported.",
"elasticsearch/elasticsearch": "To support Elasticsearch.",
"friendsofsymfony/user-bundle": "To use the FOSUserBundle bridge.",
"guzzlehttp/guzzle": "To use the HTTP cache invalidation system.",
"phpdocumentor/reflection-docblock": "To support extracting metadata from PHPDoc.",
"psr/cache-implementation": "To use metadata caching.",
"ramsey/uuid": "To support Ramsey's UUID identifiers.",
"symfony/cache": "To have metadata caching when using Symfony integration.",
"symfony/config": "To load XML configuration files.",
"symfony/expression-language": "To use authorization features.",
"symfony/security": "To use authorization features.",
"symfony/twig-bundle": "To use the Swagger UI integration.",
"symfony/web-profiler-bundle": "To use the data collector.",
"webonyx/graphql-php": "To support GraphQL."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5.x-dev"
}
},
"autoload": {
"psr-4": {
"ApiPlatform\\Core\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kévin Dunglas",
"email": "dunglas@gmail.com",
"homepage": "https://dunglas.fr"
}
],
"description": "Build a fully-featured hypermedia or GraphQL API in minutes",
"homepage": "https://api-platform.com",
"keywords": [
"Hydra",
"JSON-LD",
"api",
"graphql",
"hal",
"jsonapi",
"openapi",
"rest",
"swagger"
],
"time": "2019-11-23T11:27:39+00:00"
},
{
"name": "doctrine/annotations",
"version": "v1.8.0",
@ -1198,6 +1382,60 @@
],
"time": "2019-08-13T17:33:27+00:00"
},
{
"name": "fig/link-util",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/link-util.git",
"reference": "1a07821801a148be4add11ab0603e4af55a72fac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/link-util/zipball/1a07821801a148be4add11ab0603e4af55a72fac",
"reference": "1a07821801a148be4add11ab0603e4af55a72fac",
"shasum": ""
},
"require": {
"php": ">=5.5.0",
"psr/link": "~1.0@dev"
},
"require-dev": {
"phpunit/phpunit": "^5.1",
"squizlabs/php_codesniffer": "^2.3.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Fig\\Link\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common utility implementations for HTTP links",
"keywords": [
"http",
"http-link",
"link",
"psr",
"psr-13",
"rest"
],
"time": "2016-10-17T18:31:11+00:00"
},
{
"name": "jdorn/sql-formatter",
"version": "v1.2.17",
@ -1329,6 +1567,63 @@
],
"time": "2019-11-13T10:27:43+00:00"
},
{
"name": "nelmio/cors-bundle",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/nelmio/NelmioCorsBundle.git",
"reference": "9683e6d30d000ef998919261329d825de7c53499"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/9683e6d30d000ef998919261329d825de7c53499",
"reference": "9683e6d30d000ef998919261329d825de7c53499",
"shasum": ""
},
"require": {
"symfony/framework-bundle": "^4.3 || ^5.0"
},
"require-dev": {
"mockery/mockery": "^1.2",
"symfony/phpunit-bridge": "^4.3 || ^5.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Nelmio\\CorsBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nelmio",
"homepage": "http://nelm.io"
},
{
"name": "Symfony Community",
"homepage": "https://github.com/nelmio/NelmioCorsBundle/contributors"
}
],
"description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application",
"keywords": [
"api",
"cors",
"crossdomain"
],
"time": "2019-11-15T08:54:08+00:00"
},
{
"name": "ocramius/package-versions",
"version": "1.5.1",
@ -5991,6 +6286,58 @@
],
"time": "2019-11-24T13:36:37+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.4.0",

View File

@ -12,4 +12,6 @@ return [
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
];

View File

@ -0,0 +1,7 @@
api_platform:
mapping:
paths: ['%kernel.project_dir%/src/Entity']
patch_formats:
json: ['application/merge-patch+json']
swagger:
versions: [3]

View File

@ -0,0 +1,10 @@
nelmio_cors:
defaults:
origin_regex: true
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_headers: ['Content-Type', 'Authorization']
expose_headers: ['Link']
max_age: 3600
paths:
'^/': null

View File

@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api

View File

@ -1,4 +1,21 @@
{
"api-platform/api-pack": {
"version": "v1.2.1"
},
"api-platform/core": {
"version": "2.5",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "2.5",
"ref": "a93061567140e386f107be75340ac2aee3f86cbf"
},
"files": [
"config/packages/api_platform.yaml",
"config/routes/api_platform.yaml",
"src/Entity/.gitignore"
]
},
"doctrine/annotations": {
"version": "1.0",
"recipe": {
@ -90,12 +107,27 @@
"egulias/email-validator": {
"version": "2.1.11"
},
"fig/link-util": {
"version": "1.0.0"
},
"jdorn/sql-formatter": {
"version": "v1.2.17"
},
"monolog/monolog": {
"version": "2.0.1"
},
"nelmio/cors-bundle": {
"version": "1.5",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.5",
"ref": "6388de23860284db9acce0a7a5d9d13153bcb571"
},
"files": [
"config/packages/nelmio_cors.yaml"
]
},
"nikic/php-parser": {
"version": "v4.3.0"
},
@ -519,6 +551,9 @@
"webmozart/assert": {
"version": "1.6.0"
},
"willdurand/negotiation": {
"version": "v2.3.1"
},
"zendframework/zend-code": {
"version": "3.4.0"
},