Wordpress Installed? failing on wp 5.6 missing web/wp/wp- includes/class-wp-application-passwords.php

Well, yes. I had done that, thanks. Sorry the previous post wasn’t more clear.

Seems that when composer installs from the lockfile, the aforementioned dotenv files are missing.

Temporarily adding this task:


- name: Clean out Composer installed stuff
  command: rm -rf vendor composer.lock
  args:
    chdir: "{{ deploy_helper.new_release_path }}"

before Install Composer dependencies enables deploy to succeed.

So, why is installation from the lockfile breaking?

This is the relevant section and it looks fine to me:

{
    "name": "vlucas/phpdotenv",
    "version": "v5.3.0",
    "source": {
        "type": "git",
        "url": "https://github.com/vlucas/phpdotenv.git",
        "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56"
    },
    "dist": {
        "type": "zip",
        "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/b3eac5c7ac896e52deab4a99068e3f4ab12d9e56",
        "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56",
        "shasum": ""
    },
    "require": {
        "ext-pcre": "*",
        "graham-campbell/result-type": "^1.0.1",
        "php": "^7.1.3 || ^8.0",
        "phpoption/phpoption": "^1.7.4",
        "symfony/polyfill-ctype": "^1.17",
        "symfony/polyfill-mbstring": "^1.17",
        "symfony/polyfill-php80": "^1.17"
    },
    "require-dev": {
        "bamarni/composer-bin-plugin": "^1.4.1",
        "ext-filter": "*",
        "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5.1"
    },
    "suggest": {
        "ext-filter": "Required to use the boolean validator."
    },
    "type": "library",
    "extra": {
        "branch-alias": {
            "dev-master": "5.3-dev"
        }
    },
    "autoload": {
        "psr-4": {
            "Dotenv\\": "src/"
        }
    },
    "notification-url": "https://packagist.org/downloads/",
    "license": [
        "BSD-3-Clause"
    ],
    "authors": [
        {
            "name": "Graham Campbell",
            "email": "graham@alt-three.com",
            "homepage": "https://gjcampbell.co.uk/"
        },
        {
            "name": "Vance Lucas",
            "email": "vance@vancelucas.com",
            "homepage": "https://vancelucas.com/"
        }
    ],
    "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",
    "keywords": [
        "dotenv",
        "env",
        "environment"
    ],
    "support": {
        "issues": "https://github.com/vlucas/phpdotenv/issues",
        "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.0"
    },
    "funding": [
        {
            "url": "https://github.com/GrahamCampbell",
            "type": "github"
        },
        {
            "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv",
            "type": "tidelift"
        }
    ],
    "time": "2021-01-20T15:23:13+00:00"
}

The files are all there in the zipped file. At the moment, I’m just working with the barebones bedrock composer dependencies.

Ok. It’s just removing the vendor directory:

- name: Clean out Composer installed stuff
  command: rm -rf vendor
  args:
    chdir: "{{ deploy_helper.new_release_path }}"

that enables Install Composer Dependencies to succeed.

Otherwise half of the files are missing from vlucas/phpdotenv/src/Repository/Adapter/

Any suggestions from the masters as to how to debug “why” this is happening?

I just remembered that Trellis simply copies the vendor/ folder during deploy from the previous deploy in an extra step in order to speed up deployment:


So it could be that there is a corrupted vendor/ folder that is applied to each new deploy (until it has been cleaned out, too, not just the copied one).

Ah. You mean a corrupted local vendor file. Pretty sure I had removed that, locally, but will try again. Thank you. Will report back.

Yes, notably a vendor/ directory in the previous releases. But please note that the current/active release needs the vendor/ folder. So only do this (remove/rename the vendor/ folder or previous releases) if this is a staging/test server that allows for downtime.

Wait, it copies the vendor directory from the previous release? I though you were saying rsyncs the local vendor directory.

No, it copies from a previous release in order to speed up the deployment:

Were you able to figure out the reason?

Thanks for reaching out. I have not, man! Need to get back to it. When I removed the Copy project folders task, these was the error about missing wp-includes/cache-compat.php, and without my workaround of removing the vendor directory within the new_release_path, the same missing files in vlucas/phpdotenv comes up.

When I cp -rp the vendor directory from “current” manually, all the files are there.

So at the moment, it’s still a mystery. I’ll poke at it again ASAP.

This topic was automatically closed after 42 days. New replies are no longer allowed.