Last active
January 15, 2016 10:46
-
-
Save event15/84e993fca49f449f15a4 to your computer and use it in GitHub Desktop.
Przygotowany plik composer.json oraz dodany do niego PHPSpec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "root/katas", | |
"description": "Popularne Kata w PHP", | |
"type": "project", | |
"require" :{ | |
"php": ">= 7.0" | |
}, | |
"require-dev": { | |
"phpspec/phpspec": "^2.4" | |
}, | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "Marek Woś", | |
"email": "nie@podam.pl" | |
} | |
], | |
"config": { | |
"bin-dir": "bin/" | |
}, | |
"autoload": { | |
"psr-4": { | |
"Kata\\": "src/Kata" | |
} | |
} | |
} |
{
"name": "root/katas",
"description": "App desc",
"type": "project",
"require" :{
"php": ">= 7.0"
},
"require-dev": {
"phpspec/phpspec": "^2.4",
"fabpot/php-cs-fixer": "^1.11"
},
"license": "MIT",
"authors": [
{
"name": "Marek Woś",
"email": "nie@podam.pl"
}
],
"config": {
"bin-dir": "bin/"
},
"autoload": {
"psr-4": {
"efiku\\": "src/"
}
}
}
IMHO lepszy config.
dzięki opcji bin-dir tworzy się nam katalog bin w projekcie gdzie mamy symlink do /vendor/phpspec[...]
Approved.
Robiłem wpis o kata i TDD, więc uznałem, że composer to sprawa drugorzędna, jednak skoro to wpis o sztuce i rzemiośle, warto i o to zadbać.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
W require nie wolno posiadać narzędzi służących do budowania / testowania aplikacji.
Od tego jest require-dev
composer require-dev phpspec/phpspec --dist
PSR-0 jest deprecated. PSR-4 używaj.