2017 © Pedro Peláez
 

composer-installer non-destructive-archive-installer

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

image

azt3k/non-destructive-archive-installer

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  • Thursday, October 30, 2014
  • by azt3k
  • Repository
  • 2 Watchers
  • 4 Stars
  • 4,128 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

Composer non-destructive archive installer

What's in this thing Anyway?

This really only does something very simple which is to manually handle the decompression of manually defined packages so as to not disrupt nested package installs. This is basically a straight rip of mouf/archive-installer (http://mouf-php.com), the only difference is that it's made to be slightly more flexible in terms of configuration., (*1)

Notes:, (*2)

"always-install": "true" - This bypasses the version look up and does a full install every time useful for deployments where depenedencies are rebuilt each deploy - the default is true., (*3)

"omit-first-directory": "true" - This omits the first directory of the zip, (*4)

Usage

{
    "name": "namespace/package-name",
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "drupal/drupal",
                "type": "non-destructive-archive-installer",
                "version": "7.28",
                "dist": {
                    "url": "http://ftp.drupal.org/files/projects/drupal-7.28.zip",
                    "type": "zip"
                },
                "require": {
                    "azt3k/non-destructive-archive-installer" : "*"
                },
                "extra": {
                    "always-install": "true",
                    "omit-first-directory": "true",
                    "debug": "false"
                }
            }
        }
    ],
    "require": {
        "php"                                       : ">=5.4.0",
        "composer/installers"                       : ">=1.0",
        "azt3k/non-destructive-archive-installer"   : "dev-master",
        "drupal/drupal"                             : "7.28"
    },
    "extra": {
        "installer-paths": {
            "public": [
                "drupal/drupal"
            ]
        }
    }
}

Or:, (*5)

{
    "name": "namespace/package-name",
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "drupal/drupal",
                "type": "non-destructive-archive-installer",
                "version": "7.28",
                "dist": {
                    "url": "http://ftp.drupal.org/files/projects/drupal-7.28.zip",
                    "type": "zip"
                },
                "require": {
                    "azt3k/non-destructive-archive-installer" : "*"
                }
            },
            "extra": {
                "target-dir": "public",
                "omit-first-directory": "true"
            }
        }
    ],
    "require": {
        "php"                                       : ">=5.4.0",
        "composer/installers"                       : ">=1.0",
        "azt3k/non-destructive-archive-installer"   : "dev-master",
        "drupal/drupal"                             : "7.28"
    }
}

A practical example of why you might want to do this is for managing drupal depenedencies, e.g., (*6)

{
    "name": "namespace/package-name",
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "drupal/drupal",
                "type": "non-destructive-archive-installer",
                "version": "7.28",
                "dist": {
                    "url": "http://ftp.drupal.org/files/projects/drupal-7.28.zip",
                    "type": "zip"
                },
                "require": {
                    "azt3k/non-destructive-archive-installer" : "*"
                },
                "extra": {
                    "omit-first-directory": "true"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "drupal/drupal-ckeditor",
                "type": "drupal-module",
                "version": "7.1.14",
                "dist": {
                    "url": "http://ftp.drupal.org/files/projects/ckeditor-7.x-1.14.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "ckeditor/ckeditor",
                "type": "drupal-module",
                "version": "4.2.2",
                "dist": {
                    "url": "http://download.cksource.com/CKEditor/CKEditor/CKEditor%204.2.2/ckeditor_4.2.2_full.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "drupal/entity",
                "type": "drupal-module",
                "version": "7.1.5",
                "dist": {
                    "url": "http://ftp.drupal.org/files/projects/entity-7.x-1.5.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "drupal/jquery-update",
                "type": "drupal-module",
                "version": "7.2.4",
                "dist": {
                    "url": "http://ftp.drupal.org/files/projects/jquery_update-7.x-2.4.zip",
                    "type": "zip"
                }
            }
        }
    ],
    "require": {
        "php"                                       : ">=5.4.0",
        "composer/installers"                       : ">=1.0.9",
        "azt3k/non-destructive-archive-installer"   : "dev-master",
        "symfony/yaml"                              : "dev-master",
        "drush/drush"                               : "6.2.0",
        "drupal/drupal"                             : "7.28",
        "drupal/entity"                             : "7.1.5",
        "drupal/drupal-ckeditor"                    : "7.1.14",
        "drupal/jquery-update"                      : "7.2.4",
        "ckeditor/ckeditor"                         : "4.2.2",
        "d11wtq/boris"                              : "dev-master"
    },
    "extra": {
        "installer-paths": {
            "public/sites/all/modules/{$name}": [
                "drupal/drupal-ckeditor",
                "drupal/entity",
                "drupal/jquery-update"
            ],
            "public/sites/all/libraries/{$name}" : [
                "ckeditor/ckeditor"
            ],
            "public": [
                "drupal/drupal"
            ]
        }
    },
    "scripts": {
        "post-update-cmd": [
            "rm -f public/.gitignore",
            "rm -f public/CHANGELOG.txt public/COPYRIGHT.txt public/INSTALL.mysql.txt public/INSTALL.pgsql.txt public/INSTALL.sqlite.txt public/INSTALL.txt public/LICENSE.txt public/MAINTAINERS.txt public/README.txt public/UPGRADE.txt public/download-status.txt public/web.config public/modules/README.txt"
        ],
        "post-install-cmd": [
            "rm -f public/.gitignore",
            "rm -f public/CHANGELOG.txt public/COPYRIGHT.txt public/INSTALL.mysql.txt public/INSTALL.pgsql.txt public/INSTALL.sqlite.txt public/INSTALL.txt public/LICENSE.txt public/MAINTAINERS.txt public/README.txt public/UPGRADE.txt public/download-status.txt public/web.config public/modules/README.txt"
        ]
    }
}

Gotchas

You need to make sure the target install directory exists first or the unpack will fail., (*7)

The Versions

30/10 2014

dev-master

9999999-dev

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

30/10 2014

0.2.12

0.2.12.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

30/10 2014

0.2.11

0.2.11.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

01/10 2014

0.2.10

0.2.10.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

01/10 2014

0.2.9

0.2.9.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

01/10 2014

0.2.8

0.2.8.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

01/10 2014

0.2.7

0.2.7.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

01/10 2014

0.2.6

0.2.6.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

01/10 2014

0.2.5

0.2.5.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

12/08 2014

0.2.4

0.2.4.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

12/08 2014

0.2.3

0.2.3.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

22/07 2014

0.2.2

0.2.2.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

16/05 2014

0.2.1

0.2.1.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

15/05 2014

0.2

0.2.0.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari

27/11 2013

0.1

0.1.0.0

A composer installer type that allows you to unpack archives to a specific location in a non destructive way - it is very useful when some packages need to be installed inside another package folder - e.g. drupal and modules

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Aaron Latham-Ilari