Universal extension installer for Magento 2, see introductory blog post here

Overview

ExtDN Installer for Magento 2 modules

Installer in Action

The installation of extensions for Magento 2 has a few scenarios to cover depending on your starting position (Magento mode being the most influential). A typical installation routine includes 5 or more steps.

The ExtDN installer aims to bring down the installation steps required to just 1 covering a wide range of extension sources and Magento installs. The installer starts with a range of checks to confirm that the installation is likely to succeed:

List of checks

  • Installation is into a Magento 2 instance
  • Files are writable by the current user
  • Installation is run by the current user
  • No outstanding Composer actions
  • Valid project composer.json
  • No outstanding Module installation
  • Confirmation for installation in production mode instances

Should I use this?

Do you have an existing deployment or development process for M2 extension installations? If yes you likely do not benefit from this installer, if no please read on.

How to use

Option 1 - Oneliner

This option is likely provided by an ExtDN member and allows the installation of your extension via just 1 command. Below are some examples for this.

Oneliner Installation from packagist or Marketplace

(essentially all previously pre-configured composer repositories)

sh -ic "$(curl -sS https://raw.githubusercontent.com/extdn/installer-m2/master/bin/oneliner.sh)" -- install fooman/emailattachments-m2:^3.0

Oneliner Installation from Github

sh -ic "$(curl -sS https://raw.githubusercontent.com/extdn/installer-m2/master/bin/oneliner.sh)"  -- --template=github --repo-url=https://github.com/fooman/emailattachments-m2.git install fooman/emailattachments-m2:^3.0 

Oneliner Installation from Fooman Repo

sh -ic "$(curl -sS https://raw.githubusercontent.com/extdn/installer-m2/master/bin/oneliner.sh)"  -- --template=fooman --repo-url=https://customer-repos.fooman.co.nz/URL-PRIVATE_TOKEN install fooman/emailattachments-m2:^3.0 

Option 2 - Phar

Download and save the ExtDN_Installer. Ensure it is executable with chmod +x extdn_installer.phar.

Phar Installation from packagist or Marketplace

(essentially all previously pre-configured composer repositories)

./extdn_installer.phar -- install fooman/emailattachments-m2:^3.0

Phar Installation from Github

./extdn_installer.phar --template=github --repo-url=https://github.com/fooman/emailattachments-m2.git -- install fooman/emailattachments-m2:^3.0 

Phar Installation from Fooman Repo

./extdn_installer.phar --template=fooman --repo-url=https://customer-repos.fooman.co.nz/URL-PRIVATE_TOKEN -- install fooman/emailattachments-m2:^3.0 

Vendor agnostic

The installer is open to a wide range of sources to install from and is not limited to any specific vendor (nor is ExtDN membership needed). Your package could be available via packagist.org, Marketplace (repo.magento.com) or Github. Further it will work for any other vendor that supplies their packages via a composer repository url. Simply supply your vendor name in the --template argument and provide the repository url via --repo-url. If your installation is not covered feel free to open a PR that provides a new template.

Limitations

The installer compares the list of modules before and after installing the extension code to determine which Magento module(s) to enable. This does not work if the just installed extension was previously installed and is still present in the app/etc/config.php file as disabled. The error in this case would be "No new modules detected."

If installation is performed in production mode and an error is encountered the site will remain in developer mode.

No Windows support - see #5

Comments
  • Undefined method exitWithError

    Undefined method exitWithError

    $ ./extdn_installer.phar install kiwicommerce/module-admin-activity
    ➜          
     ______      _   _____  _   _   _____           _        _ _           
    |  ____|    | | |  __ \| \ | | |_   _|         | |      | | |          
    | |__  __  _| |_| |  | |  \| |   | |  _ __  ___| |_ __ _| | | ___ _ __ 
    |  __| \ \/ / __| |  | | . ` |   | | | '_ \/ __| __/ _` | | |/ _ \ '__|
    | |____ >  <| |_| |__| | |\  |  _| |_| | | \__ \ || (_| | | |  __/ |   
    |______/_/\_\__|_____/|_| \_| |_____|_| |_|___/\__\__,_|_|_|\___|_|   
    ➜  Running ExtDN Installer 
     [ExtDN\Task\CheckMagentoRoot] Checking that we are running in the correct folder.
     [ExtDN\Task\CheckMagentoRoot] [OK]
     [ExtDN\Task\CheckPermissions] Checking current user.
     [ExtDN\Task\CheckPermissions] [OK]
     [ExtDN\Task\CheckPermissions] Checking file ownership.
    PHP Fatal error:  Uncaught Error: Call to undefined method ExtDN\Task\CheckPermissions::exitWithError() in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php:72
    Stack trace:
    #0 phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php(17): ExtDN\Task\CheckPermissions->checkForSufficientPermissions()
    #1 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Collection/CollectionBuilder.php(590): ExtDN\Task\CheckPermissions->run()
    #2 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Collection/CollectionBuilder.php(574): Robo\Collection\CollectionBuilder->runTasks()
    #3 phar:///data/clientname/magento2/extdn_installer.phar/src/Command/Installer.php(59): Robo\Collection\CollectionBuilder->run()
    #4 [internal function]: ExtDN\Command\Installer->install('kiwicommerce/mo...', Array)
    #5 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_us in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php on line 72
    
    Fatal error: Uncaught Error: Call to undefined method ExtDN\Task\CheckPermissions::exitWithError() in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php on line 72
    
    Error: Call to undefined method ExtDN\Task\CheckPermissions::exitWithError() in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php on line 72
    
    Call Stack:
        0.0073     855808   1. {main}() /data/clientname/magento2/extdn_installer.phar:0
        0.0074     853528   2. require('phar:///data/clientname/magento2/extdn_installer.phar/bin/extdn_installer') /data/clientname/magento2/extdn_installer.phar:10
        0.0102    1254544   3. Robo\Runner->execute() phar:///data/clientname/magento2/extdn_installer.phar/bin/extdn_installer:32
        0.0153    2081576   4. Robo\Runner->run() phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Runner.php:155
        0.0345    4440856   5. Robo\Application->run() phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Runner.php:233
    
    ERROR: Uncaught Error: Call to undefined method ExtDN\Task\CheckPermissions::exitWithError() in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php:72
    Stack trace:
    #0 phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php(17): ExtDN\Task\CheckPermissions->checkForSufficientPermissions()
    #1 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Collection/CollectionBuilder.php(590): ExtDN\Task\CheckPermissions->run()
    #2 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Collection/CollectionBuilder.php(574): Robo\Collection\CollectionBuilder->runTasks()
    #3 phar:///data/clientname/magento2/extdn_installer.phar/src/Command/Installer.php(59): Robo\Collection\CollectionBuilder->run()
    #4 [internal function]: ExtDN\Command\Installer->install('kiwicommerce/mo...', Array)
    #5 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_us 
    in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php:72
    
    
    bug 
    opened by peterjaap 5
  • Magento project check fails

    Magento project check fails

    I get this error

    [ExtDN\Task\CheckComposerIssues] Checking for supported Magento projects [ExtDN\Task\CheckComposerIssues] This does not look like a supported Magento project. [ExtDN\Task\CheckComposerIssues] Exit code 1 [notice] Stopping on fail. Exiting....

    because my composer.json does not have these https://github.com/extdn/installer-m2/blob/4087a50fcff89000bc838b8683d74eab77d53f9c/src/Task/CheckComposerIssues.php#L71-L75

    Steps to replicate:

    1. Install Magento 2 from https://github.com/magento/magento2
    2. Install an extension sh -ic "$(curl -sS https://raw.githubusercontent.com/extdn/installer-m2/master/bin/oneliner.sh)" -- install fooman/printorderpdf-m2:^3.0
    opened by chikoi 4
  • Detecting deployment mode properly

    Detecting deployment mode properly

    Currently, the MAGE_MODE environment variable is used for detecting the current mode (if I'm not mistaken). In my personal environments, I don't use this variable but simply rely on the right variable in app/etc/env.php.

    opened by jissereitsma 1
  • Remove some console output

    Remove some console output

    For a few of the commands (especially the Composer commands) we get quite a bit of output that is creating unnecessary noise. We should be able to filter out what is a.) expected and b.) not important.

    For example the Composer warning of using a version specific constraint (as that is what Magento uses).

    enhancement help wanted good first issue 
    opened by fooman 0
  • No Windows Support

    No Windows Support

    For now the installer is untested on Windows and will likely fail. We'll keep a list of items to consider here:

    1. oneliner uses bash
    2. we use find to perform some checks
    3. we use some of the posix functions (posix_geteuid() and posix_getpwuid())
    enhancement help wanted 
    opened by fooman 0
  • Travis only tests retroactively

    Travis only tests retroactively

    Currently Travis tests the oneliner execution for packagist/github installs. During this we have a hard reference back to the phar file as currently on the master branch. Ideally we would be able to

    • build the phar via composer run-script package-phar
    • and then test that phar
    enhancement help wanted 
    opened by fooman 0
Owner
ExtDN
We are a network of leading Magento extension developers who share a common vision for a thriving Magento ecosystem with the merchant's success at heart.
ExtDN
Magento 2 Blog Extension is a better blog extension for Magento 2 platform. These include all useful features of Wordpress CMS

Magento 2 Blog extension FREE Magento 2 Better Blog by Mageplaza is integrated right into the Magento backend so you can manage your blog and your e-c

Mageplaza 113 Dec 14, 2022
Textpattern-installer - Textpattern plugin and theme installer for Composer

Textpattern Installer for Composer Package directory | Issues Install plugins and themes to Textpattern CMS with Composer. $ composer require rah/rah_

Jukka Svahn 7 Apr 14, 2022
School stuff, nothing to see here

Come importare/aggiornare i dati su altervista Scaricare la repo (Code > Download as ZIP) Estrai lo zip In database_backup tasto destro su dantoniog.s

Kryotek 3 Dec 18, 2021
Magento 2 Blog Extension - FREE, fully featured, powerful Blog solution for your online store!

Blog MX | Magento 2 Blog Module by Mirasvit FREE, fully featured, powerful Blog solution for your online store! Magento 2 Blog MX allows you to open a

Mirasvit 71 Dec 7, 2022
Magento 2 Blog is an extension that allows you to manage your store and blog

Magento 2 Blog Extension by Magefan Magento 2 Blog is an extension that allows you to manage your store and blog from one place without having to rely

Magefan 243 Dec 21, 2022
A Magento 2 dashboard to display installed extensions. Read the blog post on some of the thinking behind it:

Extension Dashboard for Magento 2 This module adds a dashboard to review all installed extensions in the Magento admin (Magento 2.3.0+ for now only).

ExtDN 36 Dec 24, 2022
It is a simple blog application coded with PHP, HTML, CSS. You can develop, edit. You can see it as a skeleton. ⚡

PHP-BLOG-SYSTEM Simple blog system Features Adding Text Update Text Text Deletion User Login and register Bootstrap Design Profile Page How to use blo

Selçuk 2 Aug 21, 2022
PHP Extension installer

pickle - PHP Extension installer Pickle installs PHP extensions easily on all platforms. Installation Grab the latest phar at https://github.com/Frien

null 1.6k Dec 27, 2022
OSX/Linux Docker containers installer for Magento 2

Magento 2 OSX/Linux Docker Requirements MacOS: Docker, docker-sync, Git Linux: Docker, Docker-compose, Git on Debian based OS (Example: Ubuntu, Linux

Osiozekhai Aliu 54 Dec 10, 2022
Flarum Post Comments - A Flarum extension.

Flarum Post Comments A Flarum extension. Make sure to comment on the answers and list the comments below the answers. Installation Install with compos

Selçuk Kılıç 2 Sep 22, 2022
Copy2cloud-server is a universal clipboard service

copy2cloud-server is a universal clipboard service.

Adem Ali Durmuş 6 Dec 15, 2022
Magento 2 Extension to cleanup admin menu and Store > Configuration area by arranging third party extension items.

Clean Admin Menu - Magento 2 Extension It will merge all 3rd party extension's menu items in backend's primary menu to a common menu item named "Exten

RedChamps 109 Jan 3, 2023
Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.

Laravel Blog Have you worked with Wordpress? Developers call this package wordpress-like laravel blog. Give our package a Star to support us ⭐ ?? Inst

Binshops 279 Dec 28, 2022
This is wegare tools but all-in-one installer only, exclude GUI

All In One Installer for Wegare Tools This is wegare tools, but this is all-in-one. Here is the source https://github.com/wegare123?tab=repositories I

Helmi Amirudin 3 Jul 29, 2022
An installer package that let's you install NodeJS and NPM as a Composer dependency.

NodeJS installer for Composer This is an installer that will download NodeJS and NPM and install them in your Composer dependencies. Installation is s

TheCodingMachine 106 Sep 30, 2022
Composer installer for PHP_CodeSniffer coding standards

PHP_CodeSniffer Standards Composer Installer Plugin This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards (r

Dealerdirect 462 Dec 22, 2022
pine - A CLI installer for timber

pine - A CLI installer for timber A CLI tool written in PHP based on symfony console to easily create a WordPress (Timber) project. Installation compo

Azeem Hassni 29 Aug 24, 2022