diff --git a/.dockerignore b/.dockerignore index dbbb540..f528363 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,3 @@ .git +app/vendor node_modules -vendor diff --git a/.github/CONTRIBUTING b/.github/CONTRIBUTING index ee225e9..84da915 100644 --- a/.github/CONTRIBUTING +++ b/.github/CONTRIBUTING @@ -24,11 +24,11 @@ fit with the overall direction and goals of Directory Lister. ### Static Analysis - $ vendor/bin/psalm + $ app/vendor/bin/psalm ### Run Tests - $ vendor/bin/phpunit + $ app/vendor/bin/phpunit --- diff --git a/.gitignore b/.gitignore index 35463da..97276f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ +/app/vendor/ /node_modules/ -/vendor/ .env .php_cs.cache .phpunit.result.cache diff --git a/.php_cs.dist b/.php_cs.dist index 9719701..87b6018 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -2,8 +2,8 @@ $finder = PhpCsFixer\Finder::create()->in([ __DIR__ . DIRECTORY_SEPARATOR . 'app', - __DIR__ . DIRECTORY_SEPARATOR . 'tests' -])->notPath('cache'); + __DIR__ . DIRECTORY_SEPARATOR . 'tests', +])->notPath(['cache', 'vendor']); return PhpCsFixer\Config::create()->setRules([ '@PSR1' => true, diff --git a/.styleci.yml b/.styleci.yml index b8f8b2c..e31472d 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -11,10 +11,11 @@ disabled: - trailing_comma_in_multiline_array finder: - exclude: - - "vendor" - name: - - "*.php" path: - "app" - "tests" + name: + - "*.php" + exclude: + - "app/cache" + - "app/vendor" diff --git a/.travis.yml b/.travis.yml index 7020480..0ff2fd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,14 +14,14 @@ matrix: cache: directories: - $HOME/.composer/cache - - vendor + - app/vendor before_install: phpenv config-rm xdebug.ini || true install: composer install before_script: - - vendor/bin/php-cs-fixer fix --diff --dry-run - - vendor/bin/psalm + - app/vendor/bin/php-cs-fixer fix --diff --dry-run + - app/vendor/bin/psalm -script: vendor/bin/phpunit --coverage-text +script: app/vendor/bin/phpunit --coverage-text diff --git a/app/src/Providers/FinderProvider.php b/app/src/Providers/FinderProvider.php index a99d4a4..409702e 100644 --- a/app/src/Providers/FinderProvider.php +++ b/app/src/Providers/FinderProvider.php @@ -14,9 +14,7 @@ use Tightenco\Collect\Support\Collection; class FinderProvider { /** @const Application paths to be hidden */ - protected const APP_FILES = [ - 'app', 'node_modules', 'vendor', 'index.php' - ]; + protected const APP_FILES = ['app', 'index.php']; /** @const Array of sort options mapped to their respective methods */ public const SORT_METHODS = [ diff --git a/artifacts.include b/artifacts.include index 6fed5fc..648f231 100644 --- a/artifacts.include +++ b/artifacts.include @@ -1,9 +1,7 @@ app -node_modules -vendor .env.example .htaccess directory-lister.svg +index.php LICENSE README.md -index.php diff --git a/composer.json b/composer.json index 4e8db03..94d4f19 100644 --- a/composer.json +++ b/composer.json @@ -40,6 +40,7 @@ }, "config": { "sort-packages": true, - "optimize-autoloader": true + "optimize-autoloader": true, + "vendor-dir": "app/vendor" } } diff --git a/index.php b/index.php index 0b69d94..257a0bd 100644 --- a/index.php +++ b/index.php @@ -5,7 +5,7 @@ use App\Controllers; use DI\Container; use Dotenv\Dotenv; -require __DIR__ . '/vendor/autoload.php'; +require __DIR__ . '/app/vendor/autoload.php'; // Set file access restrictions ini_set('open_basedir', __DIR__); diff --git a/phpunit.xml b/phpunit.xml index b101d08..12dc1a7 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,5 +1,5 @@ - + tests/ @@ -10,6 +10,7 @@ app/ app/cache + app/vendor diff --git a/psalm.xml b/psalm.xml index 8eeb775..07878aa 100644 --- a/psalm.xml +++ b/psalm.xml @@ -11,7 +11,7 @@ - + diff --git a/webpack.mix.js b/webpack.mix.js index 313cd7a..7d9f9dd 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -5,7 +5,7 @@ require('laravel-mix-purgecss'); mix.setPublicPath('.'); mix.webpackConfig({ - watchOptions: { ignored: ['node_modules', 'vendor'] } + watchOptions: { ignored: ['node_modules', 'app/vendor'] } }); mix.sass('app/resources/sass/app.scss', 'app/assets/app.css').options({