Skip to content

1.6.0: Read and readAll take a Path - #12

Merged
MarcelloDuarte merged 1 commit into
mainfrom
developing-1.6.0
Oct 15, 2026
Merged

MarcelloDuarte merged 1 commit into
mainfrom
developing-1.6.0

Conversation

@MarcelloDuarte

Copy link
Copy Markdown
Contributor

Read::__construct, Read::readAll and Functions\file\readAll take a Path, like exists, readFileContents, writeFile and the rest of the file functions; Stream::fromResource passes its Path through instead of its string. The function form already documented Path and threw a TypeError when given one.

Breaking: new Read('file') and Read::readAll('file', $bytes) no longer accept a string; wrap it in new Path('file'). Stream(new Path($file), $bytes) is unchanged.

Specs: ReadAllSpec covers the function form and Read with a Path; ChunkSizeSpec moved to Path.

@MarcelloDuarte
MarcelloDuarte merged commit 3cdd30a into main Oct 15, 2026
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