Skip to content
Commits on Source (9)
......@@ -6,7 +6,7 @@
"php": "^7.3 || ^8.0",
"ext-fileinfo": "*",
"ext-json": "*",
"api-platform/core": "^2.6.3",
"api-platform/core": "^2.6.6",
"doctrine/annotations": "^1.0",
"dragonmantank/cron-expression": "^3.1",
"guzzlehttp/guzzle": "^7.0",
......
......@@ -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": "34f15df2aa0f926b4054d2e5b18d4a63",
"content-hash": "60d4189d81142d4a8db05bd05648f2eb",
"packages": [
{
"name": "api-platform/core",
......@@ -6482,16 +6482,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.2.1",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
"reference": "13ae36a76b6e329e44ca3cafaa784ea02db9ff14"
"reference": "06bdbdfcd619183dd7a1a6948360f8af73b9ecec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/13ae36a76b6e329e44ca3cafaa784ea02db9ff14",
"reference": "13ae36a76b6e329e44ca3cafaa784ea02db9ff14",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/06bdbdfcd619183dd7a1a6948360f8af73b9ecec",
"reference": "06bdbdfcd619183dd7a1a6948360f8af73b9ecec",
"shasum": ""
},
"require": {
......@@ -6500,18 +6500,19 @@
"doctrine/annotations": "^1.12",
"ext-json": "*",
"ext-tokenizer": "*",
"php": "^7.2 || ^8.0",
"php": "^7.2.5 || ^8.0",
"php-cs-fixer/diff": "^2.0",
"symfony/console": "^4.4.20 || ^5.1.3",
"symfony/event-dispatcher": "^4.4.20 || ^5.0",
"symfony/filesystem": "^4.4.20 || ^5.0",
"symfony/finder": "^4.4.20 || ^5.0",
"symfony/options-resolver": "^4.4.20 || ^5.0",
"symfony/console": "^5.1.3",
"symfony/event-dispatcher": "^5.0",
"symfony/filesystem": "^5.0",
"symfony/finder": "^5.0",
"symfony/options-resolver": "^5.0",
"symfony/polyfill-mbstring": "^1.23",
"symfony/polyfill-php72": "^1.23",
"symfony/polyfill-php80": "^1.23",
"symfony/polyfill-php81": "^1.23",
"symfony/process": "^4.4.20 || ^5.0",
"symfony/stopwatch": "^4.4.20 || ^5.0"
"symfony/process": "^5.0",
"symfony/stopwatch": "^5.0"
},
"require-dev": {
"justinrainbow/json-schema": "^5.2",
......@@ -6527,12 +6528,11 @@
"phpunitgoodpractices/polyfill": "^1.5",
"phpunitgoodpractices/traits": "^1.9.1",
"symfony/phpunit-bridge": "^5.2.4",
"symfony/yaml": "^4.4.20 || ^5.0"
"symfony/yaml": "^5.0"
},
"suggest": {
"ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters.",
"symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
"ext-mbstring": "For handling non-UTF8 characters."
},
"bin": [
"php-cs-fixer"
......@@ -6560,7 +6560,7 @@
"description": "A tool to automatically fix PHP code style",
"support": {
"issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.2.1"
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.3.2"
},
"funding": [
{
......@@ -6568,7 +6568,7 @@
"type": "github"
}
],
"time": "2021-10-05T08:12:17+00:00"
"time": "2021-11-15T18:06:47+00:00"
},
{
"name": "netresearch/jsonmapper",
......@@ -6784,16 +6784,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.1.1",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "cb317029197236c571c1b9305b8dd12850d8d85c"
"reference": "cbe085f9fdead5b6d62e4c022ca52dc9427a10ee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/cb317029197236c571c1b9305b8dd12850d8d85c",
"reference": "cb317029197236c571c1b9305b8dd12850d8d85c",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/cbe085f9fdead5b6d62e4c022ca52dc9427a10ee",
"reference": "cbe085f9fdead5b6d62e4c022ca52dc9427a10ee",
"shasum": ""
},
"require": {
......@@ -6809,7 +6809,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "1.2-dev"
}
},
"autoload": {
......@@ -6824,7 +6824,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/1.1.1"
"source": "https://github.com/phpstan/phpstan/tree/1.2.0"
},
"funding": [
{
......@@ -6844,7 +6844,7 @@
"type": "tidelift"
}
],
"time": "2021-11-06T22:46:47+00:00"
"time": "2021-11-18T14:09:01+00:00"
},
{
"name": "phpstan/phpstan-phpunit",
......@@ -7578,16 +7578,16 @@
},
{
"name": "vimeo/psalm",
"version": "4.12.0",
"version": "4.13.0",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "e42bc4a23f67acba28a23bb09c348e2ff38a1d87"
"reference": "cd489407a0219b93cadd04d5aff9845a942f7e5d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/e42bc4a23f67acba28a23bb09c348e2ff38a1d87",
"reference": "e42bc4a23f67acba28a23bb09c348e2ff38a1d87",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/cd489407a0219b93cadd04d5aff9845a942f7e5d",
"reference": "cd489407a0219b93cadd04d5aff9845a942f7e5d",
"shasum": ""
},
"require": {
......@@ -7633,7 +7633,8 @@
"weirdan/prophecy-shim": "^1.0 || ^2.0"
},
"suggest": {
"ext-igbinary": "^2.0.5"
"ext-curl": "In order to send data to shepherd",
"ext-igbinary": "^2.0.5 is required, used to serialize caching data"
},
"bin": [
"psalm",
......@@ -7677,9 +7678,9 @@
],
"support": {
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm/tree/4.12.0"
"source": "https://github.com/vimeo/psalm/tree/4.13.0"
},
"time": "2021-11-06T10:31:17+00:00"
"time": "2021-11-19T20:24:40+00:00"
},
{
"name": "webmozart/path-util",
......
......@@ -19,20 +19,3 @@ dbp_relay_core:
# https://symfony.com/doc/5.3/components/lock.html
lock_dsn: '' # Example: 'redis://redis:6379'
```
## Locking
To handle [locking](https://symfony.com/doc/current/components/lock.html) you need to set above `lock_dsn` config,
for example as `lock_dsn: '%env(LOCK_DSN)%'` with an environment variable `LOCK_DSN` in your `.env` file or by any other means.
For example, you could use [Redis](https://redis.io/) for distributed locking or `semaphore` for local locking.
Example:
```dotenv
# Redis (distributed locking)
LOCK_DSN=redis://redis:6379/
# Semaphore (local locking)
LOCK_DSN=semaphore
```
......@@ -57,7 +57,6 @@ class TransportFactoryDecorator implements TransportFactoryInterface, LoggerAwar
// https://github.com/symfony/symfony/pull/42163
$options['delete_after_ack'] = true;
} elseif (strpos($dsn, 'doctrine://') === 0) {
$options['table_name'] = 'core_queue_messages';
$options['queue_name'] = 'main';
} elseif ($dsn === 'in-memory://dummy-queue-not-configured') {
// This is used when no queue is configured, so allow it.
......
......@@ -5,15 +5,14 @@
<title>{% if title %}{{ title }} - {% endif %}API Platform</title>
{% block stylesheet %}
<link rel="stylesheet" href="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui.css') }}">
<link rel="stylesheet" href="{{ asset('bundles/apiplatform/style.css') }}">
<link rel="stylesheet" href="{{ asset('bundles/dbprelaycore/fonts/fonts.css') }}">
<link rel="stylesheet" href="{{ asset('bundles/dbprelaycore/style.css') }}">
<link rel="stylesheet" href="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui.css', assetPackage) }}">
<link rel="stylesheet" href="{{ asset('bundles/apiplatform/style.css', assetPackage) }}">
<link rel="stylesheet" href="{{ asset('bundles/dbprelaycore/fonts/fonts.css', assetPackage) }}">
<link rel="stylesheet" href="{{ asset('bundles/dbprelaycore/style.css', assetPackage) }}">
<style>
#swagger-ui.api-platform .info .title {
background-image: url({{ asset('bundles/dbprelaycore/logo.png') }});
background-image: url({{ asset('bundles/dbprelaycore/logo.png', assetPackage) }});
background-repeat: no-repeat;
background-size: auto 100%;
padding-left: 60px
......@@ -21,23 +20,33 @@
</style>
{% endblock %}
{% set oauth_data = {'oauth': swagger_data.oauth|merge({'redirectUrl' : absolute_url(asset('bundles/apiplatform/swagger-ui/oauth2-redirect.html')) })} %}
{% set oauth_data = {'oauth': swagger_data.oauth|merge({'redirectUrl' : absolute_url(asset('bundles/apiplatform/swagger-ui/oauth2-redirect.html', assetPackage)) })} %}
{# json_encode(65) is for JSON_UNESCAPED_SLASHES|JSON_HEX_TAG to avoid JS XSS #}
<script id="swagger-data" type="application/json">{{ swagger_data|merge(oauth_data)|json_encode(65)|raw }}</script>
{# insert auth web component, use token in Swagger UI #}
<script>
var keycloakConfig = {
url: "{{ keycloak_server_url }}",
realm: "{{ keycloak_realm }}",
clientId: "{{ keycloak_frontend_client_id }}"
};
</script>
<script type="module" src="{{ asset('bundles/dbprelaycore/index.js') }}"></script>
{% if keycloak_server_url and keycloak_realm and keycloak_frontend_client_id %}
<style>
/* Hide the builtin auth key button in case we have a keycloak setup */
.swagger-ui .auth-wrapper .authorize {
display: none;
}
</style>
<script>
var keycloakConfig = {
url: "{{ keycloak_server_url }}",
realm: "{{ keycloak_realm }}",
clientId: "{{ keycloak_frontend_client_id }}"
};
</script>
<script type="module" src="{{ asset('bundles/dbprelaycore/index.js', assetPackage) }}"></script>
{% endif %}
<script type="module">
// XXX: Hide the models. Ideally we would pass defaultModelsExpandDepth=0 to swaggerUI, but
// we don't have access to it here. So wait until they appear and click on the toggle button.
// FIXME: This is fixed upstream starting with 2.7.0:
// https://github.com/api-platform/core/pull/3731
window.addEventListener("load", () => {
new MutationObserver(function (mutations, self) {
const models = document.querySelector(`.models.is-open > h4 > button.models-control`);
......@@ -85,12 +94,12 @@
</defs>
</svg>
<header>
<a id="logo" href="https://api-platform.com"><img src="{{ asset('bundles/apiplatform/logo-header.svg') }}" alt="API Platform"></a>
<a id="logo" href="https://api-platform.com"><img src="{{ asset('bundles/apiplatform/logo-header.svg', assetPackage) }}" alt="API Platform"></a>
</header>
{% if showWebby %}
<div class="web"><img src="{{ asset('bundles/apiplatform/web.png') }}"></div>
<div class="webby"><img src="{{ asset('bundles/apiplatform/webby.png') }}"></div>
<div class="web"><img src="{{ asset('bundles/apiplatform/web.png', assetPackage) }}"></div>
<div class="webby"><img src="{{ asset('bundles/apiplatform/webby.png', assetPackage) }}"></div>
{% endif %}
<div id="swagger-ui" class="api-platform"></div>
......@@ -107,6 +116,7 @@
{% set active_ui = app.request.get('ui', 'swagger_ui') %}
{% if swaggerUiEnabled and active_ui != 'swagger_ui' %}<a href="{{ path('api_doc') }}">Swagger UI</a>{% endif %}
{% if reDocEnabled and active_ui != 're_doc' %}<a href="{{ path('api_doc', {'ui': 're_doc'}) }}">ReDoc</a>{% endif %}
{# FIXME: Typo in graphql => graphQl in SwaggerUiAction #}
{% if not graphqlEnabled %}<a href="javascript:alert('GraphQL support is not enabled, see https://api-platform.com/docs/core/graphql/')">GraphiQL</a>{% endif %}
{% if graphiQlEnabled %}<a href="{{ path('api_graphql_graphiql') }}">GraphiQL</a>{% endif %}
{% if graphQlPlaygroundEnabled %}<a href="{{ path('api_graphql_graphql_playground') }}">GraphQL Playground</a>{% endif %}
......@@ -120,12 +130,12 @@
{% block javascript %}
{% if (reDocEnabled and not swaggerUiEnabled) or (reDocEnabled and 're_doc' == active_ui) %}
<script src="{{ asset('bundles/apiplatform/redoc/redoc.standalone.js') }}"></script>
<script src="{{ asset('bundles/apiplatform/init-redoc-ui.js') }}"></script>
<script src="{{ asset('bundles/apiplatform/redoc/redoc.standalone.js', assetPackage) }}"></script>
<script src="{{ asset('bundles/apiplatform/init-redoc-ui.js', assetPackage) }}"></script>
{% else %}
<script src="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-bundle.js') }}"></script>
<script src="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-standalone-preset.js') }}"></script>
<script src="{{ asset('bundles/apiplatform/init-swagger-ui.js') }}"></script>
<script src="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-bundle.js', assetPackage) }}"></script>
<script src="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-standalone-preset.js', assetPackage) }}"></script>
<script src="{{ asset('bundles/apiplatform/init-swagger-ui.js', assetPackage) }}"></script>
{% endif %}
{% endblock %}
......
......@@ -23,10 +23,6 @@ header {
margin-top: -15px;
}
.swagger-ui .auth-wrapper .authorize {
display: none;
}
.swagger-ui .scheme-container .servers, .swagger-ui .scheme-container .servers-title {
display: none;
}
......