Magento-lts: Remove PEAR and Magento Connect Manager?

Created on 15 Feb 2020  路  12Comments  路  Source: OpenMage/magento-lts

Do not kill me, this is a question/suggestion, it's time to remove PEAR, no?

There is a comment: PHP versions 4 and 5
And PEAR was used only for magento connect 1, no?

./app/code/core/Mage/Install/Model/Installer/Pear.php
./lib/PEAR
./lib/PEAR/PEAR.php
./lib/PEAR/PEAR
./lib/PEAR/PEAR/PEAR.php
./lib/PEAR/PEAR/PEAR5.php
./lib/Varien/Pear.php
./lib/Varien/Pea

Most helpful comment

as this was mostly used for the downloader, and most connect modules are not available over the downloader anyway, yes. Its time to remove this part

All 12 comments

To my knowledge there is no good reason to keep it. I also agree we should remove as much unused code as possible.

as this was mostly used for the downloader, and most connect modules are not available over the downloader anyway, yes. Its time to remove this part

Added PR #952 - needs testing

Cool! Even if you are removing the downloader directory.
Perhaps I'm the last people around the world that use it.

Do you want/expect to use it somehow after Magento 1 EOL date?

I using it with my custom magento connect url for my modules (for info lnk1 lnk2 lnk3 lnk4 lnk5 lnk6). But, if it is the end of this tool, why not. I will must search a new way to package my modules.

Thanks for the context, Luigi. The way I see it is that the downloader code contains thousands and thousands of lines of code that will get very little use and does very dangerous stuff like writing source code files. I strongly believe that package management should happen offline and not through a GUI.

Composer is the defacto replacement now for managing packages so one option is to remove downloader entirely and push everyone to Composer. Removing downloader won't break packages that have already been downloaded.

I suppose another option would be to just remove the UI code that lets you use downloader via the UI so you can still use it through the command line, but honestly I don't know this code well at all and not sure if any of us do and would just feel a lot safer removing it.

I'd love to get more thoughts and ideas from others though.

My POV:

  • we should direct people to use composer (or if its not possible, modman at last, but I think migration to composer would be easier for connect packages as the installer can understand the connect manifest file)
  • so it would be nice to have some docs how to set it up and migrate
    @luigifab I think we can guide you through the process of migration to composer, and then we will ask you to describe the steps so we can include it in the docs.
    This sounds like a win-win to me.

And for all people with basics stores that installs and updates plugins and core with the Magento Downloader?
If you remove this, i think a backend UI is needed to let people do these actions without writing code or access via SSH for composer or modman.

I tried things. I have created an empty directory with a composer.json with:

{
    "require": {
        "aydin-hassan/magento-core-composer-installer": "*",
        "openmage/magento-lts": "^19.4"
    },
    "extra": {
        "magento-core-package-type": "magento-source",
        "magento-root-dir": "htdocs"
    }
}

Then I launched: composer install

Then I created a composer.json for my module, and I published the module to packagist.org (so easy, I just used the github link). Here is my composer.json for my module (I'm not 100% sure):

{
    "type": "magento-module",
    "name": "luigifab/testcomposer",
    "description": "My module for Openmage and Magento.",
    "license": "GPL-2.0-or-later",
    "authors": [
        {
            "name": "Me",
            "email": "me"
        }
    ],
    "require": {
        "php": ">=7.2.0",
        "openmage/magento-lts": ">=19.4.0"
    },
    "minimum-stability": "dev",
    "extra": {
        "map": [
            ["app/locale/fr_FR/Luigifab_Paypalrefund.csv", "app/locale/fr_FR/Luigifab_Paypalrefund.csv"],
            ["app/etc/modules/Luigifab_Paypalrefund.xml", "app/etc/modules/Luigifab_Paypalrefund.xml"],
            ["app/code/community/Luigifab/Paypalrefund/", "app/code/community/Luigifab/Paypalrefund/"]
        ]
    }
}

Then I launched: composer require luigifab/testcomposer
And :tada: I see links in the htdocs directory to my module.

Is it good?

@luigifab that looks great for people authoring new extensions or updating them in the future, but I think we'd like to somehow be able to install extensions from a zip archive that was created using the package manager.

Which begs the question.. perhaps we should keep the capability of creating a zip archive package using ./mage package ./var/connect/package.xml.. Can anyone test this easily?

I do not use it, but @luigifab connect example looks goods. If it is used by someone, i'd keep it. Maybe split this PR?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

astyczen picture astyczen  路  4Comments

seansan picture seansan  路  6Comments

tmotyl picture tmotyl  路  3Comments

ioweb-gr picture ioweb-gr  路  6Comments

Flyingmana picture Flyingmana  路  7Comments