SplitFile::__construct() 将输入类型转换为自己的构造函数方法
作者: olivervogel创建于 2026年5月31日更新于 2026年8月26日
标签major-release
`File::class` 的构造函数接受一个 `mixed` 参数, 可以是 `string`, `resource` 或 `null`。 为了提高组织性, `__construct()` 应仅接受类型为 `string` 和 `Stringable` 的原始数据。 新的静态构造函数方法 `fromStream()` 将处理从流资源中实例化。 这也影响 `EncodedImage::class` 和 `Profile::class`。
内容来源: Intervention/image