Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PEAR and Magento Connect Manager? #903

Closed
luigifab opened this issue Feb 15, 2020 · 12 comments · Fixed by #952
Closed

Remove PEAR and Magento Connect Manager? #903

luigifab opened this issue Feb 15, 2020 · 12 comments · Fixed by #952

Comments

@luigifab
Copy link
Contributor

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

@colinmollenhour
Copy link
Member

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

@Flyingmana
Copy link
Contributor

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

@colinmollenhour
Copy link
Member

Added PR #952 - needs testing

@luigifab
Copy link
Contributor Author

luigifab commented May 6, 2020

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

@colinmollenhour
Copy link
Member

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

@luigifab
Copy link
Contributor Author

luigifab commented May 12, 2020

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.

@colinmollenhour
Copy link
Member

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.

@tmotyl
Copy link
Contributor

tmotyl commented May 13, 2020

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.

@simbus82
Copy link
Contributor

simbus82 commented May 21, 2020

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.

@luigifab
Copy link
Contributor Author

luigifab commented Jun 9, 2020

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 🎉 I see links in the htdocs directory to my module.

Is it good?

@luigifab luigifab changed the title Remove PEAR? Remove PEAR and Magento Connect Manager? Jun 9, 2020
@colinmollenhour
Copy link
Member

@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?

@sreichel
Copy link
Contributor

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?

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 a pull request may close this issue.

6 participants