diff --git a/.travis.yml b/.travis.yml index be7c4c38..de34e053 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ services: before_script: - cp .travis/env.travis.php env.php - - composer install --no-interaction --verbose + - composer install --dev --no-interaction --verbose script: - php artisan database:create --reset diff --git a/.travis/deploy_script.sh b/.travis/deploy_script.sh index d4c93ba9..b1690ded 100755 --- a/.travis/deploy_script.sh +++ b/.travis/deploy_script.sh @@ -4,6 +4,10 @@ if [ "$TRAVIS" = "true" ]; then cd $TRAVIS_BUILD_DIR + # Clean up the dependencies to only remove the dev packages + #rm -rf vendor + #composer install --no-interaction --no-dev + if test "$TRAVIS_TAG"; then PKG_NAME=$TRAVIS_TAG else diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 68c4a014..fbe0ef29 100755 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -46,5 +46,14 @@ class AppServiceProvider extends ServiceProvider */ public function register(): void { + # Only dev environment stuff + if ($this->app->environment() === 'dev') { + + # Only load the IDE helper if it's included. This lets use distribute the + # package without any dev dependencies + if (class_exists(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class)) { + $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); + } + } } } diff --git a/composer.json b/composer.json index dbe919c8..854b628a 100755 --- a/composer.json +++ b/composer.json @@ -49,7 +49,8 @@ "filp/whoops": "~2.0", "bpocallaghan/generators": "5.0.1", "zircote/swagger-php": "2.0.13", - "nunomaduro/collision": "^2.0" + "nunomaduro/collision": "^2.0", + "codedungeon/phpunit-result-printer": "^0.8.4" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index acbbab66..9f32ed2d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "bc2ae648e6b01cdf8d5e3963e166e084", + "content-hash": "72f80bf4c16eee977da9106ec5e3ed69", "packages": [ { "name": "akaunting/money", @@ -5238,6 +5238,55 @@ ], "time": "2017-11-16T12:28:04+00:00" }, + { + "name": "codedungeon/phpunit-result-printer", + "version": "0.8.4", + "source": { + "type": "git", + "url": "https://github.com/mikeerickson/phpunit-pretty-result-printer.git", + "reference": "cb9bf244b62392909ee61ee174874de137fe698a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mikeerickson/phpunit-pretty-result-printer/zipball/cb9bf244b62392909ee61ee174874de137fe698a", + "reference": "cb9bf244b62392909ee61ee174874de137fe698a", + "shasum": "" + }, + "require": { + "hassankhan/config": "^0.10.0", + "php": "^7.0", + "symfony/yaml": "^2.7|^3.0|^4.0" + }, + "require-dev": { + "phpunit/phpunit": ">=5.2", + "spatie/phpunit-watcher": "^1.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Codedungeon\\PHPUnitPrettyResultPrinter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike Erickson", + "email": "codedungeon@gmail.com" + } + ], + "description": "PHPUnit Pretty Result Printer", + "keywords": [ + "composer", + "package", + "phpunit", + "printer", + "result-printer" + ], + "time": "2018-03-23T23:03:37+00:00" + }, { "name": "doctrine/annotations", "version": "v1.6.0", @@ -5516,6 +5565,63 @@ ], "time": "2015-05-11T14:41:42+00:00" }, + { + "name": "hassankhan/config", + "version": "0.10.0", + "source": { + "type": "git", + "url": "https://github.com/hassankhan/config.git", + "reference": "06ac500348af033f1a2e44dc357ca86282626d4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hassankhan/config/zipball/06ac500348af033f1a2e44dc357ca86282626d4a", + "reference": "06ac500348af033f1a2e44dc357ca86282626d4a", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "scrutinizer/ocular": "~1.1", + "squizlabs/php_codesniffer": "~2.2" + }, + "suggest": { + "symfony/yaml": "~2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Noodlehaus\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Hassan Khan", + "homepage": "http://hassankhan.me/", + "role": "Developer" + } + ], + "description": "Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files", + "homepage": "http://hassankhan.me/config/", + "keywords": [ + "config", + "configuration", + "ini", + "json", + "microphp", + "unframework", + "xml", + "yaml", + "yml" + ], + "time": "2016-02-11T16:21:17+00:00" + }, { "name": "jakub-onderka/php-console-color", "version": "0.1", diff --git a/config/app.php b/config/app.php index 5fd3b816..4718aeb3 100755 --- a/config/app.php +++ b/config/app.php @@ -68,7 +68,6 @@ return [ /* * Package Service Providers... */ - Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, Collective\Html\HtmlServiceProvider::class, Laracasts\Flash\FlashServiceProvider::class, Prettus\Repository\Providers\RepositoryServiceProvider::class, diff --git a/config/ide-helper.php b/config/ide-helper.php index 361e5d0f..307a0fdd 100644 --- a/config/ide-helper.php +++ b/config/ide-helper.php @@ -41,7 +41,7 @@ return array( */ 'model_locations' => array( - 'app/Models', + //'app/Models', ), diff --git a/phpunit.xml b/phpunit.xml index 32acf6c7..07657b3e 100755 --- a/phpunit.xml +++ b/phpunit.xml @@ -8,6 +8,7 @@ convertWarningsToExceptions="false" beStrictAboutOutputDuringTests="false" beStrictAboutTestsThatDoNotTestAnything="false"> + ./tests diff --git a/resources/stubs/installer/config.stub b/resources/stubs/installer/config.stub index a686974c..2c240b3b 100644 --- a/resources/stubs/installer/config.stub +++ b/resources/stubs/installer/config.stub @@ -13,7 +13,7 @@ return [ 'url' => '$SITE_URL$', # Don't forget to change these when live - 'env' => 'dev', + 'env' => 'local', 'debug' => true, ],