Skip to content
Snippets Groups Projects
Unverified Commit 5be98ab5 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Initial commit

parent 25a95b85
No related branches found
No related tags found
No related merge requests found
Pipeline #85441 failed
[global]
; Override default pid file
pid = /home/user/.php-fpm.pid
; Avoid logs being sent to syslog
error_log = /proc/self/fd/2
; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop
; This helps avoiding 502's
process_control_timeout = 30
; Do not daemonize (eg send process to the background)
daemonize = no
; Don't print anything when started
log_level = warning
[www]
; Access from webserver container is via network, not socket file
listen = [::]:9000
; Redirect logs to stdout - FPM closes /dev/std* on startup
access.log = /proc/self/fd/2
access.format = "[%{%Y-%m-%d %H:%M:%S}t] %m %{REQUEST_SCHEME}e://%{HTTP_HOST}e%{REQUEST_URI}e CODE=%s"
catch_workers_output = yes
; Remove "pool www" decoration from log output
decorate_workers_output = no
; This option sets the limit on the number of simultaneous requests that will be served
pm.max_children = 10
\ No newline at end of file
upload_max_filesize = 200M
post_max_size = 208M
memory_limit = 450M
zend.assertions = 1
date.timezone = "Europe/Vienna"
[supervisord]
# so the process is sync
nodaemon=true
# so we don't write a log file
logfile=/dev/null
logfile_maxbytes=0
# so the log file isn't written to the volume
pidfile=/home/user/supervisord.pid
[program:queue-work]
command=php /application/bin/console dbp:relay:core:queue:work "%(program_name)s_%(process_num)02d"
user=user
numprocs=2
startsecs=0
autostart=true
autorestart=true
process_name=%(program_name)s_%(process_num)02d
# to forward stdout/stderr to supervisord
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
#!/bin/bash
docker-compose run --rm --entrypoint bash php-fpm
server {
listen 80 default;
client_max_body_size 108M;
access_log /var/log/nginx/application.access.log;
root /application/public;
index index.php;
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
location ~ (\.php|/)$ {
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
include fastcgi_params;
}
}
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
parameters:
inferPrivatePropertyTypeFromConstructor: true
level: 3
paths:
- src
- tests
excludePaths:
- tests/bootstrap.php
- src/Swagger/DocumentationNormalizer.php
ignoreErrors:
#- "#Call to an undefined static method .*SoapClient::__construct\\(\\)#"
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="tests/bootstrap.php">
<coverage>
<include>
<directory>src</directory>
<directory>tests</directory>
</include>
</coverage>
<php>
<ini name="error_reporting" value="-1"/>
<server name="APP_ENV" value="test" force="true"/>
<server name="KERNEL_CLASS" value="App\Kernel"/>
<server name="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
<!-- ###+ dbp/relay-base-person-connector-ldap-bundle ### -->
<env name="LDAP_PERSON_PROVIDER_LDAP_HOST" value="directory.your.domain"/>
<env name="LDAP_PERSON_PROVIDER_LDAP_USERNAME" value="cn=ralay,o=uni"/>
<env name="LDAP_PERSON_PROVIDER_LDAP_BASE_DN" value="o=uni"/>
<env name="LDAP_PERSON_PROVIDER_LDAP_PASSWORD" value=""/>
<env name="LDAP_PERSON_PROVIDER_LDAP_ATTRIBUTE_IDENTIFIER" value="cn"/>
<env name="LDAP_PERSON_PROVIDER_LDAP_ATTRIBUTE_GIVEN_NAME" value="givenName"/>
<env name="LDAP_PERSON_PROVIDER_LDAP_ATTRIBUTE_FAMILY_NAME" value="sn"/>
<env name="LDAP_PERSON_PROVIDER_LDAP_ATTRIBUTE_EMAIL" value="mail"/>
<env name="LDAP_PERSON_PROVIDER_LDAP_ATTRIBUTE_BIRTHDAY" value="DateOfBirth"/>
<!-- ###- dbp/relay-base-person-connector-ldap-bundle ### -->
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>
</phpunit>
<?xml version="1.0"?>
<psalm
totallyTyped="false"
errorLevel="5"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
<directory name="var" />
</ignoreFiles>
</projectFiles>
</psalm>
documents/*.jp*g
documents/*.png
documents/*.pdf
# Use the front controller as index file. It serves as a fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# start page (path "/") because otherwise Apache will apply the rewriting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex index.php
# By default, Apache does not evaluate symbolic links if you did not enable this
# feature in your server configuration. Uncomment the following line if you
# install assets as symlinks or if you experience problems related to symlinks
# when compiling LESS/Sass/CoffeScript assets.
# Options +FollowSymlinks
# Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve
# to the front controller "/index.php" but be rewritten to "/index.php/index".
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
# Determine the RewriteBase automatically and set it as environment variable.
# If you are using Apache aliases to do mass virtual hosting or installed the
# project in a subdirectory, the base path will be prepended to allow proper
# resolution of the index.php file and to redirect to the correct URI. It will
# work in environments without path prefix as well, providing a safe, one-size
# fits all solution. But as you do not need it in this case, you can comment
# the following 2 lines to eliminate the overhead.
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
RewriteRule .* - [E=BASE:%1]
# Sets the HTTP_AUTHORIZATION header removed by Apache
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
# Redirect to URI without front controller to prevent duplicate content
# (with and without `/index.php`). Only do this redirect on the initial
# rewrite by Apache and not on subsequent cycles. Otherwise we would get an
# endless redirect loop (request -> rewrite to front controller ->
# redirect -> request -> ...).
# So in case you get a "too many redirects" error or you always get redirected
# to the start page because your Apache does not expose the REDIRECT_STATUS
# environment variable, you have 2 choices:
# - disable this feature by commenting the following 2 lines or
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
# following RewriteCond (best solution)
RewriteCond %{ENV:REDIRECT_STATUS} =""
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
# Rewrite all other queries to the front controller.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/index.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
# When mod_rewrite is not available, we instruct a temporary redirect of
# the start page to the front controller explicitly so that the website
# and the generated links can still be used.
RedirectMatch 307 ^/$ /index.php/
# RedirectTemp cannot be used instead
</IfModule>
</IfModule>
<?php
declare(strict_types=1);
use App\Kernel;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;
require dirname(__DIR__).'/vendor/autoload.php';
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
if ($_SERVER['APP_DEBUG']) {
umask(0000);
Debug::enable();
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
<?php
declare(strict_types=1);
namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
class Kernel extends BaseKernel
{
use MicroKernelTrait;
}
{
"adldap2/adldap2": {
"version": "v10.4.0"
},
"amphp/amp": {
"version": "v2.6.1"
},
"amphp/byte-stream": {
"version": "v1.8.1"
},
"api-platform/core": {
"version": "2.6",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "2.5",
"ref": "05b57782a78c21a664a42055dc11cf1954ca36bb"
},
"files": [
"config/routes/api_platform.yaml",
"config/packages/api_platform.yaml",
"src/Entity/.gitignore"
]
},
"brick/math": {
"version": "0.9.3"
},
"composer/package-versions-deprecated": {
"version": "1.11.99.4"
},
"composer/pcre": {
"version": "1.0.0"
},
"composer/semver": {
"version": "3.2.6"
},
"composer/xdebug-handler": {
"version": "2.0.2"
},
"dbp/relay-auth-bundle": {
"version": "0.1",
"recipe": {
"repo": "github.com/digital-blueprint/symfony-recipes",
"branch": "main",
"version": "0.1",
"ref": "1195a75c2c8826343f3cc936a06a883f986a56ae"
},
"files": [
"config/packages/dbp_relay_auth.yaml"
]
},
"dbp/relay-base-person-bundle": {
"version": "v0.1.5"
},
"dbp/relay-base-person-connector-ldap-bundle": {
"version": "0.2",
"recipe": {
"repo": "github.com/digital-blueprint/symfony-recipes",
"branch": "main",
"version": "0.2",
"ref": "7c215e20e679cf2221653fe26dee9ea0240ed1d1"
},
"files": [
"config/packages/dbp_relay_base_person_connector_ldap.yaml"
]
},
"dbp/relay-core-bundle": {
"version": "0.1",
"recipe": {
"repo": "github.com/digital-blueprint/symfony-recipes",
"branch": "main",
"version": "0.1",
"ref": "d03e655fa1f726593be781f194a5084f99c7c47d"
},
"files": [
"config/packages/dbp_relay_core.yaml"
]
},
"dbp/relay-esign-bundle": {
"version": "v0.2.1"
},
"dbp/relay-frontend-bundle": {
"version": "v0.1.0"
},
"dnoegel/php-xdg-base-dir": {
"version": "v0.1.1"
},
"doctrine/annotations": {
"version": "1.13",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
},
"files": [
"config/routes/annotations.yaml"
]
},
"doctrine/inflector": {
"version": "2.0.4"
},
"doctrine/instantiator": {
"version": "1.4.0"
},
"doctrine/lexer": {
"version": "1.2.1"
},
"dragonmantank/cron-expression": {
"version": "v3.1.0"
},
"felixfbecker/advanced-json-rpc": {
"version": "v3.2.1"
},
"felixfbecker/language-server-protocol": {
"version": "1.5.1"
},
"fgrosse/phpasn1": {
"version": "v2.3.0"
},
"fig/link-util": {
"version": "1.1.2"
},
"friendsofphp/php-cs-fixer": {
"version": "3.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.0",
"ref": "be2103eb4a20942e28a6dd87736669b757132435"
},
"files": [
".php-cs-fixer.dist.php"
]
},
"guzzlehttp/guzzle": {
"version": "7.4.0"
},
"guzzlehttp/promises": {
"version": "1.5.1"
},
"guzzlehttp/psr7": {
"version": "1.8.3"
},
"illuminate/contracts": {
"version": "v8.81.0"
},
"kevinrob/guzzle-cache-middleware": {
"version": "v3.4.1"
},
"league/uri": {
"version": "6.5.0"
},
"league/uri-interfaces": {
"version": "2.3.0"
},
"monolog/monolog": {
"version": "2.3.5"
},
"myclabs/deep-copy": {
"version": "1.10.2"
},
"myclabs/php-enum": {
"version": "1.8.3"
},
"nelmio/cors-bundle": {
"version": "2.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.5",
"ref": "6bea22e6c564fba3a1391615cada1437d0bde39c"
},
"files": [
"config/packages/nelmio_cors.yaml"
]
},
"netresearch/jsonmapper": {
"version": "v4.0.0"
},
"nikic/php-parser": {
"version": "v4.13.1"
},
"openlss/lib-array2xml": {
"version": "1.0.0"
},
"phar-io/manifest": {
"version": "2.0.3"
},
"phar-io/version": {
"version": "3.1.0"
},
"php-cs-fixer/diff": {
"version": "v2.0.2"
},
"phpdocumentor/reflection-common": {
"version": "2.2.0"
},
"phpdocumentor/reflection-docblock": {
"version": "5.3.0"
},
"phpdocumentor/type-resolver": {
"version": "1.5.1"
},
"phpspec/prophecy": {
"version": "v1.15.0"
},
"phpstan/phpstan": {
"version": "1.1.1"
},
"phpstan/phpstan-phpunit": {
"version": "1.0.0"
},
"phpunit/php-code-coverage": {
"version": "9.2.10"
},
"phpunit/php-file-iterator": {
"version": "3.0.6"
},
"phpunit/php-invoker": {
"version": "3.1.1"
},
"phpunit/php-text-template": {
"version": "2.0.4"
},
"phpunit/php-timer": {
"version": "5.0.3"
},
"phpunit/phpunit": {
"version": "9.5",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "9.3",
"ref": "a6249a6c4392e9169b87abf93225f7f9f59025e6"
},
"files": [
".env.test",
"phpunit.xml.dist",
"tests/bootstrap.php"
]
},
"pimple/pimple": {
"version": "v3.5.0"
},
"psr/cache": {
"version": "1.0.1"
},
"psr/container": {
"version": "1.1.1"
},
"psr/event-dispatcher": {
"version": "1.0.0"
},
"psr/http-client": {
"version": "1.0.1"
},
"psr/http-message": {
"version": "1.0.1"
},
"psr/link": {
"version": "1.0.0"
},
"psr/log": {
"version": "1.1.4"
},
"psr/simple-cache": {
"version": "1.0.1"
},
"ralouphie/getallheaders": {
"version": "3.0.3"
},
"sebastian/cli-parser": {
"version": "1.0.1"
},
"sebastian/code-unit": {
"version": "1.0.8"
},
"sebastian/code-unit-reverse-lookup": {
"version": "2.0.3"
},
"sebastian/comparator": {
"version": "4.0.6"
},
"sebastian/complexity": {
"version": "2.0.2"
},
"sebastian/diff": {
"version": "4.0.4"
},
"sebastian/environment": {
"version": "5.1.3"
},
"sebastian/exporter": {
"version": "4.0.4"
},
"sebastian/global-state": {
"version": "5.0.3"
},
"sebastian/lines-of-code": {
"version": "1.0.3"
},
"sebastian/object-enumerator": {
"version": "4.0.4"
},
"sebastian/object-reflector": {
"version": "2.0.4"
},
"sebastian/recursion-context": {
"version": "4.0.4"
},
"sebastian/resource-operations": {
"version": "3.0.3"
},
"sebastian/type": {
"version": "2.3.4"
},
"sebastian/version": {
"version": "3.0.2"
},
"spomky-labs/base64url": {
"version": "v2.0.4"
},
"symfony/amqp-messenger": {
"version": "v5.3.7"
},
"symfony/apache-pack": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.0",
"ref": "9d254a22efca7264203eea98b866f16f944b2f09"
},
"files": [
"public/.htaccess"
]
},
"symfony/asset": {
"version": "v5.3.4"
},
"symfony/browser-kit": {
"version": "v5.3.4"
},
"symfony/cache": {
"version": "v5.3.10"
},
"symfony/cache-contracts": {
"version": "v2.4.0"
},
"symfony/config": {
"version": "v5.3.10"
},
"symfony/console": {
"version": "5.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.3",
"ref": "da0c8be8157600ad34f10ff0c9cc91232522e047"
},
"files": [
"bin/console"
]
},
"symfony/debug-bundle": {
"version": "5.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.1",
"ref": "0ce7a032d344fb7b661cd25d31914cd703ad445b"
},
"files": [
"config/packages/dev/debug.yaml"
]
},
"symfony/dependency-injection": {
"version": "v5.3.10"
},
"symfony/deprecation-contracts": {
"version": "v2.4.0"
},
"symfony/doctrine-messenger": {
"version": "v5.3.10"
},
"symfony/dom-crawler": {
"version": "v5.3.7"
},
"symfony/dotenv": {
"version": "v5.3.10"
},
"symfony/error-handler": {
"version": "v5.3.7"
},
"symfony/event-dispatcher": {
"version": "v5.3.7"
},
"symfony/event-dispatcher-contracts": {
"version": "v2.4.0"
},
"symfony/expression-language": {
"version": "v5.3.7"
},
"symfony/filesystem": {
"version": "v5.3.4"
},
"symfony/finder": {
"version": "v5.3.7"
},
"symfony/flex": {
"version": "1.17",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e"
},
"files": [
".env"
]
},
"symfony/framework-bundle": {
"version": "5.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.4",
"ref": "d4131812e20853626928e73d3effef44014944c0"
},
"files": [
"config/packages/cache.yaml",
"config/packages/framework.yaml",
"config/preload.php",
"config/routes/framework.yaml",
"config/services.yaml",
"public/index.php",
"src/Controller/.gitignore",
"src/Kernel.php"
]
},
"symfony/http-client": {
"version": "v5.3.10"
},
"symfony/http-client-contracts": {
"version": "v2.4.0"
},
"symfony/http-foundation": {
"version": "v5.3.10"
},
"symfony/http-kernel": {
"version": "v5.3.10"
},
"symfony/messenger": {
"version": "5.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "25e3c964d3aee480b3acc3114ffb7940c89edfed"
},
"files": [
"config/packages/messenger.yaml"
]
},
"symfony/mime": {
"version": "v5.3.8"
},
"symfony/monolog-bridge": {
"version": "v5.3.7"
},
"symfony/monolog-bundle": {
"version": "3.7",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.7",
"ref": "a7bace7dbc5a7ed5608dbe2165e0774c87175fe6"
},
"files": [
"config/packages/test/monolog.yaml",
"config/packages/prod/monolog.yaml",
"config/packages/prod/deprecations.yaml",
"config/packages/dev/monolog.yaml"
]
},
"symfony/options-resolver": {
"version": "v5.3.7"
},
"symfony/password-hasher": {
"version": "v5.3.8"
},
"symfony/phpunit-bridge": {
"version": "5.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.3",
"ref": "97cb3dc7b0f39c7cfc4b7553504c9d7b7795de96"
},
"files": [
".env.test",
"bin/phpunit",
"phpunit.xml.dist",
"tests/bootstrap.php"
]
},
"symfony/polyfill-intl-grapheme": {
"version": "v1.23.1"
},
"symfony/polyfill-intl-idn": {
"version": "v1.23.0"
},
"symfony/polyfill-intl-normalizer": {
"version": "v1.23.0"
},
"symfony/polyfill-mbstring": {
"version": "v1.23.1"
},
"symfony/polyfill-php72": {
"version": "v1.23.0"
},
"symfony/polyfill-php73": {
"version": "v1.23.0"
},
"symfony/polyfill-php80": {
"version": "v1.23.1"
},
"symfony/polyfill-php81": {
"version": "v1.23.0"
},
"symfony/process": {
"version": "v5.3.7"
},
"symfony/property-access": {
"version": "v5.3.8"
},
"symfony/property-info": {
"version": "v5.3.8"
},
"symfony/redis-messenger": {
"version": "v5.3.10"
},
"symfony/routing": {
"version": "5.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.3",
"ref": "44633353926a0382d7dfb0530922c5c0b30fae11"
},
"files": [
"config/routes.yaml",
"config/packages/routing.yaml"
]
},
"symfony/security-bundle": {
"version": "5.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.3",
"ref": "09b5e809bd7a992061febd05b797c64a2d93b5cd"
},
"files": [
"config/packages/security.yaml"
]
},
"symfony/security-core": {
"version": "v5.3.10"
},
"symfony/security-csrf": {
"version": "v5.3.4"
},
"symfony/security-guard": {
"version": "v5.3.7"
},
"symfony/security-http": {
"version": "v5.3.10"
},
"symfony/serializer": {
"version": "v5.3.10"
},
"symfony/service-contracts": {
"version": "v2.4.0"
},
"symfony/stopwatch": {
"version": "v5.3.4"
},
"symfony/string": {
"version": "v5.3.10"
},
"symfony/translation-contracts": {
"version": "v2.4.0"
},
"symfony/twig-bridge": {
"version": "v5.3.7"
},
"symfony/twig-bundle": {
"version": "5.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.4",
"ref": "bffbb8f1a849736e64006735afae730cb428b6ff"
},
"files": [
"config/packages/twig.yaml",
"templates/base.html.twig"
]
},
"symfony/validator": {
"version": "5.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "3eb8df139ec05414489d55b97603c5f6ca0c44cb"
},
"files": [
"config/packages/validator.yaml",
"config/packages/test/validator.yaml"
]
},
"symfony/var-dumper": {
"version": "v5.3.10"
},
"symfony/var-exporter": {
"version": "v5.3.8"
},
"symfony/web-link": {
"version": "v5.3.4"
},
"symfony/web-profiler-bundle": {
"version": "5.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6"
},
"files": [
"config/routes/dev/web_profiler.yaml",
"config/packages/test/web_profiler.yaml",
"config/packages/dev/web_profiler.yaml"
]
},
"symfony/yaml": {
"version": "v5.3.6"
},
"theseer/tokenizer": {
"version": "1.2.1"
},
"tightenco/collect": {
"version": "v8.81.0"
},
"twig/twig": {
"version": "v3.3.3"
},
"vimeo/psalm": {
"version": "4.12.0"
},
"web-token/jwt-checker": {
"version": "v2.2.11"
},
"web-token/jwt-core": {
"version": "v2.2.11"
},
"web-token/jwt-easy": {
"version": "v2.2.11"
},
"web-token/jwt-encryption": {
"version": "v2.2.11"
},
"web-token/jwt-signature": {
"version": "v2.2.11"
},
"web-token/jwt-signature-algorithm-rsa": {
"version": "v2.2.11"
},
"webmozart/assert": {
"version": "1.10.0"
},
"webmozart/path-util": {
"version": "2.3.0"
},
"willdurand/negotiation": {
"version": "3.0.0"
},
"zbateson/mail-mime-parser": {
"version": "2.2.0"
},
"zbateson/mb-wrapper": {
"version": "1.1.1"
},
"zbateson/stream-decorators": {
"version": "1.0.6"
}
}
<?php
declare(strict_types=1);
namespace App\Tests;
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\ApiTestCase;
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client;
use Symfony\Component\HttpFoundation\Response;
class Test extends ApiTestCase
{
/** @var Client */
protected $client;
protected function setUp(): void
{
parent::setUp();
$this->client = static::createClient();
}
public function testIndex()
{
$response = $this->client->request('GET', '/');
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
}
public function testJSONLD()
{
$response = $this->client->request('GET', '/', ['headers' => ['HTTP_ACCEPT' => 'application/ld+json']]);
$this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
$this->assertJson($response->getContent(false));
}
}
<?php
declare(strict_types=1);
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
require dirname(__DIR__).'/config/bootstrap.php';
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment