NotionCommotion Posted November 22, 2016 Share Posted November 22, 2016 Trying to install laravel, and was following a tutorial at https://www.tutorialspoint.com/laravel/laravel_installation.htm. Why is --prefer-dist directory not being recognized as a flag, but is being used fort he target directory? https://getcomposer.org/doc/03-cli.md#create-project shows doing something similar with php composer.phar create-project doctrine/orm path 2.2.*. composer create-project --prefer-dist laravel/laravel blog described by https://laravel.com/docs/5.3 will install it in ./blog. [Michael@devserver testl]$ pwd /var/www/testl [Michael@devserver testl]$ ls -la total 8 drwxrwxr-x. 2 Michael Michael 4096 Nov 22 07:21 . drwxrwxr-x. 28 root root 4096 Nov 22 07:21 .. [Michael@devserver testl]$ composer create-project laravel/laravel –-prefer-dist Installing laravel/laravel (v5.3.16) - Installing laravel/laravel (v5.3.16) Loading from cache Created project in –-prefer-dist > php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating dependencies (including require-dev) - Installing vlucas/phpdotenv (v2.4.0) etc, etc, etc.... Loading from cache symfony/var-dumper suggests installing ext-symfony_debug () phpunit/phpunit suggests installing phpunit/php-invoker (~1.1) phpunit/phpunit suggests installing ext-xdebug (*) Writing lock file Generating autoload files > Illuminate\Foundation\ComposerScripts::postUpdate > php artisan optimize Generating optimized class loader The compiled class file has been removed. > php artisan key:generate Application key [base64:g+JF6MyWuEynyoyh//Afo1xg/2RiZSn5tF3cf1mQZp0=] set successfully. [Michael@devserver testl]$ ls -la total 12 drwxrwxr-x. 3 Michael Michael 4096 Nov 22 07:22 . drwxrwxr-x. 28 root root 4096 Nov 22 07:21 .. drwxrwxr-x. 12 Michael Michael 4096 Nov 22 07:22 –-prefer-dist [Michael@devserver testl]$ Quote Link to comment Share on other sites More sharing options...
kicken Posted November 22, 2016 Share Posted November 22, 2016 The options are supposed to come first: C:\>composer help create-project Usage: create-project [options] [--] [<package>] [<directory>] [<version>] Putting the --prefer-dist after works fine for me but maybe your version of composer is more picky? Are you using the latest version? 1 Quote Link to comment Share on other sites More sharing options...
NotionCommotion Posted November 23, 2016 Author Share Posted November 23, 2016 The options are supposed to come first: Putting the --prefer-dist after works fine for me but maybe your version of composer is more picky? Are you using the latest version? I'm using Composer version 1.2.0. Even https://laravel.com/docs/5.1/quickstart shows it as composer create-project laravel/laravel quickstart --prefer-dist, however, since the directory is also given, it doesn't attempt to use the option as the directory path. Oh well, all is good. Thank you kicken for your reply. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.