pushinbr / pam-psr
PSR-7, PSR-15 and PSR-17 implementations for Pam.
Package info
pkg:composer/pushinbr/pam-psr
Requires
- php: ^8.4
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
This package is auto-updated.
Last update: 2026-08-22 01:32:04 UTC
README
PSR-7, PSR-15 and PSR-17 interoperability for Pam using the official PHP-FIG interfaces.
Start here
PAM PSR is a Composer package for the PAM Runtime; it is not a standalone runtime. Install PAM first, open your application directory, and add the package through PAM's Composer toolchain:
curl --proto '=https' --proto-redir '=https' --tlsv1.2 \ --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSL \ https://github.com/push-in/pam/releases/latest/download/install.sh | sh pam doctor cd my-app pam composer require pushinbr/pam-psr
Pass a PSR-15 handler and middleware to Pam\App::handler() and
Pam\App::middleware(); Pam converts native requests and responses at the runtime
boundary.
License
Free and open-source under the Apache License 2.0. You may use, modify, and distribute this package for any purpose, including commercially.
Recommended PAM workflow
Install inside an existing PAM project with pam composer require pushinbr/pam-psr. PAM performs the package operation through its private PHP runtime; a global PHP or Composer installation is not required.
Run pam doctor after dependency changes and before creating a release. The project remains a normal Composer project with a standard manifest, lockfile, PSR-4 autoloading, and vendor/autoload.php.
API guide
| Surface | Use it for |
|---|---|
| PSR-7 | Convert PAM native requests and responses to the official HTTP message interfaces. |
| PSR-15 | Run middleware and request handlers through App::middleware() and App::handler(). |
| PSR-17 | Use installed HTTP factories where a package requires standard message construction. |
| Runtime boundary | Convert once at the edge while PAM retains native transport ownership. |
Pass a PSR-15 handler to Pam\App::handler() and PSR-15 middleware to Pam\App::middleware(). Keep blocking-library behavior in mind: standards compatibility does not make synchronous package I/O asynchronous.
Production checklist
- Keep request data and mutable state scoped to the current request.
- Test success, validation failure, exception, cancellation, and timeout paths.
- Configure explicit limits and avoid unbounded payloads, queues, or retained collections.
- Run
pam doctor,pam test, and the relevant integration suite before release. - Validate real dependencies and workload behavior; compatibility is not inferred from package installation alone.
Troubleshooting
- Class not found: run
pam composer install, verify PSR-4 configuration, and rerunpam doctor. - Behavior differs over the network: reproduce with PAM's transport integration tests; in-memory execution does not model the socket boundary.
- A dependency blocks a worker: use PAM-native I/O, a compatible event loop, a process pool, or additional isolated workers.
Documentation and support
Report security vulnerabilities through GitHub private vulnerability reporting or the PAM security policy, not a public issue.