Writing to a proprety that hasn't been declared is deprecated, unless the class uses the #[AllowDynamicProperties] attribute or defines __get()/__set(). RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
Even if we know the file size, we still need to read in a loop in case the read call returns an incomplete result. This was less of an issue previously because we did not use the "one large read" approach for non-plain stream wrappers.