Skip to content

Fix deprecation warning when using symfony/http-foundation:8.1 - #2436

Open
W0rma wants to merge 1 commit into
FriendsOfSymfony:3.xfrom
W0rma:fix-symfony-81-request-deprecation
Open

Fix deprecation warning when using symfony/http-foundation:8.1#2436
W0rma wants to merge 1 commit into
FriendsOfSymfony:3.xfrom
W0rma:fix-symfony-81-request-deprecation

Conversation

@W0rma

@W0rma W0rma commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the following deprecations warnings when using this library with Symfony 8.1:

Since symfony/http-foundation 8.1: Directly setting property "request" of "Symfony\Component\HttpFoundation\Request" is deprecated; pass the POST data as a constructor argument or call "initialize()" instead.
Since symfony/http-foundation 8.1: Directly setting property "files" of "Mock_Request_8e3a88e1" is deprecated; pass files as a constructor argument or call "initialize()" instead.
Since symfony/http-foundation 8.1: Directly setting property "query" of "Mock_Request_8e3a88e1" is deprecated; pass
Since symfony/http-foundation 8.1: Directly setting property "request" of "Mock_Request_8e3a88e1" is deprecated; pass the POST data as a constructor argument or call "initialize()" instead.

From https://github.com/symfony/symfony/blob/8.1/UPGRADE-8.1.md#httpfoundation:

Deprecate setting public properties of Request and Response objects directly; use setters or constructor arguments instead

@W0rma

W0rma commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

The error in https://github.com/FriendsOfSymfony/FOSRestBundle/actions/runs/29490571636/job/87595412270?pr=2436 regarding scrutinizer seems to be unrelated:

--2026-07-16 10:22:48-- https://scrutinizer-ci.com/ocular.phar
Resolving scrutinizer-ci.com (scrutinizer-ci.com)... 104.26.1.85, 172.67.75.7, 104.26.0.85
Connecting to scrutinizer-ci.com (scrutinizer-ci.com)|104.26.1.85|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2026-07-16 10:22:48 ERROR 403: Forbidden.

@W0rma
W0rma marked this pull request as ready for review July 16, 2026 10:25
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.

1 participant