execute on Mac Host machine
$ env COMPOSER_MEMORY_LIMIT=-1 composer update --no-scripts
# update feature branch packages
$ composer update vendor/{package name}
# avoid the problem with out of memory in KOZA
$ COMPOSER_MEMORY_LIMIT=-1 composer install vendor/lib
# ausserhalb VM ausfuehren
$ env COMPOSER_MEMORY_LIMIT=-1 composer install vendor/lib --ignore-platform-reqs --no-scripts$ env COMPOSER_MEMORY_LIMIT=-1 composer install vendor/lib --ignore-platform-reqs --no-scripts
// in phpstorm: invalid cache/restart
composer require webmozart/assert --no-scripts --ignore-platform-reqs
composer req --dev phpunit/phpunit
composer req --dev behat/behat
composer req --dev phpstan/phpstan
composer req --dev friendsofphp/php-cs-fixer
# phpstan
vendor/bin/phpstan analyse src tests
# phpunit
vendor/bin/phpunit tests
# php-cs-fixer
vendor/bin/php-cs-fixer fix
{
"autoload": {
"psr-4": {
"MayApp\\": "src/MyApp"
},
"classmap": [
"src/MyApp"
]
},
"require-dev": {
"phpunit/phpunit": "^7.3",
"friendsofphp/php-cs-fixer": "^2.12"
},
"scripts": {
"test": "vendor/bin/phpunit tests/",
"fix": "vendor/bin/php-cs-fixer fix"
}
}<?php
$finder = PhpCsFixer\Finder::create()
->exclude([
'vendor',
])
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'yoda_style' => [
'equal' => null,
'identical' => null,
'less_and_greater' => null,
],
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => ['space' => 'single'],
'array_syntax' => ['syntax' => 'short'],
'phpdoc_align' => [
'align' => 'left',
'tags' => ['param', 'property', 'return', 'throws', 'type', 'var', 'method']
],
'phpdoc_to_comment' => false,
'no_superfluous_phpdoc_tags' => true,
])
->setFinder($finder)
;mkdir -p src/MyApp tests
composer test
composer fix