Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cspray/annotated-container-in-a-toot
Annotatated Container implemented using a backing container that can fit in 280 characters!
https://github.com/cspray/annotated-container-in-a-toot
Last synced: 12 days ago
JSON representation
Annotatated Container implemented using a backing container that can fit in 280 characters!
- Host: GitHub
- URL: https://github.com/cspray/annotated-container-in-a-toot
- Owner: cspray
- Created: 2023-05-16T22:39:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-16T22:40:18.000Z (over 1 year ago)
- Last Synced: 2024-12-08T21:44:31.870Z (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 ... in a toot!
Inspired by a [post on phpc.social by @ian](https://phpc.social/@ian/110380652469868165), 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 a dev branch from Annotated Container:
- 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-in-a-toot.git
cd annotated-container-in-a-toot && 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\AnnotatedContainerInAToot\Widget#652 (1) {
public readonly string $id =>
string(32) "Annotated Container ... in a toot!"
}
```Please check out the rest of this codebase for more details!