On this page
ServerRequestFactory continues to define the static method
fromGlobals(), but also serves as a PSR-17 implementation.
These classes may be used as described in the specification document for the purpose of creating Diactoros instances that fulfill PSR-7 typehints.
Autoregistration of factories
- Since 2.3.0
When installing Diactoros in a Laminas or Mezzio application, or any application
using the laminas-component-installer plugin,
you will now be prompted to install its
you do, it registers the Diactoros factory implementations under the PSR-17
interface names, allowing you to compose instances of the interface in your
Found a mistake or want to contribute to the documentation? Edit this page on GitHub!