Skip to content

Commit 310cadc

Browse files
authored
Merge pull request #220 from OpenConext/feature/updates_jan_26
Upgrade Symfony 6.4 > 7.4
2 parents 83ce3b6 + ea4bcd8 commit 310cadc

54 files changed

Lines changed: 3535 additions & 4591 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-integration.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Run QA tests (static analysis, lint and unit tests)
2-
on: [pull_request]
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
37

48
jobs:
59
run-qa-tests:
@@ -20,4 +24,4 @@ jobs:
2024
run: composer install
2125

2226
- name: Run QA tests
23-
run: composer check
27+
run: composer check-ci

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,12 @@ cd stepup
8484

8585
**Building frontend assets:**
8686

87-
`$ yarn encore dev`
88-
89-
or
90-
91-
`$ yarn encore prod`
92-
93-
for production
87+
Run `composer frontend-install` and optionally after that: `yarn encore watch` for a development build
9488

9589

9690
If everything goes as planned you can go to:
9791

98-
[https://azuremfa.dev.stepup.local](https://azuremfa.dev.stepup.local/)
92+
[https://azuremfa.dev.openconext.local](https://azuremfa.dev.openconext.local/)
9993

10094

10195
Configuring institutions using Azure MFA

assets/scss/application.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@charset "utf-8";
22

3-
@import "bootstrap";
4-
@import "vars";
3+
@use "vars";
4+
5+
@import "~bootstrap/dist/css/bootstrap.css";
56

67
.main-content {
78
margin: 2rem 4rem;
@@ -32,11 +33,11 @@
3233
}
3334

3435
body {
35-
background-color: $gray-lighter;
36+
background-color: vars.$gray-lighter;
3637
font-size: 15px;
3738
line-height: 20px;
3839

39-
@media (max-width: $medium) {
40+
@media (max-width: vars.$medium) {
4041
background-color: white;
4142
}
4243

@@ -50,14 +51,14 @@ body {
5051
background: #fff;
5152
padding: 0 2rem;
5253

53-
@media (min-width: $medium) {
54+
@media (min-width: vars.$medium) {
5455
border-radius: 4px;
5556
box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
5657
margin-top: 2rem;
5758
}
5859

5960
.content {
60-
@media (max-width: $small) {
61+
@media (max-width: vars.$small) {
6162
padding: 2rem 0;
6263
}
6364
}

ci/qa/phpcpd

Lines changed: 0 additions & 7 deletions
This file was deleted.

ci/qa/phplint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
path: [./src, ./tests]
22
jobs: 10
3-
cache: /var/qa/phplint.cache
3+
cache-dir: var/cache/qa/phplint.cache
44
extensions:
55
- php
66
exclude:

ci/qa/phpunit.xml.dist

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
3-
<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">
4-
<coverage>
5-
<include>
6-
<directory>../../src</directory>
7-
</include>
8-
</coverage>
3+
<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">
94
<php>
105
<ini name="error_reporting" value="-1"/>
116
<server name="KERNEL_CLASS" value="Surfnet\AzureMfa\Infrastructure\Kernel"/>
127
<server name="APP_SECRET" value="SECRETFORTEST"/>
138
<server name="SHELL_VERBOSITY" value="-1"/>
14-
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
15-
<server name="SYMFONY_PHPUNIT_VERSION" value="9.6"/>
16-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
9+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
1710
</php>
1811
<testsuites>
1912
<testsuite name="UnitTests">
@@ -23,4 +16,9 @@
2316
<directory suffix="Test.php">../../tests/Functional/WebTests</directory>
2417
</testsuite>
2518
</testsuites>
19+
<source>
20+
<include>
21+
<directory>../../src</directory>
22+
</include>
23+
</source>
2624
</phpunit>

ci/qa/rector.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Config\RectorConfig;
6+
7+
return RectorConfig::configure()
8+
->withPaths([
9+
__DIR__ . '/../../src',
10+
__DIR__ . '/../../tests',
11+
])
12+
->withAttributesSets(all: true)
13+
->withComposerBased(twig: true, phpunit: true, symfony: true)
14+
->withPHPStanConfigs([__DIR__.'/phpstan.neon'])
15+
->withPreparedSets(deadCode: true)
16+
;

ci/qa/rector.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
3+
# Ensure we run from project root
4+
cd "$(dirname "$0")/../../" || exit 1
5+
./vendor/bin/rector --config=ci/qa/rector.php "$@"

component_info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PHP_VERSION=82
2-
SYMFONY_VERSION=6
2+
SYMFONY_VERSION=7
33
ENCORE=yes
44
ASSETIC=no
55
NODE_VERSION=20

composer.json

Lines changed: 47 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,25 @@
2525
"ext-zlib": "*",
2626
"incenteev/composer-parameter-handler": "^2.1",
2727
"openconext/monitor-bundle": "^4.3",
28-
"surfnet/stepup-bundle": "^6.0",
29-
"surfnet/stepup-gssp-bundle": "^5.0",
30-
"surfnet/stepup-saml-bundle": "^6.0",
31-
"symfony/asset": "^6.4",
32-
"symfony/config": "^6.4",
33-
"symfony/console": "^6.4",
34-
"symfony/dependency-injection": "^6.4",
35-
"symfony/expression-language": "6.4.*",
28+
"surfnet/stepup-bundle": "^7.0.1",
29+
"surfnet/stepup-gssp-bundle": "^6.0",
30+
"surfnet/stepup-saml-bundle": "^7.0",
31+
"symfony/asset": "^7.4",
32+
"symfony/config": "^7.4",
33+
"symfony/console": "^7.4",
34+
"symfony/dependency-injection": "^7.4",
35+
"symfony/expression-language": "7.4.*",
3636
"symfony/flex": "^2.4",
37-
"symfony/form": "^6.4",
38-
"symfony/http-client": "6.4.*",
39-
"symfony/monolog-bundle": "^3.8",
40-
"symfony/runtime": "6.*.*",
41-
"symfony/security-bundle": "^6.4",
42-
"symfony/templating": "^6.4",
43-
"symfony/translation": "^6.4",
44-
"symfony/twig-bundle": "^6.4",
45-
"symfony/validator": "^6.4",
37+
"symfony/form": "^7.4",
38+
"symfony/http-client": "7.4.*",
39+
"symfony/monolog-bundle": "^v4.0.1",
40+
"symfony/runtime": "^7.4",
41+
"symfony/security-bundle": "^7.4",
42+
"symfony/translation": "^7.4",
43+
"symfony/twig-bundle": "^7.4",
44+
"symfony/validator": "^7.4",
4645
"symfony/webpack-encore-bundle": "^2.1",
47-
"symfony/yaml": "^6.4",
46+
"symfony/yaml": "^7.4",
4847
"twig/extra-bundle": "^3.0",
4948
"twig/twig": "^3.0"
5049
},
@@ -57,25 +56,29 @@
5756
"mockery/mockery": "^1.6",
5857
"overtrue/phplint": "*",
5958
"phpmd/phpmd": "^2.14",
60-
"phpstan/phpstan": "^1.10",
61-
"phpstan/phpstan-symfony": "^1.3",
62-
"phpunit/phpunit": "^9.6",
63-
"sebastian/phpcpd": "^6.0",
64-
"slevomat/coding-standard": "^8.13",
59+
"phpstan/phpstan": "^2.1.37",
60+
"phpstan/phpstan-symfony": "^2.0",
61+
"phpunit/phpunit": "^11.5.50",
62+
"rector/rector": "^2.3",
63+
"slevomat/coding-standard": "^8.27",
6564
"soyuka/contexts": "^3.3",
66-
"squizlabs/php_codesniffer": "^3.7",
67-
"symfony/browser-kit": "^6.4",
68-
"symfony/css-selector": "^6.4",
69-
"symfony/phpunit-bridge": "^6.4",
70-
"symfony/stopwatch": "^6.4",
71-
"symfony/web-profiler-bundle": "^6.4"
65+
"squizlabs/php_codesniffer": "^4.0",
66+
"symfony/browser-kit": "^7.4",
67+
"symfony/css-selector": "^7.4",
68+
"symfony/phpunit-bridge": "^7.4",
69+
"symfony/stopwatch": "^7.4",
70+
"symfony/web-profiler-bundle": "^7.4"
7271
},
7372
"scripts": {
7473
"check": [
74+
"@check-ci",
75+
"@rector",
76+
"@web-tests"
77+
],
78+
"check-ci": [
7579
"@composer-validate",
7680
"@docheader",
7781
"@lint",
78-
"@phpcpd",
7982
"@phpcs",
8083
"@phpmd",
8184
"@phpstan",
@@ -84,16 +87,28 @@
8487
"behat": "./ci/qa/behat",
8588
"composer-validate": "./ci/qa/validate",
8689
"docheader": "./ci/qa/docheader",
90+
"rector": "./ci/qa/rector.sh --dry-run",
91+
"rector-fix": "./ci/qa/rector.sh",
8792
"lint": "./ci/qa/lint",
8893
"phpcs": "./ci/qa/phpcs",
89-
"phpcpd": "./ci/qa/phpcpd",
9094
"phpcbf": "./ci/qa/phpcbf",
9195
"phpmd": "./ci/qa/phpmd",
9296
"phpstan": "./ci/qa/phpstan",
9397
"phpstan-baseline": "./ci/qa/phpstan-update-baseline",
9498
"test": "./ci/qa/phpunit",
9599
"unit-tests": "./ci/qa/phpunit --testsuite=UnitTests",
96100
"web-tests": "./ci/qa/phpunit --testsuite=WebTests",
101+
"frontend-install": [
102+
"yarn install --frozen-lockfile",
103+
"yarn encore production",
104+
"./bin/console cache:clear",
105+
"@fix-dev-permissions"
106+
],
107+
"fix-dev-permissions": [
108+
"chown -R www-data:www-data /var/www/html/var/log",
109+
"chown -R www-data:www-data /var/www/html/var/cache",
110+
"chown -R www-data:www-data /var/www/html/federation-metadata"
111+
],
97112
"auto-scripts": {
98113
"cache:clear": "symfony-cmd",
99114
"assets:install %PUBLIC_DIR%": "symfony-cmd"
@@ -161,7 +176,7 @@
161176
},
162177
"symfony": {
163178
"allow-contrib": false,
164-
"require": "6.4.*"
179+
"require": "7.4.*"
165180
},
166181
"incenteev-parameters": [
167182
{

0 commit comments

Comments
 (0)