m2mtech/flysystem-stream-wrapper
Adds a PHP stream wrapper for Flysystem v2/v3 so you can use fly:// paths with native file functions (file_put_contents, mkdir, etc.). Includes Symfony Lock-based locking plus options to ignore visibility errors and emulate dir metadata.
flysystem:// URLs. Ideal for media handling, legacy system migration, and hybrid workflows.Storage facade.stat() calls, seek operations).php deprecation fix in v1.4.1, ensuring compatibility with modern PHP.| Risk Area | Severity | Mitigation Strategy | Updated Notes |
|---|---|---|---|
| Stream Wrapper Limits | High | Test edge cases: partial reads, seeks, locks. | No change. |
| Flysystem v2 Migration | Medium | Use Laravel’s flysystem package. |
No change. |
| Laravel Caching Bypass | Medium | Implement custom filesystem events. | No change. |
| PHP Deprecation Warnings | Low | Resolved by PR #24. | Fix ensures compatibility with PHP 8.1+ and avoids deprecation warnings. |
| Stream Wrapper Errors | Low | Improved by PR #23 (collectErrorMessage). |
Better error handling for stream wrapper warnings (e.g., invalid URLs). |
collectErrorMessage fix improves debugging for stream wrapper warnings. Consider logging these for observability.(Unchanged)
collectErrorMessage to log stream wrapper warnings (e.g., invalid flysystem:// URLs) for proactive issue detection.(Unchanged)
| Failure Scenario | Impact | Mitigation | Updated Notes |
|---|---|---|---|
| Cloud Provider Outage | Unavailable files | Fallback to local cache. | No change. |
| Stream Wrapper Misconfiguration | Silent failures | Validate wrapper registration. | Improved – Better error messages from PR #23 will surface misconfigurations. |
| PHP Stream Wrapper Limits | Seek/lock operations fail | Avoid random access. | No change. |
| Permission Errors | Broken workflows | Implement circuit breakers. | No change. |
collectErrorMessage logs).collectErrorMessage fix in the README.md or internal wiki.## Debugging Tips
Stream wrapper warnings (e.g., invalid URLs) are now collected and can be logged for debugging:
```php
Storage::log(function () {
file_exists('flysystem://invalid/url'); // Warning will be captured.
});
NO_UPDATE_NEEDED would not apply here due to the material improvements in error handling and PHP compatibility. The assessment has been updated to reflect these changes.
How can I help you explore Laravel packages today?