Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Run QA tests (static analysis, lint and unit tests)
on: [pull_request]
on:
pull_request:
push:
branches:
- main
workflow_dispatch:

jobs:
run-qa-tests:
Expand All @@ -23,4 +28,4 @@ jobs:
run: yarn

- name: Run QA tests
run: composer check
run: composer check-ci
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

# 6.0.0
- Upgrade code to run on Symfony 7.4

# 5.0.6
- Fix: Vetting with a self asserted token is not allowed when adding a token, the user is always
directed to the RA vetting page #466
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ This component is part of "Step-up Authentication as-a Service" and requires oth
* PHP 8.2
* [Composer](https://getcomposer.org/)
* A web server (Apache, Nginx)
* Graylog2 (or disable this Monolog handler)
* A working [Gateway](https://github.com/OpenConext/Stepup-Gateway)
* Working [Middleware](https://github.com/OpenConext/Stepup-Middleware)

## Installation

Clone the repository or download the archive to a directory. Install the dependencies by running `composer install && yarn install`.
Clone the repository or download the archive to a directory. Install the dependencies by running `composer install && composer frontend-install`.

## Updating translations

Expand All @@ -30,4 +29,4 @@ Then, translate the strings using the web interface available at: https://ss-dev
For more information about the JMSTranslationBundle, see http://jmsyst.com/bundles/JMSTranslationBundle

## Release strategy
Please read: https://github.com/OpenConext/Stepup-Deploy/wiki/Release-Management fro more information on the release strategy used in Stepup projects.
Please read: https://github.com/OpenConext/Stepup-Deploy/wiki/Release-Management for more information on the release strategy used in Stepup projects.
12 changes: 6 additions & 6 deletions assets/scss/application.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "utf-8";

@import "vars";
@use "vars";
@import "~bootstrap";

.nav-header {
Expand All @@ -21,7 +21,7 @@

.remote-vetting {

@media (min-width: $medium) {
@media (min-width: vars.$medium) {
> div:nth-child(3n+4) {
clear: left;
}
Expand All @@ -35,7 +35,7 @@
}
}
}
@media (min-width: $large) {
@media (min-width: vars.$large) {
.vetting-selector{
min-height: 360px;

Expand All @@ -57,12 +57,12 @@

}
.vetting-selector.highlighted {
border-color: $blue;
border-color: vars.$blue;
}

.second-factors {

@media (min-width: $medium) {
@media (min-width: vars.$medium) {
> div:nth-child(3n+4) {
clear: left;
}
Expand Down Expand Up @@ -201,6 +201,6 @@ span.label {
.loa-star-rating {
img {
height: 1em;
filter: $star-color;
filter: vars.$star-color;
}
}
7 changes: 0 additions & 7 deletions ci/qa/phpcpd

This file was deleted.

2 changes: 1 addition & 1 deletion ci/qa/phplint.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
path: [./src, ./tests]
jobs: 10
cache: /var/qa/phplint.cache
cache-dir: var/cache/qa/phplint.cache
extensions:
- php
exclude:
Expand Down
326 changes: 206 additions & 120 deletions ci/qa/phpstan-baseline.php

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ci/qa/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ parameters:
excludePaths:
- ../../src/Surfnet/StepupSelfService/SelfServiceBundle/Tests
- ../../src/Surfnet/StepupSelfService/SamlStepupProviderBundle/Tests
treatPhpDocTypesAsCertain: false
57 changes: 24 additions & 33 deletions ci/qa/phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,40 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.6/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="../../vendor/autoload.php"
cacheDirectory="../../var/qa/phpunit.cache"
>
<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="6.5"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
</php>

<testsuites>
<testsuite name="Project Test Suite">
<directory>../../src/Surfnet/StepupSelfService/SelfServiceBundle/Tests</directory>
<directory>../../src/Surfnet/StepupSelfService/SamlStepupProviderBundle/Tests</directory>
</testsuite>
</testsuites>

<coverage processUncoveredFiles="true">
<include>
<directory>../../src</directory>
</include>
<exclude>
<directory>../../src/Surfnet/StepupSelfService/SamlStepupProviderBundle/Tests</directory>
<directory>../../src/Surfnet/StepupSelfService/SelfServiceBundle/Tests</directory>
</exclude>
</coverage>

<listeners>
<listener class="\Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
<listener class="\Mockery\Adapter\Phpunit\TestListener"/>
</listeners>
<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"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0&amp;max[self]=0"/>
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>../../src/Surfnet/StepupSelfService/SelfServiceBundle/Tests</directory>
<directory>../../src/Surfnet/StepupSelfService/SamlStepupProviderBundle/Tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>../../src</directory>
</include>
<exclude>
<directory>../../src/Surfnet/StepupSelfService/SamlStepupProviderBundle/Tests</directory>
<directory>../../src/Surfnet/StepupSelfService/SelfServiceBundle/Tests</directory>
</exclude>
</source>
</phpunit>
18 changes: 18 additions & 0 deletions ci/qa/rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;

return RectorConfig::configure()
->withPaths([
__DIR__ . '/../../config',
__DIR__ . '/../../src',
__DIR__ . '/../../templates',
])
->withPhpSets()
->withAttributesSets(all: true)
->withComposerBased(twig: true, doctrine: true, phpunit: true, symfony: true)
->withPHPStanConfigs([__DIR__.'/phpstan.neon'])
// ->withPreparedSets(deadCode: true)
;
5 changes: 5 additions & 0 deletions ci/qa/rector.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh

# Ensure we run from project root
cd "$(dirname "$0")/../../" || exit 1
./vendor/bin/rector --config=ci/qa/rector.php "$@"
2 changes: 1 addition & 1 deletion component_info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PHP_VERSION=82
SYMFONY_VERSION=6
SYMFONY_VERSION=7
ENCORE=yes
NODE_VERSION=20
ASSETIC=no
Expand Down
74 changes: 41 additions & 33 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,71 +24,79 @@
"jms/translation-bundle": "^2.0.0",
"mpdf/mpdf": "^8.2",
"nelmio/security-bundle": "^3",
"openconext/monitor-bundle": "^4.1",
"surfnet/stepup-bundle": "^6.0",
"surfnet/stepup-middleware-client-bundle": "^5.0",
"surfnet/stepup-saml-bundle": "^6.0",
"symfony/console": "^6.4",
"symfony/expression-language": "^6.4",
"openconext/monitor-bundle": "^4.3.1",
"surfnet/stepup-bundle": "^7.0.1",
"surfnet/stepup-middleware-client-bundle": "^6.0.0",
"surfnet/stepup-saml-bundle": "^7.0.1",
"symfony/console": "^7.4",
"symfony/expression-language": "^7.4",
"symfony/flex": "^v2.4.1.",
"symfony/form": "^6.4",
"symfony/framework-bundle": "^6.4",
"symfony/http-foundation": "^6.4",
"symfony/monolog-bundle": "^3.1.0",
"symfony/runtime": "^6.4",
"symfony/security-bundle": "^6.4",
"symfony/stopwatch": "^6.4",
"symfony/translation": "^6.4",
"symfony/twig-bundle": "^6.4",
"symfony/web-profiler-bundle": "^6.4",
"symfony/webpack-encore-bundle": "^1.8",
"symfony/form": "^7.4",
"symfony/framework-bundle": "^7.4",
"symfony/http-foundation": "^7.4",
"symfony/monolog-bundle": "^v4.0.1",
"symfony/runtime": "^7.4",
"symfony/security-bundle": "^7.4",
"symfony/stopwatch": "^7.4",
"symfony/translation": "^7.4",
"symfony/twig-bundle": "^7.4",
"symfony/web-profiler-bundle": "^7.4",
"symfony/webpack-encore-bundle": "^v2.4.0",
"twig/extra-bundle": "^3.0",
"twig/intl-extra": "^3",
"twig/twig": "^3"
},
"require-dev": {
"malukenho/docheader": "^1.0.0",
"matthiasnoback/symfony-config-test": "^4",
"matthiasnoback/symfony-config-test": "^6.1",
"mockery/mockery": "~1.0",
"overtrue/phplint": "*",
"phpmd/phpmd": "^2.6",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "*",
"phpunit/phpunit": "^9.5",
"rector/rector": "^0.19.8",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpunit/phpunit": "^11.5.48",
"rector/rector": "^2.3",
"roave/security-advisories": "dev-latest",
"slevomat/coding-standard": "^8.13",
"sebastian/exporter": "^4.0.5",
"sebastian/phpcpd": "^6.0",
"squizlabs/php_codesniffer": "^3.7",
"symfony/browser-kit": "^6.4",
"symfony/css-selector": "^6.4",
"symfony/phpunit-bridge": "^6.4"
"slevomat/coding-standard": "^8.26",
"squizlabs/php_codesniffer": "^4.0",
"symfony/browser-kit": "^7.4",
"symfony/css-selector": "^7.4",
"symfony/phpunit-bridge": "^8.0"
},
"scripts": {
"check": [
"@check-ci",
"@rector"
],
"check-ci": [
"@composer-validate",
"@phplint",
"@phpmd",
"@phpcs",
"@phpcpd",
"@license-headers",
"@test",
"@phpstan"
],
"composer-validate": "./ci/qa/validate",
"phplint": "./ci/qa/phplint",
"license-headers": "./ci/qa/docheader",
"rector": "./ci/qa/rector.sh --dry-run",
"rector-fix": "./ci/qa/rector.sh",
"phpmd": "./ci/qa/phpmd",
"phpcs": "./ci/qa/phpcs",
"phpcpd": "./ci/qa/phpcpd",
"phpstan": "./ci/qa/phpstan",
"phpstan-baseline": "./ci/qa/phpstan-update-baseline",
"phpcbf": "./ci/qa/phpcbf",
"test": "./ci/qa/phpunit",
"frontend-install": [
"yarn install --frozen-lockfile",
"yarn encore production"
"yarn encore production",
"./bin/console cache:clear",
"@fix-dev-permissions"
],
"fix-dev-permissions": [
"chown -R www-data:www-data /var/www/html/var/log",
"chown -R www-data:www-data /var/www/html/var/cache"
],
"auto-scripts": {
"cache:clear": "symfony-cmd",
Expand Down Expand Up @@ -146,7 +154,7 @@
},
"symfony": {
"allow-contrib": false,
"require": "6.4.*"
"require": "7.4.*"
},
"incenteev-parameters": [
{
Expand Down
Loading