Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cspray/annotated-container-phpactor
https://github.com/cspray/annotated-container-phpactor
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cspray/annotated-container-phpactor
- Owner: cspray
- Created: 2023-05-15T18:14:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-15T18:15:07.000Z (over 1 year ago)
- Last Synced: 2024-12-08T21:44:31.847Z (14 days ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Annotated Container and Phpactor
A small, proof-of-concept showing a core concept behind Annotated Container... Bring Your Own Container!
This implementation is meant to show that autowiring is not required to use Annotated Container and can be integrated with whatever style of dependency injection you prefer.
This demo requires to install dev branches from Annotated Container and from a forked Phpactor:
- The [Phpactor fork](https://github.com/cspray/phpactor-container) only makes changes to allow psr/container:2. The changes are made in the `task/allow-psr-container-2` branch
- Annotated Container requires pulling from `dev-main` to allow overriding `ContainerFactory` implementations. This will be released properly as part of v2.1.## Running Demo
You should clone this repo and then run composer install.
```
git clone [email protected]:cspray/annotated-container-phpactor.git
cd annotated-container-phpactor && composer install
```After that, from the repo's root directory you can run the demo script:
```
php app.php
```If everything runs correctly you should see output similar to the following:
```
class Cspray\AnnotatedContainerPhpactor\Widget#652 (1) {
public readonly string $id =>
string(32) "Annotated Container and Phpactor"
}
```Please check out the rest of this codebase for more details!