jstewmc/stream
jstewmc/stream is a small PHP library that provides a simple Stream abstraction for working with PHP stream resources. It helps with reading/writing, buffering, and common stream operations behind a cleaner, object-oriented API.
peek() method to look at the next n characters without changing the internal index.isOn() and isOnRegex() methods to test whether or not the current character (and, potentially, next characters) match a given string or an array of strings.current() method never returned false when the stream had advanced after the last character or before the first one.next() or previous() multiple times at the stream's endpoints without updating the internal pointer.Stream class to be grouped according to usage. Although this mixes private and public methods, it makes it easier to read without jumping around.hasCharacters() method. This is not a particularly meaningful method, as it only checks whether or not a current character exists.previous() from the end of the string would return false.Version 0.3.0 includes a number of breaking changes, intended to make the library easier to use and maintain.
setCharacters() method. It's better if this low-level implementation detail is not editable.protected methods hasNextCharacter() and hasPreviousCharacter() since they were not being used.Stream to an abstract class with File and Text implementations to make the source more intentional.string or Chunker instance. This simplifies instantiation, if you accept the chunker's default encoding and chunk size.File tests from using concrete files and folders to using a virtual file system with bovigo/vfsStream.protected methods to private, where possible, and decomposed methods like read() into smaller ones.ext-mbstring requirement to composer.json.CHANGELOG to keep track of changes.composer.json.Jstewmc\Chunker instance. Before, both the chunking and the splitting were handled in this class. However, it was becoming a headache. So, I moved the chunking to jstewmc\chunker, and the Chunker is now a required constructor argument.Initial release
How can I help you explore Laravel packages today?