2017 © Pedro Peláez
 

magento2-module composerrepo

image

eadesignro/composerrepo

  • Monday, July 2, 2018
  • by eadesignro
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 26 Versions
  • 0 % Grown

The README.md

Magento 2 Composer Repository

Credits

  • We got inspired by https://github.com/Genmato.

Composer  Repository for Magento 2

  • This extension works as a Magento 2 private storage manager for extension developers who sell Magento 2 extensions and want to provide easy installation of the composer. Extension was originally implemented for Magento 1 by Genmato, but we adapted the code and made it available to Magento 2. The logic is very similar to the M1 module but we actually re created the extension.

Requirements:

  • Magento 2.x
  • Composer
  • Satis

How does it work

The extension  is using Satis, composer.json and packages (stored on the server). For each package ordered through the web shop it checks if the ordered products are M2 packages (based on product_id) and inserts this into the customer_packages table so that the user will have access to the purchased package. If there is no customer_auth key available one will be generated., (*1)

Here's how the extension works in the 3 steps outlined below:, (*2)

  1. With the auth key and secret the customer can install the package from the command file with Composer. For this Composer will request the packages.json from the repository. Based on the used key and secret the customer_id is checked for available packages and the output is built., (*3)

  2. When a download is requested it requests /composer/download/file/ with the parameters (m/[package_name]/h/[package_hash]/v/[normalized_version, again based on the used key and secret access to the file and version is checked, if allowed file is send from the [satis archive directory] to the user., (*4)

  3. Thru the notify-batch URL the installation of a package is recorded for the user (stores IP, Package, Version and User ID)., (*5)

Configuration:

Satis installation, (*6)

Install Satis outside of Magento Webroot, but accessible from the Magento web user. To install it, run the following command in your console:, (*7)

php bin/magento eadesign:composerrepo, (*8)

[path] → The place where you want to install the Satis directory., (*9)

NOTE !!!, (*10)

The Satis installation folder should not be accessible from the web. It is only used to collect composer's json files and to generate downloaded files., (*11)

Repository Configuration

After installation of the extension go to: Stores => Configuration => EADESIGN SETTINGS  =>  Composer Repo  and complete the following fields:, (*12)

[Configuration], (*13)

  • Repository name: This name is used for the composer config repositories (for example: Eadesign's repositories),, (*14)

  • Repository URL: The url that serves the Repository (for example: [  your domain ]/composer/packagist/index ),, (*15)

  • Include dev-master: Optionally enable the option to allow access to the dev-master package (disabled by default),
  • Update period: The period in months that user can get free updates to a newer release, when the period ends the user only has access to the versions release before. Not possible when dev-master is enabled, leave empty for unlimited updates,
  • Email Active: Yes or No.(By enabling this option, you can set when someone purchases a product from your store, also send installation instructions to the composer using the generated keys).

[Satis Configuration], (*16)

  • Satis command path: Path to the Satis executable (for example:  [ your project ]/satis/bin/satis ),, (*17)

  • Satis config path: Path to the satis.json configuration file (for example: [ your project ]/satis/satis.json ),, (*18)

  • Name: Repository name (used for satis.json),
  • Homepage URL: Repository URL (used for satis.json, example: [ your domain ]/composer/packagist/index ),
  • Output directory: Path the the Satis web directory (for example:  [ your project]/satis/web ),

[Satis Archive], (*19)

  • Format: Export format (zip or tar) of the packages (for example: zip), (*20)

  • Absolute Directory: Path to where the downloaded packages should be places (for example: [your project]/satis/packages/), (*21)

M2 Package configuration:

The Magento 2 package/extensions should be stored in a repository, it is important that the account where Satis is running from has access to download from this repository., (*22)

Adding M2 packages:

To add a Magento 2 package go to: Eadesign =>  Composer Repository => Packages => Add new Package, (*23)

[Package Information], (*24)

  • Package Name: composer package name (for example: eadesign/composerrepo),, (*25)

  • Status: Enabled,, (*26)

  • Package Type: Normal / Bundled (Bundled packages will always be available in the packages.json, this can be useful for required library packages.),
  • Package Title: Used to describe the package in the customer menu,
  • Magento Product ID: Matching product entity_id for the ordered item,
  • Repository URL: Git URL to the repository (for example: git@github.com:EaDesgin/m2-ComposerRepo.git)
  • Repository options: json format of options available for the repository in the satis.json (see https://getcomposer.org/doc/articles/handling-private-packages-with-satis.md for details).

Building the repository data

When the configuration and packages are ready the configration can be build with:, (*27)

php bin/magento eadesign:composerrepo, (*28)

This command can also be scheduled to run daily (or any frequency you prefer) and automatically update the repository data., (*29)

Todo's:

  • add email template;
  • add statistics;
  • code improvement.

The Versions

02/07 2018

dev-master

9999999-dev

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

02/07 2018

dev-feature/2412-Release-1.1.4

dev-feature/2412-Release-1.1.4

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

02/07 2018

1.1.4

1.1.4.0

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

02/07 2018

dev-feature/2412-Bug-tag-listing

dev-feature/2412-Bug-tag-listing

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

17/06 2018

dev-feature/2358-Refactor-Controller-Download

dev-feature/2358-Refactor-Controller-Download

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

14/06 2018

dev-feature/2354-Download-Install-Bug

dev-feature/2354-Download-Install-Bug

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

13/06 2018

dev-feature/2354-Fix-bug-authKeys-account

dev-feature/2354-Fix-bug-authKeys-account

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

25/05 2018

1.1.3

1.1.3.0

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

25/05 2018

dev-feature/2267-New-Release

dev-feature/2267-New-Release

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

17/05 2018

dev-feature/2267-No-save-updated-version

dev-feature/2267-No-save-updated-version

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

15/05 2018

dev-bug/2247-composer-not-installing

dev-bug/2247-composer-not-installing

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

12/05 2018

dev-feature/2232-Add-package-in-account

dev-feature/2232-Add-package-in-account

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

12/05 2018

dev-bug/2220-customer-pack-missing

dev-bug/2220-customer-pack-missing

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

11/05 2018

dev-feature/2232-Fix-bug-items

dev-feature/2232-Fix-bug-items

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

07/05 2018

dev-bug/2204-braintree-issue-order-issue

dev-bug/2204-braintree-issue-order-issue

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

03/05 2018

dev-feature/2188-ComposerRepo-Readme

dev-feature/2188-ComposerRepo-Readme

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

02/05 2018

dev-bug/2183-composer-package-save

dev-bug/2183-composer-package-save

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

29/04 2018

dev-feature/2172-adding-all-feautres

dev-feature/2172-adding-all-feautres

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

27/04 2018

dev-Bug/2173-Admin-menu-title

dev-Bug/2173-Admin-menu-title

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

26/04 2018

dev-feature/2172-eacore-menu

dev-feature/2172-eacore-menu

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

25/04 2018

dev-feature/2097-commandLine-ComposerRepo

dev-feature/2097-commandLine-ComposerRepo

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

29/03 2018

dev-feature/2097-Campuri-in-MyAccount

dev-feature/2097-Campuri-in-MyAccount

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

27/03 2018

dev-feature/2078-Commandline-ComposerRepo

dev-feature/2078-Commandline-ComposerRepo

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

14/03 2018

dev-feature/2063-Migrare-cod-M1-M2

dev-feature/2063-Migrare-cod-M1-M2

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

28/02 2018

dev-feature/2053-Adaugare-Formular-butoane-ComposerRepoM2

dev-feature/2053-Adaugare-Formular-butoane-ComposerRepoM2

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires

22/02 2018

dev-feature/2045-Structura-Modul-ComperRepoM2

dev-feature/2045-Structura-Modul-ComperRepoM2

  Sources   Download

AL-2.0

The Requires

  • eadesignro/module-eacore >=0.2.6
  • magento/framework ^100.1.0 | ^101.0.0
  • magento/module-backend ^100.1.0| ^100.2.0
  • magento/module-sales ^100.1.0| ^101.0.0
  • php ~5.6.0|7.0.2|~7.0.6|~7.1.0

 

The Development Requires