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

Composer install hits errors with scaffold files #33

Open
geerlingguy opened this issue Jun 3, 2020 · 1 comment
Open

Composer install hits errors with scaffold files #33

geerlingguy opened this issue Jun 3, 2020 · 1 comment

Comments

@geerlingguy
Copy link
Owner

geerlingguy commented Jun 3, 2020

After the Drupal 9 upgrade (see video: https://www.youtube.com/watch?v=nLoJ2L0AzDY), I noticed that when running composer install I'm getting the following:

Class DrupalProject\composer\ScriptHandler is not autoloadable, can not call post-install-cmd script

To get the site upgraded in a 2-hour timespan, I kinda cut a few corners tossing out some old composer.json cruft, and I seem to have broken some of the stuff that the drupal-project/composer-template had originally injected into the Composer config (like the ScriptHandler... might not even be needed anymore?).

@davearch
Copy link

Hi, yes I'm pretty sure it is the autoload value in composer.json that causes this. When I put that back in it seemed to work fine.

    "autoload": {
        "classmap": [
            "scripts/composer/ScriptHandler.php"
        ],
        "files": ["load.environment.php"]
    },

Actually load.environment.php gave me an error but I just got rid of it.

I did get another warning about the CONFIG_SYNC_DIRECTORY constant in ScriptHandler.php needing quotation marks too.

[ErrorException]
Use of undefined constant CONFIG_SYNC_DIRECTORY - assumed 'CONFIG_SYNC_DIRECTORY' (this will throw an Error in a future version of PHP)

That being said I don't think you need the ScriptHandler anymore because it creates a settings.php file but then it is immediately overwritten in the Dockerfile

COPY pidramble.settings.php /var/www/html/web/sites/default/settings.php

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

No branches or pull requests

2 participants