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

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #52146 passed
/vendor
/var
/.php_cs
/.*.cache
/_coverage
/.idea
\ No newline at end of file
image: registry.gitlab.tugraz.at/dbp/dbp-api/api-core-bundle/main:v1
before_script:
- 'git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.tugraz.at/".insteadOf "git@gitlab.tugraz.at:"'
variables:
COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/_composer_cache"
cache:
key: ${CI_PROJECT_PATH}
paths:
- _composer_cache
stages:
- test
.test_defaults: &test_defaults
script:
- sudo update-alternatives --set php "/usr/bin/${PHP}"
- composer install
- composer test
test-php7.3:
stage: test
variables:
PHP: "php7.3"
<<: *test_defaults
test-php7.4:
stage: test
variables:
PHP: "php7.4"
<<: *test_defaults
test-php8.0:
stage: test
variables:
PHP: "php8.0"
<<: *test_defaults
psalm:
stage: test
script:
- sudo update-alternatives --set php /usr/bin/php7.4
- composer install
- composer run psalm
phpstan:
stage: test
script:
- sudo update-alternatives --set php /usr/bin/php7.4
- composer install
- composer run phpstan
cs-fixer:
stage: test
allow_failure: true
script:
- sudo update-alternatives --set php /usr/bin/php7.4
- composer install
- composer run cs
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
;
$config = new PhpCsFixer\Config();
$config->setRules([
'@Symfony' => true,
'@PHP70Migration' => true,
'@PHP71Migration' => true,
'@PHP73Migration' => true,
'@DoctrineAnnotation' => true,
'doctrine_annotation_array_assignment' => ['operator' => '='],
'yoda_style' => false,
'strict_comparison' => true,
'strict_param' => true,
'declare_strict_types' => true,
'method_argument_space' => ['on_multiline' => 'ignore'],
])
->setRiskyAllowed(true)
->setFinder($finder);
return $config;
\ No newline at end of file
{
"extends": [
"config:base",
"group:allNonMajor",
"schedule:weekends",
":automergePatch"
],
"ignorePresets": [":prHourlyLimit2"],
"rangeStrategy": "update-lockfile",
"lockFileMaintenance": {
"enabled": true
},
"packageRules": [
{
"matchPackagePrefixes": [
"symfony/"
],
"allowedVersions": "<6"
}
],
"js": {
"enabled": false
}
}
\ No newline at end of file
This diff is collapsed.
# DBP API-Keycloak-Bundle
[GitLab](https://packagist.org/packages/dbp/api-keycloak-bundle) | [Packagist](https://packagist.org/packages/dbp/api-keycloak-bundle)
{
"name": "dbp/api-keycloak-bundle",
"type": "symfony-bundle",
"license": "AGPL-3.0-or-later",
"require": {
"php": "^7.3",
"symfony/yaml": "^5.2",
"symfony/framework-bundle": "^5.2",
"web-token/jwt-easy": "^2.1",
"web-token/jwt-signature-algorithm-rsa": "^2.1",
"ext-json": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/phpstan": "^0.12.33",
"phpstan/phpstan-phpunit": "^0.12.13",
"symfony/phpunit-bridge": "^5.2",
"vimeo/psalm": "^4.4"
},
"autoload": {
"psr-4": {
"DBP\\API\\KeycloakBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"DBP\\API\\KeycloakBundle\\Tests\\": "tests/"
}
},
"config": {
"sort-packages": true,
"platform": {
"php": "7.3"
}
},
"scripts": {
"test": [
"@php vendor/bin/simple-phpunit"
],
"phpstan": [
"@php vendor/bin/simple-phpunit --atleast-version 0",
"@php vendor/bin/phpstan analyze --ansi"
],
"psalm": [
"@php vendor/bin/simple-phpunit --atleast-version 0",
"@php vendor/bin/psalm"
],
"lint": [
"@composer run cs",
"@composer run phpstan",
"@composer run psalm"
],
"cs-fix": [
"@php vendor/bin/php-cs-fixer --ansi fix"
],
"cs": [
"@php vendor/bin/php-cs-fixer --ansi fix --dry-run --diff"
],
"coverage": [
"@php -dxdebug.mode=coverage vendor/bin/simple-phpunit --coverage-html _coverage"
]
}
}
This diff is collapsed.
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
parameters:
inferPrivatePropertyTypeFromConstructor: true
level: 3
paths:
- src
- tests
bootstrapFiles:
- vendor/bin/.phpunit/phpunit-9-0/vendor/autoload.php
excludes_analyse:
- tests/bootstrap.php
ignoreErrors:
<?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="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
<server name="SYMFONY_PHPUNIT_VERSION" value="9"/>
</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="4"
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" />
</ignoreFiles>
</projectFiles>
</psalm>
<?php
declare(strict_types=1);
namespace DBP\API\KeycloakBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class DbpKeycloakBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
}
}
<?php
declare(strict_types=1);
namespace DBP\API\KeycloakBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
class DbpKeycloakExtension extends ConfigurableExtension
{
public function loadInternal(array $mergedConfig, ContainerBuilder $container)
{
}
}
<?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