Skip to content

Conversation

@bibumathew
Copy link

Fixed marshalling when developer provides magento-root-dir in composer.json file

maksek pushed a commit that referenced this pull request Nov 19, 2014
Fix : magento-root-dir provided via composer.json
@maksek maksek merged commit 5d7e846 into magento:master Nov 19, 2014
okorshenko pushed a commit that referenced this pull request Jan 26, 2016
…-to-201

MAGETWO-48256: [Github] Upgrade from 2.0.0 to 2.0.1 fails
convenient added a commit to convenient/magento-composer-installer that referenced this pull request Oct 16, 2020
We had a project fail to composer install with the following error
```
PHP Warning: Uncaught Exception: Warning: require(/var/www/vhosts/example.com/staging/releases/1602858012/setup/config/application.config.php): failed to open stream: No such file or directory in /var/www/vhosts/example.com/staging/releases/1602858012/vendor/magento/framework/Console/Cli.php on line 78 in /var/www/vhosts/example.com/staging/releases/1602858012/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 /var/www/vhosts/example.com/staging/releases/1602858012/vendor/magento/framework/Console/Cli.php(78): Magento\Framework\App\ErrorHandler->handler(2, 'require(/var/ww...', '/var/www/vhosts...', 78, Array)
#1 /var/www/vhosts/example.com/staging/releases/1602858012/vendor/magento/framework/Console/Cli.php(78): require()
magento#2 /var/www/vhosts/example.com/staging/releases/1602858012/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI')
magento#3 {main}
thrown in /var/www/vhosts/example.com/staging/releases/1602858012/vendor/magento/framework/App/ErrorHandler.php on line 61
```

When debugging i could see that a lot of the files from `magento/magento2-base` had not been copied over. I can see an error produced when running with `-vvv`
```
start magento deploy via deployManager
start magento deploy for magento/magento2-base
mkdir(): File exists
start magento deploy for magento/magento2-base
mkdir(): File exists
start magento deploy for magento/magento2-ee-base
jump over deployLibraries as no Magento libraryPath is set
```

I debugged and the issue was that previously on our NFS we had no `pub/media/import` but now we have had one created. 

Now when magento tried to `composer install` it was trying to copy over https://github.com/magento/magento2/blob/2.4-develop/pub/media/import/.htaccess, it faced this `File exists` error and stopped copying over the remainder of the files silently.

I think `composer install` should fail loud and early in these scenarios, removing the error handling entirely allows the exception to bubble up.

Any feedback appreciated
mmansoor-magento pushed a commit that referenced this pull request Dec 17, 2020
MC-39996: Add composer2 support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants