generated from yii2-extensions/template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Description
The current implementation of the createUploadedFile method in src/http/Request.php uses null coalescing operators to handle potential null values from PSR-7 UploadedFileInterface methods, but may not handle all edge cases robustly.
Current Implementation
The method currently handles null values with simple defaults:
'tempName' => $psrFile->getStream()->getMetadata('uri') ?? '',Proposed Enhancement
Implement more robust error handling for missing metadata, particularly when the PSR-7 stream doesn't have a file URI. This should include:
- Explicit null checking for stream metadata
- Fallback logic to create temporary files when URI metadata is missing
- Proper error handling for temporary file creation failures
References
- Original discussion: Introduce
Requestbridge implementation with tests. #6 (comment) - Related PR: Introduce
Requestbridge implementation with tests. #6
Priority
This is an enhancement that was deferred from the main Request bridge implementation PR to keep it focused.
Metadata
Metadata
Assignees
Labels
No labels