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

Deprecate CSRF Token loading over render_esi as ESI not longer works to start a Session since Symfony 5.4, this was case in Varnish always #401

Merged
merged 10 commits into from
Jan 27, 2025

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Jan 27, 2025

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #issuenum
Related issues/PRs #issuenum
License MIT

What's in this PR?

Deprecate CSRF Token loading over render_esi

Why?

As ESI not longer works to start a Session since Symfony 5.4, this was case in Varnish always.

Example Usage

See https://github.com/sulu/SuluFormBundle/blob/2.5.5/Resources/doc/csrf.md

…o start a Session since Symfony 5.4, this was case in Varnish always
@alexander-schranz
Copy link
Member Author

alexander-schranz commented Jan 27, 2025

Kind of a strange error happening:

In MappingException.php line 76:
                                                                               
  No mapping file found named 'TrashItem.orm.xml' for class 'Sulu\Bundle\TrashBundle\Domain\Model\TrashItem'.    

@martinlagler didn't you stumble also over this one?

Update: Sounds like an issue with symfony/doctrine-bridge 6.3.12. Tested 6.4@dev which seems to work so this error should go away as soon as Symfony 6.4.18 / 7.2.3 is released.

@@ -32,10 +32,10 @@
"symfony/validator": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/security-csrf": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/translation": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"twig/twig": "^1.41 || ^2.0 || ^3.0"
"twig/twig": "^1.41 || ^2.6 || ^3.0"
Copy link
Member Author

Choose a reason for hiding this comment

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

for deprecated twig tag

@alexander-schranz
Copy link
Member Author

The CI error is unrelated and will be fixed as soon as Symfony tags 6.4.18 / 7.2.3: Test against @dev: https://github.com/sulu/SuluFormBundle/actions/runs/12988997175/job/36221133273?pr=401

@martinlagler
Copy link
Contributor

@alexander-schranz alexander-schranz merged commit 89ff00d into sulu:2.5 Jan 27, 2025
7 of 8 checks passed
@alexander-schranz alexander-schranz deleted the bugfix/csrf-docs branch January 27, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants