Skip to content
Open
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
8 changes: 6 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Run QA tests (static analysis, lint and unit tests)
on: [pull_request]
on:
pull_request:
push:
branches:
- main

jobs:
run-qa-tests:
Expand All @@ -20,4 +24,4 @@ jobs:
run: composer install

- name: Run QA tests
run: composer check
run: composer check-ci
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,12 @@ cd stepup

**Building frontend assets:**

`$ yarn encore dev`

or

`$ yarn encore prod`

for production
Run `composer frontend-install` and optionally after that: `yarn encore watch` for a development build


If everything goes as planned you can go to:

[https://azuremfa.dev.stepup.local](https://azuremfa.dev.stepup.local/)
[https://azuremfa.dev.openconext.local](https://azuremfa.dev.openconext.local/)


Configuring institutions using Azure MFA
Expand Down
13 changes: 7 additions & 6 deletions assets/scss/application.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@charset "utf-8";

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

@import "~bootstrap/dist/css/bootstrap.css";

.main-content {
margin: 2rem 4rem;
Expand Down Expand Up @@ -32,11 +33,11 @@
}

body {
background-color: $gray-lighter;
background-color: vars.$gray-lighter;
font-size: 15px;
line-height: 20px;

@media (max-width: $medium) {
@media (max-width: vars.$medium) {
background-color: white;
}

Expand All @@ -50,14 +51,14 @@ body {
background: #fff;
padding: 0 2rem;

@media (min-width: $medium) {
@media (min-width: vars.$medium) {
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
margin-top: 2rem;
}

.content {
@media (max-width: $small) {
@media (max-width: vars.$small) {
padding: 2rem 0;
}
}
Expand Down
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
16 changes: 7 additions & 9 deletions ci/qa/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
<?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="../../vendor/autoload.php">
<coverage>
<include>
<directory>../../src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="../../vendor/autoload.php" cacheDirectory="../../var/cache/qa/phpunit.cache">
<php>
<ini name="error_reporting" value="-1"/>
<server name="KERNEL_CLASS" value="Surfnet\AzureMfa\Infrastructure\Kernel"/>
<server name="APP_SECRET" value="SECRETFORTEST"/>
<server name="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
<server name="SYMFONY_PHPUNIT_VERSION" value="9.6"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
</php>
<testsuites>
<testsuite name="UnitTests">
Expand All @@ -23,4 +16,9 @@
<directory suffix="Test.php">../../tests/Functional/WebTests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>../../src</directory>
</include>
</source>
</phpunit>
16 changes: 16 additions & 0 deletions ci/qa/rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;

return RectorConfig::configure()
->withPaths([
__DIR__ . '/../../src',
__DIR__ . '/../../tests',
])
->withAttributesSets(all: true)
->withComposerBased(twig: 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
ASSETIC=no
NODE_VERSION=20
Expand Down
79 changes: 47 additions & 32 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,25 @@
"ext-zlib": "*",
"incenteev/composer-parameter-handler": "^2.1",
"openconext/monitor-bundle": "^4.3",
"surfnet/stepup-bundle": "^6.0",
"surfnet/stepup-gssp-bundle": "^5.0",
"surfnet/stepup-saml-bundle": "^6.0",
"symfony/asset": "^6.4",
"symfony/config": "^6.4",
"symfony/console": "^6.4",
"symfony/dependency-injection": "^6.4",
"symfony/expression-language": "6.4.*",
"surfnet/stepup-bundle": "^7.0.1",
"surfnet/stepup-gssp-bundle": "^6.0",
"surfnet/stepup-saml-bundle": "^7.0",
"symfony/asset": "^7.4",
"symfony/config": "^7.4",
"symfony/console": "^7.4",
"symfony/dependency-injection": "^7.4",
"symfony/expression-language": "7.4.*",
"symfony/flex": "^2.4",
"symfony/form": "^6.4",
"symfony/http-client": "6.4.*",
"symfony/monolog-bundle": "^3.8",
"symfony/runtime": "6.*.*",
"symfony/security-bundle": "^6.4",
"symfony/templating": "^6.4",
"symfony/translation": "^6.4",
"symfony/twig-bundle": "^6.4",
"symfony/validator": "^6.4",
"symfony/form": "^7.4",
"symfony/http-client": "7.4.*",
"symfony/monolog-bundle": "^v4.0.1",
"symfony/runtime": "^7.4",
"symfony/security-bundle": "^7.4",
"symfony/translation": "^7.4",
"symfony/twig-bundle": "^7.4",
"symfony/validator": "^7.4",
"symfony/webpack-encore-bundle": "^2.1",
"symfony/yaml": "^6.4",
"symfony/yaml": "^7.4",
"twig/extra-bundle": "^3.0",
"twig/twig": "^3.0"
},
Expand All @@ -57,25 +56,29 @@
"mockery/mockery": "^1.6",
"overtrue/phplint": "*",
"phpmd/phpmd": "^2.14",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^9.6",
"sebastian/phpcpd": "^6.0",
"slevomat/coding-standard": "^8.13",
"phpstan/phpstan": "^2.1.37",
"phpstan/phpstan-symfony": "^2.0",
"phpunit/phpunit": "^11.5.50",
"rector/rector": "^2.3",
"slevomat/coding-standard": "^8.27",
"soyuka/contexts": "^3.3",
"squizlabs/php_codesniffer": "^3.7",
"symfony/browser-kit": "^6.4",
"symfony/css-selector": "^6.4",
"symfony/phpunit-bridge": "^6.4",
"symfony/stopwatch": "^6.4",
"symfony/web-profiler-bundle": "^6.4"
"squizlabs/php_codesniffer": "^4.0",
"symfony/browser-kit": "^7.4",
"symfony/css-selector": "^7.4",
"symfony/phpunit-bridge": "^7.4",
"symfony/stopwatch": "^7.4",
"symfony/web-profiler-bundle": "^7.4"
},
"scripts": {
"check": [
"@check-ci",
"@rector",
"@web-tests"
],
"check-ci": [
"@composer-validate",
"@docheader",
"@lint",
"@phpcpd",
"@phpcs",
"@phpmd",
"@phpstan",
Expand All @@ -84,16 +87,28 @@
"behat": "./ci/qa/behat",
"composer-validate": "./ci/qa/validate",
"docheader": "./ci/qa/docheader",
"rector": "./ci/qa/rector.sh --dry-run",
"rector-fix": "./ci/qa/rector.sh",
"lint": "./ci/qa/lint",
"phpcs": "./ci/qa/phpcs",
"phpcpd": "./ci/qa/phpcpd",
"phpcbf": "./ci/qa/phpcbf",
"phpmd": "./ci/qa/phpmd",
"phpstan": "./ci/qa/phpstan",
"phpstan-baseline": "./ci/qa/phpstan-update-baseline",
"test": "./ci/qa/phpunit",
"unit-tests": "./ci/qa/phpunit --testsuite=UnitTests",
"web-tests": "./ci/qa/phpunit --testsuite=WebTests",
"frontend-install": [
"yarn install --frozen-lockfile",
"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",
"chown -R www-data:www-data /var/www/html/federation-metadata"
],
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
Expand Down Expand Up @@ -161,7 +176,7 @@
},
"symfony": {
"allow-contrib": false,
"require": "6.4.*"
"require": "7.4.*"
},
"incenteev-parameters": [
{
Expand Down
Loading