Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Stepup-RA to run on Symfony 6.4 and PHP 8.2 #313

Merged
merged 204 commits into from
May 15, 2024

Conversation

parijke
Copy link
Contributor

@parijke parijke commented Mar 13, 2024

Upgrade the RA application to support Symfony 6.4 and PHP 8.2

Many structural changes have been made. For details, have a look at the commit history of this PR. Some highlights include:

  • Introduction of PHPStan
  • All composer dependencies have been upgraded
  • Reorganisation of the package configuration
  • Other QA Tooling was updated

quartje and others added 18 commits June 19, 2023 15:42
This will let the logs go to stdout when running as a container, which
is the Docker way to send logs
Bumps [symfony/twig-bridge](https://github.com/symfony/twig-bridge) from 4.4.49 to 4.4.51.
- [Release notes](https://github.com/symfony/twig-bridge/releases)
- [Changelog](https://github.com/symfony/twig-bridge/blob/6.3/CHANGELOG.md)
- [Commits](symfony/twig-bridge@v4.4.49...v4.4.51)

---
updated-dependencies:
- dependency-name: symfony/twig-bridge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Tests started failing since yesterday:

```
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning @symfony/webpack-encore > webpack-dev-server > webpack-dev-middleware > [email protected]: this will be v4
[2/4] Fetching packages...
error @symfony/[email protected]: The engine "node" is incompatible with this module. Expected version ">=16.0.0". Got "14.21.2"
```

I was able to trace to issue back to a new release of webpack-encore:
https://github.com/symfony/webpack-encore/releases/tag/v4.5.0
Bumps [phpseclib/phpseclib](https://github.com/phpseclib/phpseclib) from 3.0.19 to 3.0.34.
- [Release notes](https://github.com/phpseclib/phpseclib/releases)
- [Changelog](https://github.com/phpseclib/phpseclib/blob/master/CHANGELOG.md)
- [Commits](phpseclib/phpseclib@3.0.19...3.0.34)

---
updated-dependencies:
- dependency-name: phpseclib/phpseclib
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [phpseclib/phpseclib](https://github.com/phpseclib/phpseclib) from 3.0.34 to 3.0.37.
- [Release notes](https://github.com/phpseclib/phpseclib/releases)
- [Changelog](https://github.com/phpseclib/phpseclib/blob/master/CHANGELOG.md)
- [Commits](phpseclib/phpseclib@3.0.34...3.0.37)

---
updated-dependencies:
- dependency-name: phpseclib/phpseclib
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
…/phpseclib-3.0.37

Bump phpseclib/phpseclib from 3.0.34 to 3.0.37
@parijke parijke requested a review from MKodde March 13, 2024 14:54
Copy link
Member

@MKodde MKodde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Paul, I absolutely love the work you put in here. Don't be discouraged by my numerous feedback points, they are mostly on the verge of nitpicking.

Non-code review points
Please also review these non-code review points;

  1. You created this PR from master, Not a bad idea at all. We however have some new code on develop. I'd say, try to rebase on develop to get those changes. Or cherry pick those changes after merging this to master. But I much prefer a rebase onto develop.
  2. After merging, we need a new release/6.0 branch based on the develop branch with your changes
  3. Next, we need to merge the release/6.0 branch to master
  4. Finally develop can be removed. Master can be renamed to main, main can be the default branch from that point on.
  5. A lot of PHPStan warnings ended up in the baseline. I trust you did a best effort attemt to fix the issues when possible.
  6. The config/packages/[dev|prod|smoketest|test] folders should be removed from the project after migrating all env specific config. I see that the web_profiler settings are not yet moved to the framework.yaml
  7. I see quite some unused imports in the project. PHPStorm can super easily remove them for you. In the project pane, right click on the src folder: Click Optimize imports. Bob's your uncle.
  8. Please move the src/**/Resources/* to the /config folder. That way we can finally part with that SF 3 convention.
  9. The app folder can be removed now? If you are not certain please run this past @pmeulen or @phavekes.

Next action
My next action is to use the application in the browser. I'm going to check if I can find some regressions there.

.github/workflows/build-push-docker-image.yml Outdated Show resolved Hide resolved
.github/workflows/test-integration.yml Show resolved Hide resolved
.scrutinizer.yml Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
assets/images/header-logo.png Outdated Show resolved Hide resolved
config/routes/dev/jms_translation.yaml Show resolved Hide resolved
@parijke parijke requested a review from MKodde March 22, 2024 10:16
Copy link
Contributor Author

@parijke parijke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some topics need to be discussed

@parijke
Copy link
Contributor Author

parijke commented Mar 22, 2024

5. A lot of PHPStan warnings ended up in the baseline. I trust you did a best effort attemt to fix the issues when possible.

@MKodde No I did not... I was in the assumption that a baseline is set to avoid overwhelming changes on an existing code base. Maybe we can do a better job, but the question is: how far....?

@MKodde MKodde changed the title Feature/symfony6 upgrade Upgrade Stepup-RA to run on Symfony 6.4 and PHP 8.2 Mar 27, 2024
@quartje quartje force-pushed the feature/symfony6-upgrade branch 2 times, most recently from 3c3d076 to ecb5c8d Compare March 28, 2024 14:00
- rector
- sf/flex 2+
LevelSetList::UP_TO_PHP_82,
ClassPropertyAssignToConstructorPromotionRector::class,
SymfonySetList::SYMFONY_44,
Moved them from the bundle to the globa assets folder
Updated the references to these files in the webpack config
This fixed the not present vetting type input fields. Which are added
based on the programmed locales.
It can be autoconfigured without any issues
That is more in line with the other QA config
The code style sniffer reported some faulty formatting
Some no longer relevant entries were cleaned up
And a couple new ones are added. There is insuficiant time to address
them now
Security issues are monitored using dependabot on our VCS. And in
addition we scan all projects on a daily scedule with our
daily-security-check.yml github action
From `src` to `Surfnet\StepupRa` this sticks to the naming convention we
stick to in the other stepup projects
- Remove the repository version of the saml bundle. We can rely on the
  latest actual release now
- Upgrade the monitor bundle
- Upgrade any other bundle within the set constraints
Pin them to the 6.4 version we built this app on
saml_remote_idp_sso_url: https://gateway.dev.openconext.local/authentication/single-sign-on
saml_remote_idp_certificate: 'MIIDwTCCAqmgAwIBAgIUYuSUugwc4J4NyW9WGqYJ/liwM4owDQYJKoZIhvcNAQELBQAwcDELMAkGA1UEBhMCTkwxEDAOBgNVBAgMB1V0cmVjaHQxEDAOBgNVBAcMB1V0cmVjaHQxJzAlBgNVBAoMHkRldmVsb3BtZW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Hg5Xulaok8oCqmzEiSroEg='
loa_required_for_login: 'http://dev.openconext.local/assurance/loa3'
authentication_context_class_ref: '%loa_required_for_login%'
Copy link
Member

@phavekes phavekes Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

authentication_context_class_ref seems to be a new config parameter, and probably does the same as loa_required_for_login. Please use the old parameter and drop this, or explain the purpose of this new parameter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. Merged them. And kept `authentication_context_class_ref

The locales and hints were not set correctly set when no hints were
found for the chosen institution
The saml bundle now listens for the authentication_context_class_ref
param. Our config chekcs if it is set by verifying the required_loa
config option.

Having parameters for both options makes no sense. So I merged them
@MKodde MKodde requested a review from phavekes April 17, 2024 09:59
thijskh and others added 2 commits April 17, 2024 14:44
Remove deprecated set-output commands
Phase out ancient (4 years!) create release action
@MKodde MKodde merged commit 32749c6 into master May 15, 2024
5 checks passed
@MKodde MKodde deleted the feature/symfony6-upgrade branch May 15, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants