dreimus/package-actions

Allow file and folder actions uppon package installation or update

Installs: 1

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 4

Type:composer-plugin

1.1.1 2019-12-10 13:52 UTC

This package is auto-updated.

Last update: 2024-03-29 04:06:00 UTC


README

add copy/create/remove/symlink per package actions

available for both post-package-install and post-package-update

Installation

composer require metabolism/package-actions

Example

"extra": {
    "post-package-install": {
        "create": {
            "vendor/package-name": {
                "web/uploads": 777,
                "web/download": 655
        },
        "copy": {
            "vendor/package-name": {
                "folder/file.php": "web/myfile.php",
            }
        },
        "symlink": {
            "vendor/package-name": {
                "folder/file.php": "web/myfile.php",
            }
        }
        "remove": {
            "vendor/package-name": ["web/myfile.php"]
            }
        }
    }
}

Create

 destination : permissions

destination is relative to the composer.json file

permissions use umask, only 3 last digits

Copy / Symlink

 source : destination

source is relative to the package folder

destination is relative to the composer.json file

Remove

 [destination]

destination is relative to the composer.json file