Closed Danieleeffe1 closed 2 years ago
You must install OpenMage with composer to allow auto update. In a new directory, create a composer.json file with:
{
"require": {
"aydin-hassan/magento-core-composer-installer": "*",
"openmage/magento-lts": "*"
},
"extra": {
"magento-core-package-type": "magento-source",
"magento-root-dir": "htdocs"
}
}
Then run: composer install --ignore-platform-reqs
or composer install
For upgrade, run: composer update --ignore-platform-reqs
or composer update
Thanks for the reply
sorry if I take advantage of your availability but I have a bit of confusion ...
with the code I pasted in the composer.json file (which is by default inside the magento root folder) and giving the command:
composer update
the system creates a "htdocs" folder
and copies mOpenMage version 20.0.7 into it.
What do I have to do now?
Why don't you update the root directly?
Is this process intentional?
If so, why?
There are different ways to install the code, and depending on how it is done, the update can be done in different ways. To update OpenMage via Composer, its best the code is also installed via composer first.
If downloaded direct form github, this puts openmage in as root, instead of dependency, which for composer is a different context, and composer is only able to update dependencies. Which is a point we should think about more, as its probably a good Idea, to provide a Download which contains OpenMage as a dependency, so it can be properly updated.
And we do not have much documentation about this, as most of our users work longer with it and have often already a certain process, or nowdays use primarily composer.
I hope this explains the "why".
To your options. You could change the install method by using composer to install OpenMage, but this is best done in a separate place and then copying your own code and configs into it.
The same would also work as an update method for your current approach, so you just download the new release, move all your configs and files into the new directory, and use this.
You could also use github to provide a .patch
or .diff
file for the update you want to do by constructing such an url https://github.com/OpenMage/magento-lts/compare/v20.0.6..v20.0.7.patch
You can probably then apply the file via the patch
command as described here: https://stackoverflow.com/a/3418499/716029
But I dont have much experience with this, and don know if this may cause other Issues.
Update: I apologize for my english, i use google translate.
I have finally updated OpenMage.
A suggestion given by my ignorance.
Here are the instructions for installing OpenMage ...:
Installation Using Composer Download the latest archive and extract it, clone the repository or add a composer dependency to your existing project like this:
composer requires openmage / magento-lts ":" ^ 19.4.0 " To get the latest changes use:
composer requires openmage / magento-lts ":" dev-main " Note: dev-main is just an alias for the current 1.9.4.x branch and can change
Well ...
In the downloadable package of OpenMage-lts-master there is already the file composer.json the correct code for the installation / update (except for the installation directory which is customized and mandatory).
It is not written anywhere that you have to copy / clone the composer.json file to the directory above where the OpenMage-lts-master zip file is unpacked. (I would say this is a rather important step for those unfamiliar with openmage / composer)
THEN from the top directory where openmage has been unpacked and the composer.json file copied (by entering the Magento OpenMage directory) you can start the composer instruction to install / update OpenMage.
let's assume the classic server / hosting with the classic folders
www / html
create openmage folder, then we will have:
www / html / openmage
Insert in it the file downloaded from OpenMage github Unzip the file Copy the composer.json file to www / html Edit with nano or vim (I use nano); nano composer.json search and change the following line from like this: "magento-root-dir": "htdocs" to so: "magento-root-dir": "openmage" save Start installation from terminal with composer: composer install if you need to update: composer update
Sometimes we tend to take for granted what is not obvious and to many of you it may seem stupid or useless or even annoying. and above all it is assumed that those who approach a software already have the basics, but this is not always the case .... for example:
There is nowhere written that it is necessary to have a server / hosting that allows you to have a terminal with the necessary permissions to use COMPOSER
That it is necessary to have a server / hosting that allows you to install / use REDIS and / or VARNISH and / or MEMCACHED if you want to have a performing OpenMage (and that in any case it is necessary to install the Lesty-FPC module in magento)
Nonsense for you, but not for everyone ...
closing since it's marked as solved by the opener, thank you!
Goodmorning everyone
I did a fresh install of open mage about 2 months ago.
I downloaded the LTS package from github.
I made the setup from the browser.
Now.....
How do you update OPENMAGE ????
If from the server terminal I type within the magento root directory and use composer and type the command:
"composer update"
It asks me for a "root" directory, which means? I am already in the "root" directory what should I do ???
if from the terminal I enter the command:
composer require openmage / magento-lts ":" ^ 19.4.0 "
terminal gives me back:
If I enter the command from the terminal:
composer require openmage / magento-lts ":" dev-main "
terminal gives me back:
How the hell do you update openmage ???
Thanks and sorry if this question seems trivial but reading the installation instructions I don't understand.
Update: I apologize for my english, i use google translate.
I have finally updated OpenMage.
A suggestion given by my ignorance.
Here are the instructions for installing OpenMage ...:
Installation Using Composer Download the latest archive and extract it, clone the repository or add a composer dependency to your existing project like this:
composer requires openmage / magento-lts ":" ^ 19.4.0 " To get the latest changes use:
composer requires openmage / magento-lts ":" dev-main " Note: dev-main is just an alias for the current 1.9.4.x branch and can change
Well ...
In the downloadable package of OpenMage-lts-master there is already the file composer.json the correct code for the installation / update (except for the installation directory which is customized and mandatory).
It is not written anywhere that you have to copy / clone the composer.json file to the directory above where the OpenMage-lts-master zip file is unpacked. (I would say this is a rather important step for those unfamiliar with openmage / composer)
THEN from the top directory where openmage has been unpacked and the composer.json file copied (by entering the Magento OpenMage directory) you can start the composer instruction to install / update OpenMage.
let's assume the classic server / hosting with the classic folders
www / html
create openmage folder, then we will have:
www / html / openmage
Insert in it the file downloaded from OpenMage github Unzip the file Copy the composer.json file to www / html Edit with nano or vim (I use nano); nano composer.json search and change the following line from like this: "magento-root-dir": "htdocs" to so: "magento-root-dir": "openmage" save Start installation from terminal with composer: composer install if you need to update: composer update
Sometimes we tend to take for granted what is not obvious and to many of you it may seem stupid or useless or even annoying. and above all it is assumed that those who approach a software already have the basics, but this is not always the case .... for example:
There is nowhere written that it is necessary to have a server / hosting that allows you to have a terminal with the necessary permissions to use COMPOSER
That it is necessary to have a server / hosting that allows you to install / use REDIS and / or VARNISH and / or MEMCACHED if you want to have a performing OpenMage (and that in any case it is necessary to install the Lesty-FPC module in magento)
Nonsense for you, but not for everyone ...