Skip to content

Resolved creation of dynamic property Gaufrette\StreamWrapper:: is de…#702

Open
adagber wants to merge 1 commit into
KnpLabs:masterfrom
adagber:master
Open

Resolved creation of dynamic property Gaufrette\StreamWrapper:: is de…#702
adagber wants to merge 1 commit into
KnpLabs:masterfrom
adagber:master

Conversation

@adagber

@adagber adagber commented May 17, 2023

Copy link
Copy Markdown

I'm using the knplabs/knp-gaufrette-bundle:v0.8.0 library

Since I have upgraded php version from 8.1 to 8.2 I am getting a deprecated warning "Deprecated: Creation of dynamic property Gaufrette\StreamWrapper::$context is deprecated in .../vendor/symfony/http-foundation/BinaryFileResponse.php on line 199" when returning the file in a controller:

return new BinaryFileResponse('gaufrette://foo/hello.txt');

I've added the public context property to the GaufretteStreamWrapper object as per the native class specification in php:

https://www.php.net/streamwrapper

With this change the code works perfectly, as it does not access the $context property dynamically.

If you think it is convenient I would like to add this change to the library.

Thanks

@KevinArtus

Copy link
Copy Markdown
Contributor

Thx for your PR.
We're working on it to support php 8 and deprecated php 7.
We already fix this problem on this PR.

#692

@nocive

nocive commented Oct 24, 2023

Copy link
Copy Markdown

bump

@grempa

grempa commented Mar 21, 2024

Copy link
Copy Markdown

bump

@ihortymoshenko

Copy link
Copy Markdown

Any updates?

@cameronmurphy

Copy link
Copy Markdown

bump

edhgoose pushed a commit to edhgoose/Gaufrette that referenced this pull request Jul 17, 2024

@cedricvazille cedricvazille left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This change solve the problem on my project, so I think this line is necessary.

@dany-loveevents dany-loveevents left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This change solve the problem on my project

@PedroTroller PedroTroller self-assigned this Oct 18, 2024
@deguif

deguif commented Jan 28, 2025

Copy link
Copy Markdown
Contributor

Any news on a possible merge?

@FlorianQgb FlorianQgb removed their assignment Mar 31, 2025
@deguif

deguif commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

Any news again?

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.