zendframework / zend-component-installer

Composer post-package-(un)install scripts for modules and components.
BSD 3-Clause "New" or "Revised" License
46 stars 20 forks source link

Added whitelisting packages to suppress the inject questions #52

Closed geerteltink closed 6 years ago

geerteltink commented 6 years ago

Add an option to read a list of whitelisted packages from the project composer file. Packages in that list are installed silently without the installation prompt. To prevent abuse, only a whitelist in the project composer file is allowed.

    "extra": {
        "zf": {
            "component-whitelist": [
                "zendframework/zend-expressive-router",
                "zendframework/zend-expressive-fastroute",
                "zendframework/zend-expressive-twigrenderer",
                "zendframework/zend-expressive-helpers"
            ]
        }
    },

See zendframework/zend-expressive-skeleton#207 See zendframework/zend-expressive-skeleton#204

Closes #48

weierophinney commented 6 years ago

Well, that's ridiculously simple!

Write some tests, and I'd be happy to merge and release this! We can then do another release of the skeleton that adds appropriate packages to the whitelist.

weierophinney commented 6 years ago

@xtreamwayz I've incorporated the feedback from @webimpress locally; all tests continue to pass.

Updating docs, and then will merge and release.

Thanks!