Skip to content

Commit 93b57a8

Browse files
authored
Merge pull request #557 from OpenConext/feature/updates-nov25
Upgrade to symfony 7.4
2 parents 7c62ee0 + 95fe6a3 commit 93b57a8

338 files changed

Lines changed: 8879 additions & 6795 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ jobs:
2222
run: composer install
2323

2424
- name: Run QA tests
25-
run: composer check
25+
run: composer check-ci
26+
env:
27+
SYMFONY_DEPRECATIONS_HELPER: 999999

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
2+
.github/*.md
23
/web/bundles/
34
/web/app_dev.php
45
/web/app_test.php

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
# 7.0.0 - unreleased
4+
**Notable Changes**
5+
- Upgrade to Symfony 7.4 (from 6.4)
6+
- Upgrade to PHPUnit 10 (from 9.x)
7+
- Upgrade to PHPStan 2.0 (from 1.x)
8+
- Migrate from annotations to attributes (PHP 8 attributes)
9+
10+
**Important for System Administrators**
11+
Ensure the `database_server_version` parameter contains the correct MariaDB version. e.g. `10.6.23-MariaDB`
12+
13+
14+
**Improvements**
15+
- Upgrade all Symfony components to 7.4
16+
- Upgrade Stepup-Bundle to 7.0
17+
- Modernize codebase with PHP 8+ features
18+
- Fix various Symfony and Doctrine deprecations
19+
- Improved code quality with updated tooling
20+
321
# 6.0.2
422
- Repair deprovisioning API calls
523
- Restore deprovisioned user on new login (returing users)

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ This component is part of "Step-up Authentication as-a Service". See [Stepup-Dep
77

88
## Requirements
99

10-
* PHP 5.6+ or PHP7
10+
* PHP 8.2
1111
* [Composer](https://getcomposer.org/)
1212
* A web server (Apache, Nginx)
13-
* MariaDB 10
13+
* MariaDB 10.6
1414
* A working [Gateway](https://github.com/OpenConext/Stepup-Gateway)
1515

1616
## Installation
1717

1818
Clone the repository or download the archive to a directory. Install the dependencies by running `composer install` and fill out the database credentials et cetera.
1919

20-
Make sure to run database migrations using `bin/console middleware:migrations:migrate`.
20+
Make sure to run database migrations using `bin/console doctrine:migrations:migrate`.
2121

22-
When using 'Stepup-Deploy' the 'deploy' entity manager should be used in order to use the correct credentials e.g. `bin/console middleware:migrations:migrate --em=deploy`
22+
When using 'Stepup-Deploy' the 'deploy' entity manager should be used in order to use the correct credentials e.g. `bin/console doctrine:migrations:migrate --em=deploy`
2323

2424
## Management API
2525

@@ -31,6 +31,9 @@ Some of the configuration of the components is static (i.e. stored in parametere
3131

3232
## Development Notes
3333

34+
### Technical debt
35+
* https://github.com/broadway/event-store-dbal blocks upgrade to `doctrine/dbal:^4.0`
36+
3437
### Adding new events
3538

3639
Whenever adding a new event, be sure to update `bin/config/events.yml`.

ci/qa/phpcs.xml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
</description>
77

88
<exclude-pattern>src/*/*Bundle/Resources</exclude-pattern>
9-
<exclude-pattern>src/*/*Bundle/Tests</exclude-pattern>
109
<exclude-pattern>src/*/Bundle/*Bundle/Resources</exclude-pattern>
11-
<exclude-pattern>src/*/Bundle/*Bundle/Tests</exclude-pattern>
12-
<exclude-pattern>*/Tests/*</exclude-pattern>
1310
<exclude-pattern>*/Migrations/*</exclude-pattern>
1411

1512
<!-- This is the rule we inherit from. If you want to exlude some specific rules, see the docs on how to do that -->
@@ -21,5 +18,18 @@
2118
<property name="lineLimit" value="120"/>
2219
<property name="absoluteLineLimit" value="150"/>
2320
</properties>
21+
<exclude-pattern>*/Tests/*</exclude-pattern>
2422
</rule>
23+
24+
<rule ref="PSR1.Methods.CamelCapsMethodName">
25+
<exclude-pattern>*/Tests/*</exclude-pattern>
26+
</rule>
27+
28+
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"/>
29+
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
30+
<properties>
31+
<property name="searchAnnotations" type="bool" value="true"/>
32+
</properties>
33+
</rule>
34+
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
2535
</ruleset>

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/phpla int.cache
44
extensions:
55
- php
66
exclude:

ci/qa/phpstan-baseline.neon

Lines changed: 1576 additions & 1452 deletions
Large diffs are not rendered by default.

ci/qa/phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ includes:
55
- ../../vendor/phpstan/phpstan-symfony/extension.neon
66

77
parameters:
8+
treatPhpDocTypesAsCertain: false
89
level: 9
910
paths:
1011
- ../../src

ci/qa/phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ cd $(dirname $0)/../../
77

88
# PHPUnit Bridge should always be used in Symfony applications. (https://symfony.com/doc/current/components/phpunit_bridge.html)
99
# This will create a phpunit executable in /bin/ instead of /vendor/bin/
10-
./vendor/bin/phpunit --configuration=ci/qa/phpunit.xml --coverage-text --stop-on-error $1
10+
./vendor/bin/phpunit --configuration=ci/qa/phpunit.xml --stop-on-error $@
1111
./vendor/bin/phpunit --configuration=ci/qa/phpunit.xml --testsuite=database

ci/qa/phpunit.xml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- https://phpunit.readthedocs.io/en/latest/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="../../tests/bootstrap.php">
4-
<coverage processUncoveredFiles="true">
5-
<include>
6-
<directory suffix="Test.php">../../src</directory>
7-
</include>
8-
</coverage>
3+
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
6+
backupGlobals="false"
7+
colors="true"
8+
bootstrap="../../tests/bootstrap.php"
9+
cacheDirectory="../../var/qa/phpunit.cache"
10+
>
911
<php>
1012
<ini name="error_reporting" value="-1"/>
1113
<ini name="memory_limit" value="256M"/>
1214
<server name="APP_ENV" value="test" force="true"/>
1315
<server name="SHELL_VERBOSITY" value="-1"/>
1416
<server name="KERNEL_CLASS" value="\Surfnet\StepupMiddleware\Kernel"/>
15-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="999999"/>
1617
<env name="APP_ENV" value="test" force="true"/>
1718
</php>
1819
<testsuites>
@@ -23,8 +24,4 @@
2324
<directory suffix="Test.php">../../tests/database</directory>
2425
</testsuite>
2526
</testsuites>
26-
<listeners>
27-
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
28-
<listener class="\Mockery\Adapter\Phpunit\TestListener"/>
29-
</listeners>
3027
</phpunit>

0 commit comments

Comments
 (0)