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

Do not trigger the PHP header() deprecation for certain headers #7225

Merged
merged 9 commits into from
May 24, 2024

Conversation

fritzmg
Copy link
Contributor

@fritzmg fritzmg commented May 18, 2024

Currently if a session is started when using the NativeSessionStorage (which is the default) or expose_php is not set to Off/0, the following deprecation is always triggered:

Using the PHP header() function to set HTTP headers has been deprecated and will no longer work in Contao 6. Use the response object instead.

There can always be headers that bypass the response object from Symfony. This PR at least ignores the Set-Cookie: PHPSESSID= and X-Powered-By headers.

@fritzmg fritzmg added the bug label May 18, 2024
@fritzmg fritzmg added this to the 5.3 milestone May 18, 2024
@fritzmg fritzmg self-assigned this May 18, 2024
Co-authored-by: Martin Auswöger <martin@auswoeger.com>
@fritzmg fritzmg requested a review from ausi May 24, 2024 10:33
ausi
ausi previously approved these changes May 24, 2024
@leofeyer leofeyer changed the title Do not trigger MergeHttpHeadersListener deprecation for certain headers Do not trigger the PHP header() deprecation for certain headers May 24, 2024
@leofeyer leofeyer changed the title Do not trigger the PHP header() deprecation for certain headers Do not trigger the PHP header() deprecation for certain headers May 24, 2024
@leofeyer leofeyer merged commit 00a9493 into contao:5.3 May 24, 2024
18 checks passed
@leofeyer
Copy link
Member

Thank you @fritzmg.

@fritzmg fritzmg deleted the update-merge-http-headers-deprecation branch May 24, 2024 13:40
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.

None yet

3 participants