asgrim/side-effect
Side Effect Framework
Maintainers
1.0.x-dev
2022-08-05 07:13 UTC
Requires
- php: 8.1.*
- ext-pdo: *
- doctrine/coding-standard: ^9.0
- psr/http-message: ^1.0
Requires (Dev)
- guzzlehttp/psr7: ^2.4
- vimeo/psalm: ^4.26
Suggests
None
Provides
None
Conflicts
Replaces
None
MIT c5a4bae3b2c43bfa18e17df34fc2a7ee9df13673
- James Titcumb <james.woop@asgrim.com>
This package is auto-updated.
Last update: 2026-06-17 18:45:34 UTC
README
This is what stringly-typed programming is (h/t @nilsluxton)
Side effect is a middleware-ish framework that does NOT support PSR-15.
Everything is marshalling a string, basically. So, everything is __toString().
Features ✨
- 💻 Dispatch controllers (extend
\Asgrim\SideEffect\Features\AbstractControllerfor ease of use!) - 🧅 Dispatch middlewares (anything that implements
\Asgrim\SideEffect\Dispatchablecan be used!) - 💾 Perform database queries using
\Asgrim\SideEffect\Features\PerformDatabaseQuery - 🤫 Handle errors effectively with
\Asgrim\SideEffect\Features\ShutTheHellUpDecorator
Basic Usage
echo (new Framework( $serverRequest, // You could use `guzzlehttp/psr7` to make this [ // Add loads more middlewares here to do spooky things! 💕 new class extends AbstractController { public function __toString() : string { return 'Hello, world!'; } }, ] ));
Demo Script 🔥
The demo.php script shows an example application using the framework. You can base your enterprise level application
on this easy example.
You can run the demo.php script to see it in action like this:
php -S localhost:8000 demo.php
Then visit: http://localhost:8000/?who=james
