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

Fix exception handling in FlysystemStorage #1473

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

regis-martini
Copy link
Contributor

@regis-martini regis-martini commented Oct 30, 2024

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.

For more details, open the Copilot Workspace session.

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).
@regis-martini regis-martini marked this pull request as ready for review October 30, 2024 20:46
Copy link
Collaborator

@garak garak left a comment

Choose a reason for hiding this comment

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

It's good for me, as long as you fix the phpstan check

@regis-martini regis-martini requested a review from garak October 30, 2024 22:04
@garak garak merged commit 8e34781 into dustin10:master Oct 31, 2024
11 checks passed
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.

2 participants