#1494·image

Split File::__construct() input types into own constructor methods

Author: olivervogelCreated May 31, 2026Updated Aug 26, 2026
Labelsmajor-release

The constructor of File::class takes a mixed argument which can be string, resource or null.

To improve organization __construct() should only take the raw data of type string and Stringable. A new static constructor method fromStream() will handle the instantiaton from stream resources.

Affects also EncodedImage::class and Profile::class