drupal-project icon indicating copy to clipboard operation
drupal-project copied to clipboard

Create project brakes autoloader if target dir is current (maybe)

Open iBobik opened this issue 7 years ago • 7 comments

Something strange happened - I tried to create new project in current directory (.) and it created project with not working autoloader. Then I removed it and created the same in subdirectory (drupal-new) with the same parameters in the same Docker container, but errors disappeared.

Now it works for me and I does not have motivation to debug it, but I am curious why it happened. Also it could be potential technical bug, UX bug or incomplete docs.

Here is my shell log. Sorry it is not trimmed, but I am scared I could trim something important what I does not know it is important.

www-data@089a518aa56b:~/drupal$ ls
www-data@089a518aa56b:~/drupal$ composer create-project drupal-composer/drupal-project:8.x-dev . --stability dev
Installing drupal-composer/drupal-project (8.x-dev 217da1c26ab558d8c3ea0efcf98a342c8c95d1b1)
  - Installing drupal-composer/drupal-project (8.x-dev 217da1c) Cloning 217da1c26a
Created project in .
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 104 installs, 0 updates, 0 removals
  - Installing cweagans/composer-patches (1.6.1) Downloading: 100%         
  - Installing drupal-composer/drupal-scaffold (2.3.0) Downloading: 100%         
  - Installing composer/installers (v1.3.0) Downloading: 100%         
  - Installing symfony/polyfill-mbstring (v1.4.0) Downloading: 100%         
  - Installing ircmaxell/password-compat (v1.0.4) Downloading: 100%         
  - Installing symfony/polyfill-php55 (v1.4.0) Downloading: 100%         
  - Installing symfony/polyfill-php54 (v1.4.0) Downloading: 100%         
  - Installing symfony/http-foundation (v2.8.22) Downloading: 100%         
  - Installing symfony/expression-language (v2.8.22) Downloading: 100%         
  - Installing symfony/dom-crawler (v3.3.2) Downloading: 100%         
  - Installing symfony/css-selector (v2.8.22) Downloading: 100%         
  - Installing jakub-onderka/php-console-color (0.1) Downloading: 100%         
  - Installing jakub-onderka/php-console-highlighter (v0.3.2) Downloading: 100%         
  - Installing dnoegel/php-xdg-base-dir (0.1) Downloading: 100%         
  - Installing nikic/php-parser (v3.0.6) Downloading: 100%         
  - Installing symfony/var-dumper (v2.8.22) Downloading: 100%         
  - Installing psr/log (1.0.2) Downloading: 100%         
  - Installing symfony/debug (v2.8.22) Downloading: 100%         
  - Installing symfony/console (v2.8.22) Downloading: 100%         
  - Installing psy/psysh (v0.8.8) Downloading: 100%         
  - Installing psr/http-message (1.0.1) Downloading: 100%         
  - Installing guzzlehttp/psr7 (1.4.2) Downloading: 100%         
  - Installing guzzlehttp/promises (v1.3.1) Downloading: 100%         
  - Installing guzzlehttp/guzzle (6.3.0) Downloading: 100%         
  - Installing gabordemooij/redbean (v4.3.4) Downloading: 100%         
  - Installing symfony/finder (v2.8.22) Downloading: 100%         
  - Installing symfony/yaml (v2.8.22) Downloading: 100%         
  - Installing drupal/console-extend-plugin (0.8.0) Downloading: 100%         
  - Installing vlucas/phpdotenv (v2.4.0) Downloading: 100%         
  - Installing drupal/console-dotenv (0.2.0) Downloading: 100%         
  - Installing webmozart/assert (1.2.0) Downloading: 100%         
  - Installing webmozart/path-util (2.3.0) Downloading: 100%         
  - Installing webflo/drupal-finder (0.3.0) Downloading: 100%         
  - Installing twig/twig (v1.34.3) Downloading: 100%         
  - Installing symfony/translation (v2.8.22) Downloading: 100%         
  - Installing symfony/process (v2.8.22) Downloading: 100%         
  - Installing symfony/filesystem (v2.8.22) Downloading: 100%         
  - Installing symfony/event-dispatcher (v2.8.22) Downloading: 100%         
  - Installing symfony/dependency-injection (v2.8.22) Downloading: 100%         
  - Installing symfony/config (v2.8.22) Downloading: 100%         
  - Installing stecman/symfony-console-completion (0.7.0) Downloading: 100%         
  - Installing drupal/console-en (1.0.0-rc23) Downloading: 100%         
  - Installing dflydev/placeholder-resolver (v1.0.2) Downloading: 100%         
  - Installing dflydev/dot-access-data (v1.1.0) Downloading: 100%         
  - Installing dflydev/dot-access-configuration (v1.0.1) Downloading: 100%         
  - Installing drupal/console-core (1.0.0-rc23) Downloading: 100%         
  - Installing doctrine/collections (v1.3.0) Downloading: 100%         
  - Installing doctrine/lexer (v1.0.1) Downloading: 100%         
  - Installing doctrine/annotations (v1.2.7) Downloading: 100%         
  - Installing alchemy/zippy (0.4.3) Downloading: 100%         
  - Installing drupal/console (1.0.0-rc23) Downloading: 100%         
  - Installing zendframework/zend-stdlib (3.1.0) Downloading: 100%         
  - Installing zendframework/zend-escaper (2.5.2) Downloading: 100%         
  - Installing zendframework/zend-feed (2.8.0) Downloading: 100%         
  - Installing zendframework/zend-diactoros (1.4.0) Downloading: 100%         
  - Installing symfony/validator (v2.8.22) Downloading: 100%         
  - Installing symfony/serializer (v2.8.22) Downloading: 100%         
  - Installing symfony/routing (v2.8.22) Downloading: 100%         
  - Installing symfony/psr-http-message-bridge (v1.0.0) Downloading: 100%         
  - Installing symfony/polyfill-iconv (v1.4.0) Downloading: 100%         
  - Installing symfony/http-kernel (v2.8.22) Downloading: 100%         
  - Installing symfony/polyfill-apcu (v1.4.0) Downloading: 100%         
  - Installing symfony/class-loader (v2.8.22) Downloading: 100%         
  - Installing symfony-cmf/routing (1.4.1) Downloading: 100%         
  - Installing stack/builder (v1.0.4) Downloading: 100%         
  - Installing paragonie/random_compat (v2.0.10) Downloading: 100%         
  - Installing masterminds/html5 (2.2.2) Downloading: 100%         
  - Installing egulias/email-validator (1.2.14) Downloading: 100%         
  - Installing easyrdf/easyrdf (0.9.1) Downloading: 100%         
  - Installing doctrine/inflector (v1.1.0) Downloading: 100%         
  - Installing doctrine/cache (v1.6.1) Downloading: 100%         
  - Installing doctrine/common (v2.7.2) Downloading: 100%         
  - Installing composer/semver (1.4.2) Downloading: 100%         
  - Installing asm89/stack-cors (1.1.0) Downloading: 100%         
  - Installing drupal/core (8.3.4) Downloading: 100%         
  - Installing phpdocumentor/reflection-docblock (2.0.5) Downloading: 100%         
  - Installing pear/console_table (v1.3.0) Downloading: 100%         
  - Installing consolidation/output-formatters (3.1.10) Downloading: 100%         
  - Installing consolidation/annotated-command (2.4.8) Downloading: 100%         
  - Installing drush/drush (8.1.12) Downloading: 100%         
  - Installing symfony/browser-kit (v3.3.2) Downloading: 100%         
  - Installing fabpot/goutte (v3.2.1) Downloading: 100%         
  - Installing behat/mink (v1.7.1) Downloading: 100%         
  - Installing behat/mink-browserkit-driver (v1.3.2) Downloading: 100%         
  - Installing behat/mink-goutte-driver (v1.2.1) Downloading: 100%         
  - Installing jcalderonzumba/gastonjs (v1.0.3) Downloading: 100%         
  - Installing jcalderonzumba/mink-phantomjs-driver (v0.3.3) Downloading: 100%         
  - Installing mikey179/vfsstream (v1.6.4) Downloading: 100%         
  - Installing sebastian/version (1.0.6) Downloading: 100%         
  - Installing sebastian/global-state (1.1.1) Downloading: 100%         
  - Installing sebastian/recursion-context (1.0.5) Downloading: 100%         
  - Installing sebastian/exporter (1.2.2) Downloading: 100%         
  - Installing sebastian/environment (1.3.8) Downloading: 100%         
  - Installing sebastian/diff (1.4.3) Downloading: 100%         
  - Installing sebastian/comparator (1.2.4) Downloading: 100%         
  - Installing doctrine/instantiator (1.0.5) Downloading: 100%         
  - Installing phpunit/php-text-template (1.2.1) Downloading: 100%         
  - Installing phpunit/phpunit-mock-objects (2.3.8) Downloading: 100%         
  - Installing phpunit/php-timer (1.0.9) Downloading: 100%         
  - Installing phpunit/php-file-iterator (1.4.2) Downloading: 100%         
  - Installing phpunit/php-token-stream (1.4.11) Downloading: 100%         
  - Installing phpunit/php-code-coverage (2.2.4) Downloading: 100%         
  - Installing phpspec/prophecy (v1.7.0) Downloading: 100%         
  - Installing phpunit/phpunit (4.8.36) Downloading: 100%         
symfony/var-dumper suggests installing ext-symfony_debug ()
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
alchemy/zippy suggests installing guzzle/guzzle (To use the GuzzleTeleporter with Guzzle 3)
zendframework/zend-feed suggests installing zendframework/zend-cache (Zend\Cache component, for optionally caching feeds between requests)
zendframework/zend-feed suggests installing zendframework/zend-db (Zend\Db component, for use with PubSubHubbub)
zendframework/zend-feed suggests installing zendframework/zend-http (Zend\Http for PubSubHubbub, and optionally for use with Zend\Feed\Reader)
zendframework/zend-feed suggests installing zendframework/zend-servicemanager (Zend\ServiceManager component, for easily extending ExtensionManager implementations)
zendframework/zend-feed suggests installing zendframework/zend-validator (Zend\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent)
symfony/validator suggests installing symfony/intl ()
symfony/validator suggests installing symfony/property-access (For using the 2.4 Validator API)
symfony/serializer suggests installing symfony/property-access (For using the ObjectNormalizer.)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
easyrdf/easyrdf suggests installing ml/json-ld (~1.0)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
drush/drush suggests installing ext-pcntl (*)
drush/drush suggests installing drush/config-extra (Provides configuration workflow commands, such as config-merge.)
behat/mink suggests installing behat/mink-selenium2-driver (slow, but JS-enabled driver for any app (requires Selenium2))
behat/mink suggests installing behat/mink-zombie-driver (fast and JS-enabled headless driver for any app (requires node.js))
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files

                                                                                                   
  [RuntimeException]                                                                               
  Could not scan for classes inside "web/core/lib/Drupal.php" which does not appear to be a file   
  nor a folder                                                                                     
                                                                                                   

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

www-data@089a518aa56b:~/drupal$ composer require drupal/data drupal/sqlsrv
Using version ^1.0@alpha for drupal/data
Using version ^2.11 for drupal/sqlsrv
./composer.json has been updated
Could not scan for classes inside "web/core/lib/Drupal.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Component/Utility/Timer.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Component/Utility/Unicode.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Core/Database/Database.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Core/DrupalKernel.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Core/DrupalKernelInterface.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Core/Site/Settings.php" which does not appear to be a file nor a folder
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing drupal/data (1.0.0-alpha2) Downloading: 100%         
  - Installing drupal/sqlsrv (2.11.0) Downloading: 100%         
Writing lock file
Generating autoload files

Installation failed, reverting ./composer.json to its original content.

                                                                                                   
  [RuntimeException]                                                                               
  Could not scan for classes inside "web/core/lib/Drupal.php" which does not appear to be a file   
  nor a folder                                                                                     
                                                                                                   

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

www-data@089a518aa56b:~/drupal$ composer install --prefer-dist
Could not scan for classes inside "web/core/lib/Drupal.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Component/Utility/Timer.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Component/Utility/Unicode.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Core/Database/Database.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Core/DrupalKernel.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Core/DrupalKernelInterface.php" which does not appear to be a file nor a folder
Could not scan for classes inside "web/core/lib/Drupal/Core/Site/Settings.php" which does not appear to be a file nor a folder
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Nothing to install or update
Generating autoload files

                                                                                                   
  [RuntimeException]                                                                               
  Could not scan for classes inside "web/core/lib/Drupal.php" which does not appear to be a file   
  nor a folder                                                                                     
                                                                                                   

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

www-data@089a518aa56b:~/drupal$ ls
LICENSE  README.md  composer.json  composer.lock  drush  phpunit.xml.dist  scripts  vendor  web
www-data@089a518aa56b:~/drupal$ ls web/
core  modules
www-data@089a518aa56b:~/drupal$ ls web/core
drupal-core-f34eee7
www-data@089a518aa56b:~/drupal$ ls web/core/drupal-core-f34eee7/
CHANGELOG.txt	    MAINTAINERS.txt  core.libraries.yml		   misc		     scripts
COPYRIGHT.txt	    UPDATE.txt	     core.link_relation_types.yml  modules	     tests
INSTALL.mysql.txt   assets	     core.services.yml		   package.json      themes
INSTALL.pgsql.txt   authorize.php    globals.api.php		   phpcs.xml.dist
INSTALL.sqlite.txt  composer.json    includes			   phpunit.xml.dist
INSTALL.txt	    config	     install.php		   profiles
LICENSE.txt	    core.api.php     lib			   rebuild.php
www-data@089a518aa56b:~/drupal$ ls vendor/
alchemy        dflydev		egulias		masterminds    phpunit	  symfony-cmf
asm89	       dnoegel		fabpot		mikey179       psr	  twig
behat	       doctrine		gabordemooij	nikic	       psy	  vlucas
bin	       drupal		guzzlehttp	paragonie      sebastian  webflo
composer       drupal-composer	ircmaxell	pear	       stack	  webmozart
consolidation  drush		jakub-onderka	phpdocumentor  stecman	  zendframework
cweagans       easyrdf		jcalderonzumba	phpspec        symfony
www-data@089a518aa56b:~/drupal$ rm -rf *
rm: cannot remove 'vendor': Directory not empty
^C
www-data@089a518aa56b:~/drupal$ cd ..
www-data@089a518aa56b:~$ composer create-project drupal-composer/drupal-project:8.x-dev drupal --stability dev --no-interaction
Installing drupal-composer/drupal-project (8.x-dev 217da1c26ab558d8c3ea0efcf98a342c8c95d1b1)

                                           
  [InvalidArgumentException]               
  Project directory drupal/ is not empty.  
                                           

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

www-data@089a518aa56b:~$ rm -rf drupal/
rm: cannot remove 'drupal/': Device or resource busy
www-data@089a518aa56b:~$ composer create-project drupal-composer/drupal-project:8.x-dev drupal-new --stability dev --no-interaction
Installing drupal-composer/drupal-project (8.x-dev 217da1c26ab558d8c3ea0efcf98a342c8c95d1b1)
  - Installing drupal-composer/drupal-project (8.x-dev 217da1c) Cloning 217da1c26a
Created project in drupal-new
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 104 installs, 0 updates, 0 removals
  - Installing cweagans/composer-patches (1.6.1) Loading from cache
  - Installing drupal-composer/drupal-scaffold (2.3.0) Loading from cache
  - Installing composer/installers (v1.3.0) Loading from cache
  - Installing symfony/polyfill-mbstring (v1.4.0) Loading from cache
  - Installing ircmaxell/password-compat (v1.0.4) Loading from cache
  - Installing symfony/polyfill-php55 (v1.4.0) Loading from cache
  - Installing symfony/polyfill-php54 (v1.4.0) Loading from cache
  - Installing symfony/http-foundation (v2.8.22) Loading from cache
  - Installing symfony/expression-language (v2.8.22) Loading from cache
  - Installing symfony/dom-crawler (v3.3.2) Loading from cache
  - Installing symfony/css-selector (v2.8.22) Loading from cache
  - Installing jakub-onderka/php-console-color (0.1) Loading from cache
  - Installing jakub-onderka/php-console-highlighter (v0.3.2) Loading from cache
  - Installing dnoegel/php-xdg-base-dir (0.1) Loading from cache
  - Installing nikic/php-parser (v3.0.6) Loading from cache
  - Installing symfony/var-dumper (v2.8.22) Loading from cache
  - Installing psr/log (1.0.2) Loading from cache
  - Installing symfony/debug (v2.8.22) Loading from cache
  - Installing symfony/console (v2.8.22) Loading from cache
  - Installing psy/psysh (v0.8.8) Loading from cache
  - Installing psr/http-message (1.0.1) Loading from cache
  - Installing guzzlehttp/psr7 (1.4.2) Loading from cache
  - Installing guzzlehttp/promises (v1.3.1) Loading from cache
  - Installing guzzlehttp/guzzle (6.3.0) Loading from cache
  - Installing gabordemooij/redbean (v4.3.4) Loading from cache
  - Installing symfony/finder (v2.8.22) Loading from cache
  - Installing symfony/yaml (v2.8.22) Loading from cache
  - Installing drupal/console-extend-plugin (0.8.0) Loading from cache
  - Installing vlucas/phpdotenv (v2.4.0) Loading from cache
  - Installing drupal/console-dotenv (0.2.0) Loading from cache
  - Installing webmozart/assert (1.2.0) Loading from cache
  - Installing webmozart/path-util (2.3.0) Loading from cache
  - Installing webflo/drupal-finder (0.3.0) Loading from cache
  - Installing twig/twig (v1.34.3) Loading from cache
  - Installing symfony/translation (v2.8.22) Loading from cache
  - Installing symfony/process (v2.8.22) Loading from cache
  - Installing symfony/filesystem (v2.8.22) Loading from cache
  - Installing symfony/event-dispatcher (v2.8.22) Loading from cache
  - Installing symfony/dependency-injection (v2.8.22) Loading from cache
  - Installing symfony/config (v2.8.22) Loading from cache
  - Installing stecman/symfony-console-completion (0.7.0) Loading from cache
  - Installing drupal/console-en (1.0.0-rc23) Loading from cache
  - Installing dflydev/placeholder-resolver (v1.0.2) Loading from cache
  - Installing dflydev/dot-access-data (v1.1.0) Loading from cache
  - Installing dflydev/dot-access-configuration (v1.0.1) Loading from cache
  - Installing drupal/console-core (1.0.0-rc23) Loading from cache
  - Installing doctrine/collections (v1.3.0) Loading from cache
  - Installing doctrine/lexer (v1.0.1) Loading from cache
  - Installing doctrine/annotations (v1.2.7) Loading from cache
  - Installing alchemy/zippy (0.4.3) Loading from cache
  - Installing drupal/console (1.0.0-rc23) Loading from cache
  - Installing zendframework/zend-stdlib (3.1.0) Loading from cache
  - Installing zendframework/zend-escaper (2.5.2) Loading from cache
  - Installing zendframework/zend-feed (2.8.0) Loading from cache
  - Installing zendframework/zend-diactoros (1.4.0) Loading from cache
  - Installing symfony/validator (v2.8.22) Loading from cache
  - Installing symfony/serializer (v2.8.22) Loading from cache
  - Installing symfony/routing (v2.8.22) Loading from cache
  - Installing symfony/psr-http-message-bridge (v1.0.0) Loading from cache
  - Installing symfony/polyfill-iconv (v1.4.0) Loading from cache
  - Installing symfony/http-kernel (v2.8.22) Loading from cache
  - Installing symfony/polyfill-apcu (v1.4.0) Loading from cache
  - Installing symfony/class-loader (v2.8.22) Loading from cache
  - Installing symfony-cmf/routing (1.4.1) Loading from cache
  - Installing stack/builder (v1.0.4) Loading from cache
  - Installing paragonie/random_compat (v2.0.10) Loading from cache
  - Installing masterminds/html5 (2.2.2) Loading from cache
  - Installing egulias/email-validator (1.2.14) Loading from cache
  - Installing easyrdf/easyrdf (0.9.1) Loading from cache
  - Installing doctrine/inflector (v1.1.0) Loading from cache
  - Installing doctrine/cache (v1.6.1) Loading from cache
  - Installing doctrine/common (v2.7.2) Loading from cache
  - Installing composer/semver (1.4.2) Loading from cache
  - Installing asm89/stack-cors (1.1.0) Loading from cache
  - Installing drupal/core (8.3.4) Loading from cache
  - Installing phpdocumentor/reflection-docblock (2.0.5) Loading from cache
  - Installing pear/console_table (v1.3.0) Loading from cache
  - Installing consolidation/output-formatters (3.1.10) Loading from cache
  - Installing consolidation/annotated-command (2.4.8) Loading from cache
  - Installing drush/drush (8.1.12) Loading from cache
  - Installing symfony/browser-kit (v3.3.2) Loading from cache
  - Installing fabpot/goutte (v3.2.1) Loading from cache
  - Installing behat/mink (v1.7.1) Loading from cache
  - Installing behat/mink-browserkit-driver (v1.3.2) Loading from cache
  - Installing behat/mink-goutte-driver (v1.2.1) Loading from cache
  - Installing jcalderonzumba/gastonjs (v1.0.3) Loading from cache
  - Installing jcalderonzumba/mink-phantomjs-driver (v0.3.3) Loading from cache
  - Installing mikey179/vfsstream (v1.6.4) Loading from cache
  - Installing sebastian/version (1.0.6) Loading from cache
  - Installing sebastian/global-state (1.1.1) Loading from cache
  - Installing sebastian/recursion-context (1.0.5) Loading from cache
  - Installing sebastian/exporter (1.2.2) Loading from cache
  - Installing sebastian/environment (1.3.8) Loading from cache
  - Installing sebastian/diff (1.4.3) Loading from cache
  - Installing sebastian/comparator (1.2.4) Loading from cache
  - Installing doctrine/instantiator (1.0.5) Loading from cache
  - Installing phpunit/php-text-template (1.2.1) Loading from cache
  - Installing phpunit/phpunit-mock-objects (2.3.8) Loading from cache
  - Installing phpunit/php-timer (1.0.9) Loading from cache
  - Installing phpunit/php-file-iterator (1.4.2) Loading from cache
  - Installing phpunit/php-token-stream (1.4.11) Loading from cache
  - Installing phpunit/php-code-coverage (2.2.4) Loading from cache
  - Installing phpspec/prophecy (v1.7.0) Loading from cache
  - Installing phpunit/phpunit (4.8.36) Loading from cache
symfony/var-dumper suggests installing ext-symfony_debug ()
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
alchemy/zippy suggests installing guzzle/guzzle (To use the GuzzleTeleporter with Guzzle 3)
zendframework/zend-feed suggests installing zendframework/zend-cache (Zend\Cache component, for optionally caching feeds between requests)
zendframework/zend-feed suggests installing zendframework/zend-db (Zend\Db component, for use with PubSubHubbub)
zendframework/zend-feed suggests installing zendframework/zend-http (Zend\Http for PubSubHubbub, and optionally for use with Zend\Feed\Reader)
zendframework/zend-feed suggests installing zendframework/zend-servicemanager (Zend\ServiceManager component, for easily extending ExtensionManager implementations)
zendframework/zend-feed suggests installing zendframework/zend-validator (Zend\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent)
symfony/validator suggests installing symfony/intl ()
symfony/validator suggests installing symfony/property-access (For using the 2.4 Validator API)
symfony/serializer suggests installing symfony/property-access (For using the ObjectNormalizer.)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
easyrdf/easyrdf suggests installing ml/json-ld (~1.0)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
drush/drush suggests installing ext-pcntl (*)
drush/drush suggests installing drush/config-extra (Provides configuration workflow commands, such as config-merge.)
behat/mink suggests installing behat/mink-selenium2-driver (slow, but JS-enabled driver for any app (requires Selenium2))
behat/mink suggests installing behat/mink-zombie-driver (fast and JS-enabled headless driver for any app (requires node.js))
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files
 Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100% Downloading: 100%Creating services cache file: /var/www/drupal-new/vendor/drupal/console/extend.console.uninstall.services.yml
> DrupalProject\composer\ScriptHandler::createRequiredFiles
Create a sites/default/settings.php file with chmod 0666
Create a sites/default/files directory with chmod 0777
www-data@089a518aa56b:~$ mv drupal-new/* drupal
www-data@089a518aa56b:~$ mv drupal-new/.* drupal
mv: inter-device move failed: 'drupal-new/.' to 'drupal/.'; unable to remove target: Invalid argument
mv: cannot remove 'drupal-new/..': Is a directory
www-data@089a518aa56b:~$ ls drupal
LICENSE  README.md  composer.json  composer.lock  drush  phpunit.xml.dist  scripts  vendor  web
www-data@089a518aa56b:~$ ls drupal -a
.   .DS_Store	.travis.yml  README.md	    composer.lock  phpunit.xml.dist  vendor
..  .gitignore	LICENSE      composer.json  drush	   scripts	     web
www-data@089a518aa56b:~$ rm drupal/.DS_Store 
www-data@089a518aa56b:~$ ls -a drupal-new/
.  ..
www-data@089a518aa56b:~$ rm -r drupal-new/
www-data@089a518aa56b:~$ cd drupal/
www-data@089a518aa56b:~/drupal$ ls
LICENSE  README.md  composer.json  composer.lock  drush  phpunit.xml.dist  scripts  vendor  web
www-data@089a518aa56b:~/drupal$ composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.3.2 2017-01-27 18:23:41

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  about            Short information about Composer
  archive          Create an archive of this composer package
  browse           Opens the package's repository URL or homepage in your browser.
  clear-cache      Clears composer's internal package cache.
  clearcache       Clears composer's internal package cache.
  config           Set config options
  create-project   Create new project from a package into given directory.
  depends          Shows which packages cause the given package to be installed
  diagnose         Diagnoses the system to identify common errors.
  drupal-scaffold  Run the drupal-scaffold script as defined in composer.json.
  dump-autoload    Dumps the autoloader
  dumpautoload     Dumps the autoloader
  exec             Execute a vendored binary/script
  global           Allows running commands in the global composer dir ($COMPOSER_HOME).
  help             Displays help for a command
  home             Opens the package's repository URL or homepage in your browser.
  info             Show information about packages
  init             Creates a basic composer.json file in current directory.
  install          Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
  licenses         Show information about licenses of dependencies
  list             Lists commands
  outdated         Shows a list of installed packages that have updates available, including their latest version.
  prohibits        Shows which packages prevent the given package from being installed
  remove           Removes a package from the require or require-dev
  require          Adds required packages to your composer.json and installs them
  run-script       Run the scripts defined in composer.json.
  search           Search for packages
  self-update      Updates composer.phar to the latest version.
  selfupdate       Updates composer.phar to the latest version.
  show             Show information about packages
  status           Show a list of locally modified packages
  suggests         Show package suggestions
  update           Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.
  validate         Validates a composer.json and composer.lock
  why              Shows which packages cause the given package to be installed
  why-not          Shows which packages prevent the given package from being installed
www-data@089a518aa56b:~/drupal$ composer require drupal/data drupal/sqlsrv
Using version ^1.0@alpha for drupal/data
Using version ^2.11 for drupal/sqlsrv
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing drupal/data (1.0.0-alpha2) Loading from cache
  - Installing drupal/sqlsrv (2.11.0) Loading from cache
Writing lock file
Generating autoload files
Removing services cache file:/var/www/drupal/vendor/drupal/console/extend.console.uninstall.services.yml
Creating services cache file: /var/www/drupal/vendor/drupal/console/extend.console.uninstall.services.yml
> DrupalProject\composer\ScriptHandler::createRequiredFiles
www-data@089a518aa56b:~/drupal$ 

iBobik avatar Jul 03 '17 18:07 iBobik

Not sure if "." is even possible with composer create-project. You are using composer 1.3.2, maybe you could try it again the latest release (1.4.x).

webflo avatar Jul 13 '17 20:07 webflo

Updated and it works the same.

iBobik avatar Jul 13 '17 22:07 iBobik

@iBobik have you ever found a solution? Experiencing the exact same issues.

soniCaH avatar Oct 31 '17 10:10 soniCaH

Hi, I am do not remember.

I use it in this project and how-to in readme there works. Try it: https://github.com/iBobik/drupal-composer-docker

iBobik avatar Oct 31 '17 14:10 iBobik

For future reference:

It started working locally when I removed caps from my path (or moved the project to a case-sensitive volume on mac):

  • ~/Sites/project : fails
  • ~/project : works
  • /Volumes/case-sensitive-volume/project : works

soniCaH avatar Nov 02 '17 11:11 soniCaH

I'm getting this error on a Windows machine.

matthewboman avatar Dec 06 '17 18:12 matthewboman

Also does not work when adding a relative path to the creation directory. So using ../some-directory breaks the path for the autoload.php file location.

There are other tickets about this, but none of them make this connection.

My workaround is to just create the project in a subdirectory, them move the subdirectory where you need it.

Wylbur avatar Mar 10 '18 21:03 Wylbur