teknoo / east-foundation
East Foundation is a universal package to implement the #east philosophy ( http://blog.est.voyage/phpTour2015/ ) with any framework supporting PSR-11, PSR-15 or with Symfony 4+.
Fund package maintenance!
Patreon
TeknooSoftware
Installs: 20 064
Dependents: 4
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^8.2
- ext-json: *
- php-di/php-di: ^7.0.7
- psr/clock: ^1
- psr/container: ^2.0
- psr/http-factory: ^1.0.2
- psr/http-message: ^2
- teknoo/immutable: ^3.0.18
- teknoo/recipe: ^6
- teknoo/states: ^6.4.1
Requires (Dev)
- ext-pcntl: *
- behat/behat: ^3.15
- laminas/laminas-diactoros: ^3.5
- nikic/php-parser: ^4.18||^5.3.1
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^1.12.7
- phpunit/phpunit: ^11.4
- psr/http-server-middleware: ^1.0.2
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^3.10.3
- symfony/config: ^6.3||^7
- symfony/console: ^6.3||^7
- symfony/dependency-injection: ^6.3||^7
- symfony/framework-bundle: ^6.3||^7
- symfony/http-foundation: ^6.3||^7
- symfony/http-kernel: ^6.3||^7
- symfony/messenger: ^6.3||^7
- symfony/property-access: ^6.3||^7
- symfony/psr-http-message-bridge: ^2.3.1||^6.4||^7
- symfony/routing: ^6.3||^7
- symfony/security-core: ^6.3||^7
- symfony/serializer: ^6.3||^7
- symfony/yaml: ^6.3||^7
- teknoo/bridge-phpdi-symfony: ^6.1.0
- twig/twig: ^3.14
- dev-master
- 8.0.1
- 8.0.0
- 7.9.0
- 7.8.3
- 7.8.2
- 7.8.1
- 7.8.0
- 7.7.1
- 7.7.0
- 7.6.4
- 7.6.3
- 7.6.2
- 7.6.1
- 7.6.0
- 7.5.2
- 7.5.1
- 7.5.0
- 7.4.0
- 7.3.6
- 7.3.5
- 7.3.4
- 7.3.3
- 7.3.2
- 7.3.1
- 7.3.0
- 7.2.0
- 7.1.0
- 7.0.0
-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ta2
- 0.0.7-beta1
- 0.0.6
- 0.0.5
- 0.0.5-beta10
- 0.0.5-beta9
- 0.0.5-beta8
- 0.0.5-beta7
- 0.0.5-beta6
- 0.0.5-beta5
- 0.0.5-beta4
- 0.0.5-beta3
- 0.0.5-beta2
- 0.0.5-beta1
- 0.0.4
- 0.0.4-beta2
- 0.0.4-beta1
- 0.0.4-alpha13
- 0.0.4-alpha12
- 0.0.4-alpha11
- 0.0.4-alpha10
- 0.0.4-alpha9
- 0.0.4-alpha8
- 0.0.4-alpha7
- 0.0.4-alpha6
- 0.0.4-alpha5
- 0.0.4-alpha4
- 0.0.4-alpha3
- 0.0.4-alpha2
- 0.0.4-alpha1
- 0.0.3
- 0.0.2
- 0.0.1
- 0.0.1-alpha3
- 0.0.1-alpha2
- 0.0.1-alpha1
This package is auto-updated.
Last update: 2024-11-20 08:58:33 UTC
README
East Foundation is a universal package to implement the #east philosophy with
any framework supporting PSR 11
, PSR 7
or with Symfony 6.4+ : All public method of objects must return $this
or a
new instance of $this
.
This bundle uses PSR 7
requests and responses and do automatically the conversion from Symfony's requests and responses.
So your controllers and services can be independent of Symfony. This bundle reuse internally Symfony's components
to manage routes and find controller to call. It is also designed to be used with other framework.
It can be also used for workers :
- Triggering asynchronous tasks (thanks to pcntl) for timers.
- Setting up a worker health check.
- Provides non blocking sleep method.
This library is built on the Recipe library, and redefine only some interfaces to be more comprehensive with HTTP context :
- Middleware are actions, but must implement a specific interface.
- The HTTP workflow is defined into a Recipe, able to be extended.
- Chef became a manager, to execute the workflow when a request is accepted.
- Usable with any
PSR 11
Framework, Symfony implementation is also provided. - Supports
PSR 15
handler and middleware - Supports
PSR 20
and provides a PSR-20 implementation
A complete documentation is available in documentation/README.md
Support this project
This project is free and will remain free. It is fully supported by the activities of the EIRL. If you like it and help me maintain it and evolve it, don't hesitate to support me on Patreon or Github.
Thanks :) Richard.
Credits
EIRL Richard Déloge - https://deloge.io - Lead developer. SASU Teknoo Software - https://teknoo.software
About Teknoo Software
Teknoo Software is a PHP software editor, founded by Richard Déloge, as part of EIRL Richard Déloge. Teknoo Software's goals : Provide to our partners and to the community a set of high quality services or software, sharing knowledge and skills.
License
East Foundation is licensed under the MIT License - see the licenses folder for details.
Installation & Requirements
To install follow these instructions.
This library requires :
* PHP 8.1+
* A PHP autoloader (Composer is recommended)
* Teknoo/Immutable.
* Teknoo/States.
* Teknoo/Recipe.
* Optional: Symfony 6.4+
News from Teknoo East Foundation 7.x
This library requires PHP 8.1 or newer and it's only compatible with Symfony 6.3 or newer :
- PHP-DI 7 or newer
- Supports
PSR-20
with theDatesService
. - Supports
PSR-15
with add to newRecipe Bowl
type :FiberHandlerBowl
(andFiberMiddlewareBowl
) to supportPSR 15
Requests handlers into a recipe.MiddlewareBowl
(andFiberMiddlewareBowl
) to supportPSR 15
middleware into a recipe.
- Add `Teknoo\East\Foundation\Normalizer\Object\GroupsTrait
- Add a pseudo non blocking Sleep service, build on timer
- Triggering asynchronous tasks (thanks to pcntl) for timers.
- Setting up a worker health check.
- Provides non blocking sleep method.
News from Teknoo East Foundation 6.x
This library requires PHP 8.1 or newer and it's only compatible with Symfony 6.1 or newer :
- Constants are final in
SessionMiddleware
, processors, routers and sessions components. - Use readonly for immutables objects (
Processor
and routers' results). - Support Fibers in main
Plan
andRecipeEndPoint
.RecipeEndPoint
accepts also bowl andFiberRecipeBowl
. - Remove support of PHP 8.0 and Symfony 5.4 and below.
News from Teknoo East Foundation 5.x
This library requires PHP 8.0 or newer and it's only compatible with Symfony 5.2 or newer :
- Migrate to PHP 8.0+
- Remove support of Symfony 4.4, only 5.2+
- Constructor Property Promotion
- Non-capturing catches
- switch to str_contains
- Messenger's executor use an empty manager and clone it
- Add method to configure client's behavior when a it must send a missing response (silently or throw an exception)
- Add
ClientInterface::mustSendAResponse
- Add
ClientInterface::sendAResponseIsOptional
- Processor will configure in non silent mode if a compatible callable is available and was returned by Router
- This behavior can be disable by set
teknoo.east.client.must_send_response
to false in DI - Move ClientInterface to
Teknoo\East\Foundation\Client
fromTeknoo\East\Foundation\Http
- Add
Teknoo\East\Foundation\Client\ResultInterface
ClientInterface
accept also ResultInterface instead PSR's message- All clients implementations adopts new client interfaces
- Symfony Clients implementations supports
ResultInterface
andJsonSerializable
responses
News from Teknoo East Foundation 4.x
This library requires PHP 7.4 or newer and it's only compatible with Symfony 4.4 or newer :
- Switch to States 4.1.9 and PHPStan 0.12.79
- Prepare library to be used in non HTTP context
- Use MessageInterface instead of ServerRequestInterface
- Plan and ProcessorPlan use BasePlanTrait
- Add
PSR 11
Message only implementation - Add MessageFactory
- Update Client Interface to use MessageInterface instead of RequestInterface
- Add Recipe executor dedicated to Symfony Messenger
- Add Client dedicated to Symfony Messenger
- Remove some public services
News from Teknoo East Foundation 3.x
This library requires PHP 7.4 or newer and it's only compatible with Symfony 4.4 or newer :
- Remove Symfony Template component (integration deprecated into symfony)
- Create EngineInterface to allow creation of adapter to any templating Engine
- Create ResultInterface to allow asynchrone template rendering for callback streaming
- Create Twig Engine implementing EngineInterface and ResultInterface
- Remove 'east.controller.service' tag (not used)
- Add east.endpoint.template to inject Twig engine adapter
- Fix services definitions
- Complete tests
- Migrate universal folder in src to src's root and remove legacy support
News from Teknoo East Foundation 2.x
This library requires PHP 7.4 or newer and it's only compatible with Symfony 4.4 or newer :
- PHP 7.4 is the minimum required
- Switch to typed properties
- Remove some PHP useless DockBlocks
- Replace array_merge by "..." operators for integer indexed arrays
- Support zendframework/zend-diactoros 2.2
- Restrict to Symfony 4.4 or 5.+ and remove some deprecated
- Set
Teknoo\East\Foundation\Manager\ManagerInterface
andTeknoo\East\Foundation\Http\ClientInterface
as synthetic services into Symfony's services definitions to avoid compilation error with Symfony 4.4 - Set
Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory
into Symfony's services definitions to avoid compilation error with Symfony 4.4 - Enable PHPStan in QA Tools and disable PHPMD
Contribute :)
You are welcome to contribute to this project. Fork it on Github