0

I followed the upgrade instruction:

composer require magento/product-enterprise-edition 2.1.1 --no-update

composer update

Then I get this error message:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package magento/product-enterprise-edition could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

In my case git was only used to clone Magento2 repo for the installation purpose, and it was really quick and easy. However I didn't realise the issue afterwards that I'm unable to upgrade my Magento2.

I did try to setup git and I forked a copy of magento2 repo to use it as my remote origin. But because I'm very limited in git, things get worse and worse, and I messed up my whole local code base, had to restore it via a backup copy.

After all the hassle I wish I never used git for the start, is it possible to upgrade Magento without using git at all (although it was installed by git)?

0

Disclaimer: Kandy's answer is the way to go here.

Just in case you want to stick to git, you can checkout to the release tag e.g. 2.1.1.

Fetch remote tags:

git fetch --tags

Checkout to preferred tag:

git checkout 2.1.1

Then follow default procedure when upgrading:

bin/magento cache:flush
bin/magento setup:upgrade
bin/magento setup:static-content:upgrade 
  • I was able to upgrade to 2.1.1, however I notice it wiped out my app/code folder, so it basically did the same thing as I initially followed KAndy's solution. I had to copy all my theme and module files from backup. Before I git checkout 2.1.1, I created a .gitignore file and added ignored files (see: github.com/magento/magento2-community-edition/blob/master/…). Should I git commit and push my local repo to remote repo, then do git checkout 2.1.1? – Ethan Wan Sep 26 '16 at 15:01
  • After all I was able to enable my theme and once I deploy static content, the whole theme come back but still looks broken. I tend to believe that the theme is not compatible with 2.1.1 maybe? So I reckon this issue has been resolved thanks to KAndy and Timon! Also this thread helped me to get started with composer and git (inviqa.com/blog/magento-2-tutorial-how-install-composer) – Ethan Wan Sep 26 '16 at 15:06
0

For you it will be like new installation. Follow this steps:

  • Create backup.
  • move you Magento root folder to some tmp
  • run composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition <installation directory name> 2.1.1
  • copy app/etc/*, media/* form tmp to new installation
  • run bin/magento setup:upgrade
  • done
  • Thanks for your suggestion, I followed your steps and I can install 2.1.1. Because I also have custom theme and modules, I had to copy them across. However, my front end looks broken. I cleared the cache, removed generated files, etc and still couldn't get my site fully recovered. Is this because the database issue since we simply switch the database to the old one by updating etc/*? – Ethan Wan Sep 25 '16 at 5:11
  • Also when I tried to view a product page, I get error: Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\App\RequestSafetyInterface in /var/www/public_html/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93 Stack trace: #0 – Ethan Wan Sep 25 '16 at 5:13
  • try cleanup var/generate folder and rerun static deployment tool. Also maybe you need rerun composer dump-auoload – KAndy Sep 25 '16 at 12:38
  • what does composer dump-autoload actually do? – Ethan Wan Sep 26 '16 at 14:53
  • Any luck with dump-autoload or anything else? I have the same problem with that Fatal Error: Uncaught Error: Cannot instantiate interface Magento\\Framework\\App\\RequestSafetyInterface in /var/www/mymagento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:73 – Timo.Klement Nov 4 '16 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.