diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 61cda005..6c493476 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -109,7 +109,7 @@ We will only merge pull requests that follow the project's coding style. Please check your code with the provided PHP_CodeSniffer standard: - vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ Classes/ Tests/ Public/ + vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ bin/ Classes/ Tests/ Public/ Please also check the code structure using PHPMD: @@ -117,10 +117,10 @@ Please also check the code structure using PHPMD: And also please run the static code analysis: - vendor/bin/phpstan analyse -l 5 Classes/ Tests/ Public/ + vendor/bin/phpstan analyse -l 5 bin/ Classes/ Tests/ Public/ You can also run all code style checks using one long line from a bash shell: - find Classes/ Tests/ Public/ core/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && vendor/bin/phpstan analyse -l 5 Classes/ Tests/ Public/ && vendor/bin/phpmd Classes/ text Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ Classes/ Tests/ Public/ + find Classes/ Tests/ Public/ core/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && php -l bin/* && vendor/bin/phpstan analyse -l 5 bin/ Classes/ Tests/ Public/ && vendor/bin/phpmd Classes/ text Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ bin/ Classes/ Tests/ Public/ This will execute all tests except for the unit tests and the integration tests. diff --git a/.travis.yml b/.travis.yml index a451f605..da37f3b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,6 +48,7 @@ script: echo; echo "Linting all PHP files"; find Classes/ Tests/ Public/ core/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l; + php -l bin/*; - > echo; @@ -63,7 +64,7 @@ script: - > echo; echo "Running the static analysis"; - vendor/bin/phpstan analyse -l 5 Classes/ Tests/ Public/; + vendor/bin/phpstan analyse -l 5 bin/ Classes/ Tests/ Public/; - > echo; @@ -73,4 +74,4 @@ script: - > echo; echo "Running PHP_CodeSniffer"; - vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ Classes/ Tests/ Public/; + vendor/bin/phpcs --standard=Configuration/PhpCodeSniffer/ bin/ Classes/ Tests/ Public/; diff --git a/bin/console b/bin/console new file mode 100755 index 00000000..69710372 --- /dev/null +++ b/bin/console @@ -0,0 +1,26 @@ +#!/usr/bin/env php +getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); +$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $context !== 'prod'; + +if ($debug) { + Debug::enable(); +} + +Bootstrap::getInstance()->setApplicationContext($context)->configure(); +$kernel = new ApplicationKernel($context, $debug); +$application = new Application($kernel); +$application->run($input);