composer require magento/product-community-edition 2.2.3 --no-update
composer update
php bin/magento setup:upgrade
I get "Could not open input file: bin/magento"
Below is a log of what happend
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 30 updates, 0 removals
- Updating tedivm/jshrink (v1.2.0 => v1.3.0): Downloading (100%)
- Updating magento/framework (101.0.2 => 101.0.3): Downloading (100%)
- Updating magento/module-config (101.0.2 => 101.0.3): Downloading (100%)
- Updating magento/module-variable (100.2.1 => 100.2.2): Downloading (100%)
- Updating magento/module-backend (100.2.2 => 100.2.3): Downloading (100%)
- Updating magento/module-ui (101.0.2 => 101.0.3): Downloading (100%)
- Updating magento/module-eav (101.0.1 => 101.0.2): Downloading (100%)
- Updating magento/module-catalog (102.0.2 => 102.0.3): Downloading (100%)
- Updating magento/module-theme (100.2.2 => 100.2.3): Downloading (100%)
- Updating magento/module-customer (101.0.2 => 101.0.3): Downloading (100%)
- Updating magento/module-tax (100.2.2 => 100.2.3): Downloading (100%)
- Updating magento/module-reports (100.2.2 => 100.2.3): Downloading (100%)
- Updating magento/module-shipping (100.2.2 => 100.2.3): Downloading (100%)
- Updating magento/module-cms (102.0.2 => 102.0.3): Downloading (100%)
- Updating magento/module-import-export (100.2.2 => 100.2.3): Downloading (100%)
- Updating magento/module-directory (100.2.1 => 100.2.2): Downloading (100%)
- Updating magento/module-checkout (100.2.2 => 100.2.3): Downloading (100%)
- Updating magento/module-downloadable (100.2.1 => 100.2.2): Downloading (100%)
- Updating magento/module-newsletter (100.2.1 => 100.2.2): Downloading (100%)
- Updating magento/module-review (100.2.2 => 100.2.3): Downloading (100%)
- Updating magento/module-backup (100.2.1 => 100.2.2): Downloading (100%)
- Updating magento/module-usps (100.2.0 => 100.2.1): Downloading (100%)
- Updating magento/module-configurable-product (100.2.2 => 100.2.3): Downloading (100%)
- Updating braintree/braintree_php (3.25.0 => 3.27.0): Downloading (100%)
- Updating magento/module-braintree (100.2.2 => 100.2.3): Downloading (100%)
- Updating ramsey/uuid (3.7.1 => 3.7.3): Downloading (100%)
- Updating tubalmartin/cssmin (v4.1.0 => v4.1.1): Downloading (100%)
- Updating colinmollenhour/cache-backend-redis (1.10.2 => 1.10.4): Downloading (100%)
- Updating magento/magento2-base (2.2.2 => 2.2.3): Downloading (100%)
Package sjparkinson/static-review is abandoned, you should avoid using it. Use phpro/grumphp instead.
Writing lock file
Generating autoload files
> php bin/magento setup:upgrade
Could not open input file: bin/magento
When I look it seems as though both files (.htaccess and magento) have been deleted.
@jamie-selesti , thank you for your report.
We were not able to reproduce this issue by following the steps you provided. Please provide more detailed steps to reproduce or try to reproduce this issue on a clean installation or latest release.
@jamie-selesti
I think there is file permission issue, change file permission to execute on {{magento root}}/bin/magento file
@anant-svc: no it's not, because he's using the php binary, that one should be executable in this context, not the script itself, only if you execute bin/magento without the php binary, it should be executable. And Magento already forces this to happen, because in the file vendor/magento/magento2-base/composer.json, we find something like this:
"chmod": [
{
"mask": "0755",
"path": "bin/magento"
}
]
This is just FYI, but thanks for the input! :)
Anyway, @jamie-selesti: the best way to resolve this, is to remove your installed composer dependencies and re-install them, for example, like this:
rm -R vendor/*
composer install
My guess is that something went wrong during the composer upgrade, and the post installation hooks (which copy files from the vendor directory to the root directory of the project) didn't fire for some reason, which caused this problem.
@jamie-selesti, we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.
Does anyone have the solution?
I think my issue is relating to the post-autoload-dump. If I remove these from the composer file then the upgrade works as expected
"scripts": {
"post-autoload-dump": ["php bin/magento setup:upgrade", "php bin/magento cache:flush"],
}
Most helpful comment
@anant-svc: no it's not, because he's using the
phpbinary, that one should be executable in this context, not the script itself, only if you executebin/magentowithout thephpbinary, it should be executable. And Magento already forces this to happen, because in the filevendor/magento/magento2-base/composer.json, we find something like this:This is just FYI, but thanks for the input! :)
Anyway, @jamie-selesti: the best way to resolve this, is to remove your installed composer dependencies and re-install them, for example, like this:
My guess is that something went wrong during the composer upgrade, and the post installation hooks (which copy files from the vendor directory to the root directory of the project) didn't fire for some reason, which caused this problem.