Skip to content
Snippets Groups Projects
Commit 045b67e7 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

wip

parent 87c58317
No related branches found
No related tags found
No related merge requests found
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
parameters:
inferPrivatePropertyTypeFromConstructor: true
level: 3
paths:
- src
- tests
bootstrapFiles:
- bin/.phpunit/phpunit-8-0/vendor/autoload.php
excludes_analyse:
- 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="http://schema.phpunit.de/6.5/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
>
<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_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="8" />
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>src</directory>
<directory>tests</directory>
</whitelist>
</filter>
<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" />
</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}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
# Sets the HTTP_AUTHORIZATION header removed by Apache
RewriteCond %{HTTP:Authorization} .
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# 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.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
# Rewrite all other queries to the front controller.
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\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;
// FPM renames all environment variables!
if (isset($_SERVER['REDIRECT_APP_ENV'])) {
$_SERVER['APP_ENV'] = $_SERVER['REDIRECT_APP_ENV'];
}
require dirname(__DIR__).'/config/bootstrap.php';
if ($_SERVER['APP_DEBUG']) {
umask(0000);
Debug::enable();
} else {
// Set a dummy dumper handler to avoid left over dump() commands breaking production
\Symfony\Component\VarDumper\VarDumper::setHandler(function ($var) {});
}
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
}
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
Request::setTrustedHosts([$trustedHosts]);
}
$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\Config\Loader\LoaderInterface;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\RouteCollectionBuilder;
class Kernel extends BaseKernel
{
use MicroKernelTrait;
private const CONFIG_EXTS = '.{php,xml,yaml,yml}';
public function registerBundles(): iterable
{
$contents = require $this->getProjectDir().'/config/bundles.php';
foreach ($contents as $class => $envs) {
if ($envs[$this->environment] ?? $envs['all'] ?? false) {
yield new $class();
}
}
}
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader): void
{
$c->addResource(new FileResource($this->getProjectDir().'/config/bundles.php'));
$c->setParameter('container.dumper.inline_class_loader', true);
$confDir = $this->getProjectDir().'/config';
$loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob');
$loader->load($confDir.'/{packages}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob');
$loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob');
$loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob');
}
protected function configureRoutes(RouteCollectionBuilder $routes): void
{
$confDir = $this->getProjectDir().'/config';
$routes->import($confDir.'/{routes}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob');
$routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
$routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob');
}
}
{
"adldap2/adldap2": {
"version": "v10.2.2"
},
"amphp/amp": {
"version": "v2.4.1"
},
"amphp/byte-stream": {
"version": "v1.7.2"
},
"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"
]
},
"brick/math": {
"version": "0.8.17"
},
"composer/package-versions-deprecated": {
"version": "1.10.99"
},
"composer/semver": {
"version": "1.5.1"
},
"composer/xdebug-handler": {
"version": "1.4.1"
},
"dbp/api-alma-bundle": {
"version": "dev-alma-bundle"
},
"dbp/api-authentic-document-bundle": {
"version": "dev-master"
},
"dbp/api-core-bundle": {
"version": "dev-creiter-wip2"
},
"dbp/api-esign-bundle": {
"version": "dev-master"
},
"dbp/api-knowledgebase-bundle": {
"version": "dev-master"
},
"dbp/api-location-check-in-bundle": {
"version": "dev-master"
},
"dbp/api-nextcloud-bundle": {
"version": "dev-master"
},
"deployer/deployer": {
"version": "v6.7.3"
},
"deployer/phar-update": {
"version": "v2.2.0"
},
"deployer/recipes": {
"version": "6.2.2"
},
"dnoegel/php-xdg-base-dir": {
"version": "v0.1.1"
},
"doctrine/annotations": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
},
"files": [
"config/routes/annotations.yaml"
]
},
"doctrine/cache": {
"version": "1.10.0"
},
"doctrine/collections": {
"version": "1.6.4"
},
"doctrine/common": {
"version": "2.12.0"
},
"doctrine/dbal": {
"version": "v2.10.1"
},
"doctrine/doctrine-bundle": {
"version": "2.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "2.0",
"ref": "a9f2463b9f73efe74482f831f03a204a41328555"
},
"files": [
"config/packages/doctrine.yaml",
"config/packages/prod/doctrine.yaml",
"src/Entity/.gitignore",
"src/Repository/.gitignore"
]
},
"doctrine/event-manager": {
"version": "1.1.0"
},
"doctrine/inflector": {
"version": "1.3.1"
},
"doctrine/instantiator": {
"version": "1.3.0"
},
"doctrine/lexer": {
"version": "1.2.0"
},
"doctrine/orm": {
"version": "v2.7.1"
},
"doctrine/persistence": {
"version": "1.3.6"
},
"doctrine/reflection": {
"version": "v1.1.0"
},
"doctrine/sql-formatter": {
"version": "1.1.1"
},
"egulias/email-validator": {
"version": "2.1.21"
},
"felixfbecker/advanced-json-rpc": {
"version": "v3.1.1"
},
"felixfbecker/language-server-protocol": {
"version": "v1.4.0"
},
"fgrosse/phpasn1": {
"version": "v2.1.1"
},
"fig/link-util": {
"version": "1.1.0"
},
"friendsofphp/php-cs-fixer": {
"version": "2.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "2.2",
"ref": "cc05ab6abf6894bddb9bbd6a252459010ebe040b"
},
"files": [
".php_cs.dist"
]
},
"guzzlehttp/guzzle": {
"version": "6.5.2"
},
"guzzlehttp/promises": {
"version": "v1.3.1"
},
"guzzlehttp/psr7": {
"version": "1.6.1"
},
"illuminate/contracts": {
"version": "v6.15.1"
},
"kevinrob/guzzle-cache-middleware": {
"version": "v3.3.1"
},
"league/uri": {
"version": "6.2.1"
},
"league/uri-interfaces": {
"version": "2.1.0"
},
"metasyntactical/composer-plugin-license-check": {
"version": "v0.5.0"
},
"monolog/monolog": {
"version": "1.25.3"
},
"myclabs/php-enum": {
"version": "1.7.6"
},
"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"
]
},
"netresearch/jsonmapper": {
"version": "v1.6.0"
},
"nikic/php-parser": {
"version": "v4.3.0"
},
"openlss/lib-array2xml": {
"version": "1.0.0"
},
"php": {
"version": "7.3"
},
"php-cs-fixer/diff": {
"version": "v1.3.0"
},
"phpdocumentor/reflection-common": {
"version": "2.0.0"
},
"phpdocumentor/reflection-docblock": {
"version": "4.3.4"
},
"phpdocumentor/type-resolver": {
"version": "1.0.1"
},
"phpstan/phpstan": {
"version": "0.12.11"
},
"phpstan/phpstan-phpunit": {
"version": "0.12.6"
},
"pimple/pimple": {
"version": "v3.2.3"
},
"psr/cache": {
"version": "1.0.1"
},
"psr/container": {
"version": "1.0.0"
},
"psr/http-message": {
"version": "1.0.1"
},
"psr/link": {
"version": "1.0.0"
},
"psr/log": {
"version": "1.1.2"
},
"psr/simple-cache": {
"version": "1.0.1"
},
"ralouphie/getallheaders": {
"version": "3.0.3"
},
"sabre/dav": {
"version": "3.2.3"
},
"sabre/event": {
"version": "3.0.0"
},
"sabre/http": {
"version": "v4.2.4"
},
"sabre/uri": {
"version": "1.2.1"
},
"sabre/vobject": {
"version": "4.2.2"
},
"sabre/xml": {
"version": "1.5.1"
},
"sebastian/diff": {
"version": "3.0.2"
},
"spomky-labs/base64url": {
"version": "v2.0.1"
},
"symfony/apache-pack": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.0",
"ref": "410b9325a37ef86f1e47262c61738f6202202bca"
}
},
"symfony/asset": {
"version": "v4.4.4"
},
"symfony/cache": {
"version": "v4.4.4"
},
"symfony/cache-contracts": {
"version": "v2.0.1"
},
"symfony/config": {
"version": "v4.4.4"
},
"symfony/console": {
"version": "4.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "ea8c0eda34fda57e7d5cd8cbd889e2a387e3472c"
},
"files": [
"bin/console",
"config/bootstrap.php"
]
},
"symfony/debug": {
"version": "v4.4.4"
},
"symfony/debug-bundle": {
"version": "4.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.1",
"ref": "f8863cbad2f2e58c4b65fa1eac892ab189971bea"
},
"files": [
"config/packages/dev/debug.yaml"
]
},
"symfony/dependency-injection": {
"version": "v4.4.4"
},
"symfony/doctrine-bridge": {
"version": "v4.4.4"
},
"symfony/dotenv": {
"version": "v4.4.4"
},
"symfony/error-handler": {
"version": "v4.4.4"
},
"symfony/event-dispatcher": {
"version": "v4.4.4"
},
"symfony/event-dispatcher-contracts": {
"version": "v1.1.7"
},
"symfony/expression-language": {
"version": "v4.4.4"
},
"symfony/filesystem": {
"version": "v4.4.4"
},
"symfony/finder": {
"version": "v4.4.4"
},
"symfony/flex": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e"
},
"files": [
".env"
]
},
"symfony/framework-bundle": {
"version": "4.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "23ecaccc551fe2f74baf613811ae529eb07762fa"
},
"files": [
"config/bootstrap.php",
"config/packages/cache.yaml",
"config/packages/framework.yaml",
"config/packages/test/framework.yaml",
"config/routes/dev/framework.yaml",
"config/services.yaml",
"public/index.php",
"src/Controller/.gitignore",
"src/Kernel.php"
]
},
"symfony/http-client-contracts": {
"version": "v2.2.0"
},
"symfony/http-foundation": {
"version": "v4.4.4"
},
"symfony/http-kernel": {
"version": "v4.4.4"
},
"symfony/inflector": {
"version": "v4.4.4"
},
"symfony/mailer": {
"version": "4.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "15658c2a0176cda2e7dba66276a2030b52bd81b2"
},
"files": [
"config/packages/mailer.yaml"
]
},
"symfony/messenger": {
"version": "4.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "8a2675c061737658bed85102e9241c752620e575"
},
"files": [
"config/packages/messenger.yaml"
]
},
"symfony/mime": {
"version": "v4.4.4"
},
"symfony/monolog-bridge": {
"version": "v4.4.4"
},
"symfony/monolog-bundle": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "877bdb4223245783d00ed1f7429aa7ebc606d914"
},
"files": [
"config/packages/dev/monolog.yaml",
"config/packages/prod/monolog.yaml",
"config/packages/test/monolog.yaml"
]
},
"symfony/options-resolver": {
"version": "v4.4.11"
},
"symfony/phpunit-bridge": {
"version": "4.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "3f8a8c93cd47061999316f8d56edd6c2abca9308"
},
"files": [
".env.test",
"bin/phpunit",
"config/services_test.yaml",
"phpunit.xml.dist",
"tests/bootstrap.php"
]
},
"symfony/polyfill-intl-idn": {
"version": "v1.14.0"
},
"symfony/polyfill-intl-normalizer": {
"version": "v1.18.0"
},
"symfony/polyfill-mbstring": {
"version": "v1.14.0"
},
"symfony/polyfill-php72": {
"version": "v1.14.0"
},
"symfony/polyfill-php73": {
"version": "v1.14.0"
},
"symfony/polyfill-php80": {
"version": "v1.17.0"
},
"symfony/process": {
"version": "v4.4.4"
},
"symfony/profiler-pack": {
"version": "v1.0.4"
},
"symfony/property-access": {
"version": "v4.4.4"
},
"symfony/property-info": {
"version": "v4.4.4"
},
"symfony/routing": {
"version": "4.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.2",
"ref": "683dcb08707ba8d41b7e34adb0344bfd68d248a7"
},
"files": [
"config/packages/prod/routing.yaml",
"config/packages/routing.yaml",
"config/routes.yaml"
]
},
"symfony/security-bundle": {
"version": "4.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "7b4408dc203049666fe23fabed23cbadc6d8440f"
},
"files": [
"config/packages/security.yaml"
]
},
"symfony/security-core": {
"version": "v4.4.4"
},
"symfony/security-csrf": {
"version": "v4.4.4"
},
"symfony/security-guard": {
"version": "v4.4.4"
},
"symfony/security-http": {
"version": "v4.4.4"
},
"symfony/serializer": {
"version": "v4.4.4"
},
"symfony/service-contracts": {
"version": "v2.0.1"
},
"symfony/stopwatch": {
"version": "v4.4.4"
},
"symfony/translation-contracts": {
"version": "v2.0.1"
},
"symfony/twig-bridge": {
"version": "v4.4.4"
},
"symfony/twig-bundle": {
"version": "4.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "15a41bbd66a1323d09824a189b485c126bbefa51"
},
"files": [
"config/packages/test/twig.yaml",
"config/packages/twig.yaml",
"templates/base.html.twig"
]
},
"symfony/validator": {
"version": "4.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "d902da3e4952f18d3bf05aab29512eb61cabd869"
},
"files": [
"config/packages/test/validator.yaml",
"config/packages/validator.yaml"
]
},
"symfony/var-dumper": {
"version": "v4.4.4"
},
"symfony/var-exporter": {
"version": "v4.4.4"
},
"symfony/web-link": {
"version": "v4.4.4"
},
"symfony/web-profiler-bundle": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6"
},
"files": [
"config/packages/dev/web_profiler.yaml",
"config/packages/test/web_profiler.yaml",
"config/routes/dev/web_profiler.yaml"
]
},
"symfony/web-server-bundle": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "dae9b39fd6717970be7601101ce5aa960bf53d9a"
}
},
"symfony/yaml": {
"version": "v4.4.4"
},
"tightenco/collect": {
"version": "v6.15.0"
},
"twig/twig": {
"version": "v3.0.3"
},
"vimeo/psalm": {
"version": "3.10.1"
},
"web-token/jwt-checker": {
"version": "v2.1.5"
},
"web-token/jwt-core": {
"version": "v2.1.5"
},
"web-token/jwt-easy": {
"version": "v2.1.5"
},
"web-token/jwt-encryption": {
"version": "v2.1.5"
},
"web-token/jwt-signature": {
"version": "v2.1.5"
},
"web-token/jwt-signature-algorithm-rsa": {
"version": "v2.1.5"
},
"webmozart/assert": {
"version": "1.7.0"
},
"webmozart/glob": {
"version": "4.1.0"
},
"webmozart/path-util": {
"version": "2.3.0"
},
"willdurand/negotiation": {
"version": "v2.3.1"
},
"zbateson/mail-mime-parser": {
"version": "1.2.3"
},
"zbateson/mb-wrapper": {
"version": "1.0.0"
},
"zbateson/stream-decorators": {
"version": "1.0.4"
}
}
<?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