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

Psr7 Laravel Package

nyholm/psr7

Nyholm PSR-7 is a super lightweight, strict, and fast implementation of PSR-7 with full PSR-17 factories and HTTPlug/PSR-18 compatibility. Create requests, streams, URIs, and server requests with minimal overhead.

View on GitHub
Deep Wiki
Context7

Final classes

The final keyword was removed in version 1.4.0. It was replaced by [@final](https://github.com/final) annotation. This was done due popular demand, not because it is a good technical reason to extend the classes.

This document will show the correct way to work with PSR-7 classes. The "correct way" refers to best practices and good software design. I strongly believe that one should be aware of how a problem should be solved, however, it is not needed to always implement that solution.

Extending classes

You should never extend the classes, you should rather use composition or implement the interface yourself. Please refer to the decorator pattern.

Mocking classes

The PSR-7 classes are all value objects and they can be used without mocking. If one really needs to create a special scenario, one can mock the interface instead.

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport