File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 4444 - name : Install dependencies with composer
4545 run : composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4646
47+ # - name: Setup project
48+ # run: |
49+ # mv config/autoload/local.test.php.dist config/autoload/local.test.php
50+
4751 - name : Collect code coverage with PHPUnit
4852 run : vendor/bin/phpunit --colors=always --coverage-clover clover.xml
4953
Original file line number Diff line number Diff line change @@ -26,19 +26,7 @@ function copyFile(array $file): void
2626
2727function getEnvironment (): string
2828{
29- $ composerInstalledJson = 'vendor/composer/installed.json ' ;
30- if (! file_exists ($ composerInstalledJson )) {
31- throw new RuntimeException ('Composer installed JSON file not found. ' );
32- }
33-
34- $ data = json_decode (file_get_contents ($ composerInstalledJson ), true );
35- foreach ($ data as $ package ) {
36- if (! empty ($ package ['dev ' ])) {
37- return ENVIRONMENT_DEVELOPMENT ;
38- }
39- }
40-
41- return ENVIRONMENT_PRODUCTION ;
29+ return file_exists ('config/development.config.php ' ) ? ENVIRONMENT_DEVELOPMENT : ENVIRONMENT_PRODUCTION ;
4230}
4331
4432// when adding files to the below array the `source` and `destination` paths must be relative to the project root folder
You can’t perform that action at this time.
0 commit comments