-
Notifications
You must be signed in to change notification settings - Fork 518
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
publicUrl method check looks for wrong exception. #1445
Labels
Comments
wizhippo
added a commit
to wizhippo/VichUploaderBundle
that referenced
this issue
Apr 22, 2024
🚀 Bounty Alert!💰 A bounty of $10.00 has been created by makraz on BountyHub. 🔗 Claim this bounty by submitting a pull request that solves the issue! Good luck, and happy coding! 💻 |
regis-martini
added a commit
to regis-martini/VichUploaderBundle
that referenced
this issue
Oct 30, 2024
Related to dustin10#1445 Add handling for UndefinedMethodError exception in FlysystemStorage. * Catch both `FilesystemException` and `UndefinedMethodError` exceptions in the `publicUrl` method of `src/Storage/FlysystemStorage.php`. * Add a test case in `tests/Storage/Flysystem/AbstractFlysystemStorageTestCase.php` to check for `UndefinedMethodError` exception handling in the `resolveUri` method. * Ensure the test case covers both exceptions to maintain compatibility with different Flysystem versions. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/dustin10/VichUploaderBundle/issues/1445?shareId=XXXX-XXXX-XXXX-XXXX).
garak
pushed a commit
that referenced
this issue
Oct 31, 2024
* Fix exception handling in FlysystemStorage Related to #1445 Add handling for UndefinedMethodError exception in FlysystemStorage. * Catch both `FilesystemException` and `UndefinedMethodError` exceptions in the `publicUrl` method of `src/Storage/FlysystemStorage.php`. * Add a test case in `tests/Storage/Flysystem/AbstractFlysystemStorageTestCase.php` to check for `UndefinedMethodError` exception handling in the `resolveUri` method. * Ensure the test case covers both exceptions to maintain compatibility with different Flysystem versions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/dustin10/VichUploaderBundle/blame/ec9ad4b732c0d9063e6bf0221bb758ac405d64a2/src/Storage/FlysystemStorage.php#L123
This is catching the wrong exception.
It is throwing Symfony\Component\ErrorHandler\Error\UndefinedMethodError not FilesystemException
Seems this method is on Flysystem 3.6 onward.
My deps currently use 2.x
To support 2.x should allow either exception?
Related to but not the same isuse: #1444
The text was updated successfully, but these errors were encountered: