Skip to content

Upgrade Symfony 6.4 > 7.4#220

Open
johanib wants to merge 11 commits intomainfrom
feature/updates_jan_26
Open

Upgrade Symfony 6.4 > 7.4#220
johanib wants to merge 11 commits intomainfrom
feature/updates_jan_26

Conversation

@johanib
Copy link
Contributor

@johanib johanib commented Jan 27, 2026

No description provided.

- `composer update -W`
- Update phpstan, add rector
- fix phplint cache dir
- add correct phpunit cache dir
- make test-integration.yml conform other projects
@johanib johanib marked this pull request as ready for review January 28, 2026 08:46
@johanib johanib changed the title Feature/updates jan 26 Upgrade Symfony 6.4 > 7.4 Jan 28, 2026
@johanib johanib requested a review from MKodde January 29, 2026 09:37
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.

Good job!

Code wise this looks good, see some questions/remarks below.
Functionally, I could not get a functioning version of the app.

  1. The federation_metadata_cache_location parameter default value is not pointing to a sensible directory. Maybe fix that?
  2. The registration route fails with a 500 error on my dev setup. Yielding this exception message (also cache related it seems)
The controller for URI "/registration" is not callable: The cache directory "" does not exist or is not a directory.

EDIT Feb 3 1207
Turns out I misconfigured the cache directory while re-setting it from the faulty default. So in the end I used this one: federation_metadata_cache_location: /var/www/html/var/cache/federation-metadata And that works as intended.

Maybe configure that path in the parameters.yaml.dist file? And add a .gitkeep to the var/cache/federation-metadata folder?

EDIT Feb 5 1151
You are right! I completely overlooked that already existing folder. See a possible fix in my code review comment below

throw new RuntimeException("invalid idp cache data encountered");
}

if (!is_string($object['updated'])) {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this is the exact same behavior as we used to have. The default to an empty string seems to be replaced by an exception? Maybe my PHP-FU is not as strong anymore, but I think this is a change in behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right! I this was triggered by a 'mixed' type error. But I did not take into account the null case. Fixed.

@johanib
Copy link
Contributor Author

johanib commented Feb 4, 2026

  1. federation_metadata_cache_location
  1. The federation_metadata_cache_location parameter default value is not pointing to a sensible directory. Maybe fix that?

EDIT Feb 3 1207 Turns out I misconfigured the cache directory while re-setting it from the faulty default. So in the end I used this one: federation_metadata_cache_location: /var/www/html/var/cache/federation-metadata And that works as intended.

Maybe configure that path in the parameters.yaml.dist file? And add a .gitkeep to the var/cache/federation-metadata folder?

I'm confused. The default points to /var/www/html/federation-metadata, which exists in the repo, and has a .gitignore. So it seems sensible to me. I'm not sure if we can just move the cache dir.

I notice it's not in the parameters.yaml.test.dist, so I added it there as well.

@johanib
Copy link
Contributor Author

johanib commented Feb 4, 2026

The registration route fails with a 500 error on my dev setup. Yielding this exception message (also cache related it seems)
The controller for URI "/registration" is not callable: The cache directory "" does not exist or is not a directory.

This seems to be stemming from federation_metadata_cache_location not being set. Hopefully fixed by adding the parameter to parameters.yaml.test.dist

@johanib johanib requested a review from MKodde February 4, 2026 14:46
composer.json Outdated
],
"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"
Copy link
Member

Choose a reason for hiding this comment

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

In response to your confusion post:

I'm confused. The default points to /var/www/html/federation-metadata, which exists in the repo, and has a .gitignore. So it seems sensible to me. I'm not sure if we can just move the cache dir.

I notice it's not in the parameters.yaml.test.dist, so I added it there as well.

I think the fix would be to add a line to the fix-dev-permissions, including the federation-metadata in the fix permissions run

    "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"
    ]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated fix-dev-permissions

- AddReturnTypeDeclarationRector
- RenameAttributeRector
- SimplifyFormRenderingRector
…ripts to build frontend with correct permissions of var dir.
And apply the relevant rectors automatically
Fix ->get deprecations
Add missing `federation_metadata_cache_location` to test params.
Include correct package versions
@johanib johanib requested a review from MKodde February 5, 2026 13:04
@johanib johanib force-pushed the feature/updates_jan_26 branch from 9c6d36f to 8e888c2 Compare February 5, 2026 13:05
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.

2 participants