Skip to content

Commit

Permalink
Merge pull request #4 from moufmouf/definition-provider
Browse files Browse the repository at this point in the history
Updating dependencies
  • Loading branch information
moufmouf committed Nov 30, 2015
2 parents f5813d4 + a48ccde commit 24f4b50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can install this package through Composer:
```json
{
"require": {
"thecodingmachine/yaco": "~1.0"
"thecodingmachine/yaco": "~0.3"
}
}
```
Expand Down Expand Up @@ -44,5 +44,17 @@ foreach ($definitions as $definition) {
file_put_contents("Container.php", $compiler->compile("My\\Container"));
```

You can also directly register a **definition provider** using the *register* method:

TODO: document the register method.
```php
use TheCodingMachine\Yaco\Compiler;

$compiler = new Compiler();

// ...

$compiler->register($definitionProvider);

// Let's dump the code of the My\Container class.
file_put_contents("Container.php", $compiler->compile("My\\Container"));
```
10 changes: 2 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{
"repositories": [
{
"type": "vcs",
"url": "git@github.com:moufmouf/definition-interop-compiler-test-suite.git"
}
],
"name": "thecodingmachine/yaco",
"type": "library",
"description": "YACO (Yet Another COmpiler) is a PHP tool that generates a PHP container based on entry definitions.",
Expand All @@ -27,9 +21,9 @@
},
"require-dev": {
"phpunit/phpunit": "~4.5",
"mnapoli/assembly": "dev-master",
"mnapoli/assembly": "~0.1.0",
"satooshi/php-coveralls": "dev-master",
"container-interop/definition-interop-compiler-test-suite": "dev-master"
"container-interop/definition-interop-compiler-test-suite": "~0.1.0"
},
"minimum-stability": "dev",
"prefer-stable": true
Expand Down

0 comments on commit 24f4b50

Please sign in to comment.