Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WordPress dropin support #265

Merged
merged 2 commits into from
Oct 18, 2017
Merged

Add WordPress dropin support #265

merged 2 commits into from
Oct 18, 2017

Conversation

bueltge
Copy link
Contributor

@bueltge bueltge commented Oct 8, 2015

WordPress alows to replace some functions with Dropins.
This small change in the commit allow to add via composer the dropin.

Below is a table with all Dropins I know or I have found. The possible Dropins are echoing via the function _get_dropins().

FILE TYPE OF DROPIN ACTIVE SINCE CONTEXT
advanced-cache.php Advanced or Alternative Cache Constant WP_CACHEis TRUE Single Installation
db.php Own database class Always Single installation
db-error.php Own database error alert At DB Error Single installation
install.php Own installation routine At installation Single installation
maintenance.php Own maintenance message At updates, maintenance Single installation
object-cache.php External Object Cache Always Single installation
sunrise.php Before the WP Multisite Installation gets loaded If constant SUNRISEset Multisite installation
blog-deleted.php Own message, when a blog gets deleted If a blog gets deleted Multisite installation
blog-inactive.php Own message, if a blog is set inactive If a blog becomes inactive Multisite installation
blog-suspended.php Own message, if a blog got suspended When a blog gets marked as archive or spam Multisite installation
$locale.php functions at active language key When language key set in constant WP_LANG Single & multisite installation

@johnpbloch
Copy link

👍 would love to see this. It might also make sense to look for these files in the package (maybe with a composer.json extra override hash?) and manage them directly as part of the install/update/delete process.

@sbuzonas
Copy link

sbuzonas commented Dec 3, 2015

I'm not sure it's feasible to add drop-in support to this project. Drop-ins are single files, and composer installs a directory of files and dependencies.

@bueltge
Copy link
Contributor Author

bueltge commented Mar 11, 2016

Same idea, new pull request, but redundant - #288

@bueltge
Copy link
Contributor Author

bueltge commented Mar 11, 2016

@slbmeh This should work. Composer have the feature, but is not documented.
see composer/composer#946
"type": "file"

@alcohol alcohol merged commit 8292f76 into composer:master Oct 18, 2017
bueltge added a commit to bueltge/installers that referenced this pull request Oct 19, 2017
alcohol added a commit that referenced this pull request Oct 19, 2017
Add hint about dropin possibility to the readme, addon to #265
@pySilver
Copy link

@bueltge i'm not sure I got you right. Where exactly "type": "file" should go? To my drop-in? It already has wordpress-dropin type ...

@bueltge
Copy link
Contributor Author

bueltge commented Mar 21, 2018

This type is for the dist parameter.

"dist": {
    "type": "file",
    "url": "path/to/file"
},

like this context

    "repositories": [
    {
        "type": "package",
        "package": {
            "name": "user/repo-dropin",
            "type": "wordpress-dropin",
            "version": "1.5",
            "dist": {
                "type": "file",
                "url": ""
            },
            "require": {
                "composer/installers": "v1.0.7"
            }
        }
    }

Sorry, I haven't currently a project or access to a topic. Also I haven't currently possibilities to work with composer, a client behind a proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants