nimbly/capsule
Capsule is a simple PSR-7 HTTP message and PSR-17 HTTP factory implementation.
3.0.1
4.4M downloads/mo
#2733 most downloaded on Packagist
nimbly/Capsule
What this package is like to depend on
Last release 1 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.3 years
Some releases are documented
notes for 10 of 23 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
23 releases · first in 2019
0 releases in the last 12 months
see the full history below
Release timeline
23 releases · Apr 2019 to Feb 2025Releases
latest 23-
3.0.127 Feb 2025Release notes
Open source →Updates
- Adding HttpMethod string backed enum for HTTP methods. by @brentscheffler in #6
- Fix PHP 8.4 deprecation implicit nullable argument by @8ctopus in #7
- Adding test coverage for PHP 8.4.
- Bumping dev dependencies.
Full Changelog: 3.0...3.0.1
-
2.0.226 May 2024Release notes
Open source →Note
This will be the last 2.x release of Capsule (barring security or bug fixes). Active feature development will be moved to the 3.x release.
Fixes
- Fixed uploaded file moving test for Windows
Updates
- Adding support for
psr/http-message2.0
-
2.0.129 May 2023Release notes
Open source →Fixes
- Port number was always being returned in authority if a port number was supplied. This was breaking convention in only using port number if the port is non-standard for the given scheme (http vs https.)
- Fixing formatting issues in code.
-
1.1.217 Jun 2021Release notes
Open source →Fixes
- In accordance with PSR,
__toString()andgetContents()methods on theResourceStreamwill attempt to safelyrewindthe underlying stream.
- In accordance with PSR,
-
1.1.122 Feb 2021Release notes
Open source →Fixes
- MessageAbstract::withHeader() now treats header names as case insensitive and will correctly overwrite the header.
-
0.8.107 Oct 2019Nothing published for this version
-
0.6.203 Sep 2019Nothing published for this version
-
0.6.127 Aug 2019Nothing published for this version
-
0.4.125 May 2019Nothing published for this version
-
3.021 Sep 2024Release notes
Open source →Updates
- Migrating
ResponseStatusclass and constants to an Enum type. - Creating an
HttpMethodEnum - Adding class and constructor comments.
- Revamping file upload code - specifically on parsing the $_FILES superglobal.
- Supporting nested file uploads
- Expanded unit tests and coverage
Breaking Changes
ResponseStatus::getPhrase()is now an instance method (it is no longer static.) With an instance ofResponseStatusyou can call thegetPhrase()method. Example:
$status = ResponseStatus::NOT_FOUND; $status->getPhrase();
- Migrating
-
2.018 Oct 2022Release notes
Open source →Features
- Support for PHP 8.x, leveraging features from 8.0
- Adding
createFromStringmethod inStreamFactory - Adding
provideproperty in composer file forpsr/http-message-implementationandpsr/http-factory-implementation - A lot of code and comment cleanup, standardizing formatting
- Stricter type hinting in constructors and methods where possible (using union type)
- Tightening up
Uri::__toString()andUri::getAuthority()methods, fixing long standing bugs
Breaking changes
- Removing support for PHP 7.x
- Moving namespace to
Nimbly\Capsule - Removing warning suppression (
@) when making calls tofopen
-
1.103 Jan 2021Release notes
Open source →Features
- Adding PHP 8.0 support.
Breaking changes
- Dropping PHP 7.2 support.
ServerRequestFactory::createServerRequestFromPsr7()is now a public static method.
-
1.010 Mar 2020Release notes
Open source →Updates
- Helper methods on
ServerRequestto access parsed body, query, and uploaded file parameters. See README for more information. - Full PSR-17 Factory support.
- Query params automatically merged into ServerRequest from URI instance.
ext-jsonno longer required.- Additional test coverage across entire package.
Fixes
ResourceStreamproperly detaches as well as properly throwingRuntimeExceptionon certain methods as described in interface.
Breaking changes
- Response constructor signature change.
- ServerRequest::createFromGlobals() moved to ServerRequestFactory::createFromGlobals().
- FileStream class renamed to ResourceStream.
- ServerRequest will no longer attempt to automatically parse the request body. Best practice is to create a Middleware layer to handle request body parsing and assigning to Request instance via
$request->withParsedBody($parsedBody);
- Helper methods on
-
0.909 Oct 2019Nothing published for this version
-
0.717 Sep 2019Nothing published for this version
-
0.622 Aug 2019Nothing published for this version
-
0.507 Aug 2019Nothing published for this version
-
0.425 May 2019Nothing published for this version
-
0.310 Apr 2019Nothing published for this version
-
0.205 Apr 2019Nothing published for this version
-
0.1105 Nov 2019Release notes
Open source →Fixes
- Custom Response reason phrases are now respected
- Better support for static analyzers methods that return new instance of self
-
0.1019 Oct 2019Nothing published for this version
-
0.105 Apr 2019Nothing published for this version