Skip to content

feat(form): Add support for PSR-7 file upload to V3 FileVariable and ImageVariable#38

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
feat/psr7-file-upload
May 24, 2026
Merged

feat(form): Add support for PSR-7 file upload to V3 FileVariable and ImageVariable#38
ralflang merged 1 commit into
FRAMEWORK_6_0from
feat/psr7-file-upload

Conversation

@ralflang
Copy link
Copy Markdown
Member

When a ServerRequestInterface is passed to BaseForm and files are uploaded, the uploaded files are
now extracted via ServerRequestInterface::getUploadedFiles() and injected into variables implementing a new FileUploadAware interface. This eliminates the
$_FILES and $GLOBALS['browser'] dependency on the PSR-7 path. These globals however are still supported for legacy fallback. Input via array|Horde_Variables|Variables is unchanged. FormVariables that don't receive an injected UploadedFileInterface continue to read from $_FILES directly. The bridge from lib/ Horde_Form is unaffected since it never calls setUploadedFile().

New: FileUploadAware interface, FileUploadPsr7Test along with 10 tests.
Removed: doc/V3-MIGRATION-GUIDE.md obsoleted by UPGRADING.md.

…ImageVariable

When a ServerRequestInterface is passed to BaseForm and files are uploaded, the uploaded files are
now extracted via ServerRequestInterface::getUploadedFiles() and injected into variables implementing a new FileUploadAware interface. This eliminates the
$_FILES and $GLOBALS['browser'] dependency on the PSR-7 path. These globals however are still supported for legacy fallback. Input via array|Horde_Variables|Variables is unchanged. FormVariables that don't receive an injected UploadedFileInterface continue to read from $_FILES directly. The bridge from lib/ Horde_Form is unaffected since it never calls setUploadedFile().

New: FileUploadAware interface, FileUploadPsr7Test along with 10 tests.
Removed: doc/V3-MIGRATION-GUIDE.md obsoleted by UPGRADING.md.
@ralflang
Copy link
Copy Markdown
Member Author

Contributes to #19

@ralflang ralflang merged commit 98ae7a7 into FRAMEWORK_6_0 May 24, 2026
1 check failed
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.

1 participant