Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Stream Laravel Package

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.

View on GitHub
Deep Wiki
Context7
0.4.2

Added

  • Added the peek() method to look at the next n characters without changing the internal index.
  • Added the 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.
0.4.1

Fixed

  • Fixed #4, where the current() method never returned false when the stream had advanced after the last character or before the first one.
0.4.0

Added

  • Added idempotency to navigation methods. You can call navigation methods like next() or previous() multiple times at the stream's endpoints without updating the internal pointer.

Changed

  • Reordered the methods in the Stream class to be grouped according to usage. Although this mixes private and public methods, it makes it easier to read without jumping around.

Removed

  • Removed the hasCharacters() method. This is not a particularly meaningful method, as it only checks whether or not a current character exists.

Fixed

  • Fixed #2, where attempts to call previous() from the end of the string would return false.
0.3.0

Version 0.3.0 includes a number of breaking changes, intended to make the library easier to use and maintain.

Removed

  • Removed the setCharacters() method. It's better if this low-level implementation detail is not editable.
  • Removed the protected methods hasNextCharacter() and hasPreviousCharacter() since they were not being used.

Changed

  • Updated the library for PHP 7.4+ and PHP 8.
  • Changed Stream to an abstract class with File and Text implementations to make the source more intentional.
  • Changed constructor arguments to accept a string or Chunker instance. This simplifies instantiation, if you accept the chunker's default encoding and chunk size.
  • Modernized the classes with property type hints, argument type hints, return type hints, guard clauses, etc.
  • Changed File tests from using concrete files and folders to using a virtual file system with bovigo/vfsStream.
  • Updated from PHPUnit version 4 to version 9.
  • Updated the README to better explain the problem this library solves.
  • Removed lots and lots of unnecessary comments :).
  • Changed protected methods to private, where possible, and decomposed methods like read() into smaller ones.

Added

  • Added ext-mbstring requirement to composer.json.
  • Added CHANGELOG to keep track of changes.
  • Added slevomat/coding-standard to enforce coding standards.
  • Added roave/security-advisories to exclude dependencies with known vulnerabilities.
  • Added continuous integration with CircleCI.
  • Added code coverage analysis with CodeCov.
0.2.1

Fixed

  • Duh. I forgot to include the changes to composer.json.
0.2.0

Changed

  • Update to requiring a 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.
0.1.0

Initial release

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor