After manually update from 9.0.x to 9.1.* Class Varbase\composer\ScriptHandler is not autoloadable

Created on 14 December 2023, about 1 year ago
Updated 18 January 2024, 11 months ago

Problem/Motivation

hi after manually updating the project from 9.0.16 to 9.1.0
i am having the below errors

warnings on composer install/update

Class Varbase\composer\ScriptHandler is not autoloadable, can not call post-drupal-scaffold-cmd script
Class Varbase\composer\ScriptHandler is not autoloadable, can not call post-install-cmd script
Class Varbase\composer\ScriptHandler is not autoloadable, can not call post-install-cmd script

error on drush updb/cr command

In ExtensionList.php line 522:

The profile varbase does not exist.

šŸ’¬ Support request
Status

Fixed

Version

9.1

Component

Composer or Makefile

Created by

šŸ‡§šŸ‡ÆBenin delacosta456

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @delacosta456
  • šŸ‡ÆšŸ‡“Jordan Rajab Natshah Jordan

    Thanks, for reporting
    Do you have the following in the root composer.json file

      "require": {
        "composer/installers": "~2",
        "oomphinc/composer-installers-extender": "~2",
        "cweagans/composer-patches": "~1",
        "drupal/core-composer-scaffold": "~10",
        "drupal/core-project-message": "~10",
        "webflo/drupal-finder": "~1",
        "drupal/core": "~10",
        "vardot/varbase": "~9.1.0",
        "vardot/varbase-updater": "~2"
      },
      "require-dev": {
        "drupal/core-dev": "~10",
        "drush/drush": "~12",
        "phpstan/phpstan": "~1.10.0",
        "phpstan/extension-installer": "~1.3.0",
        "mglaman/phpstan-drupal": "~1.1.0",
        "phpstan/phpstan-deprecation-rules": "~1.1.0"
      },
    

    as in https://github.com/Vardot/varbase-project/blob/9.1.0/composer.json

    Important to follow with the steps notes and steps as in

    Updating Varbase ~9.0 to Drupal 10
    and
    Update old Varbase ~9.0.0 to ~9.1.0 composer.josn to Drupal 10
    1. Update the project to latest version of Varbase ~9
    2. Change to "vardot/varbase": "~9.1.0", in the root composer.json file.
    3. Add "drupal/core": "~10", in the root composer.json file.
    4. Change drupal/core-composer-scaffold to ~10 in the root composer.json file.
    5. Change drupal/core-project-message to ~10 in the root composer.json file.
    6. Change "drupal/core-dev": "~10", in the root composer.json file.
    7. Have the composer as in https://github.com/Vardot/varbase-project/blob/9.1.0/composer.jsonā€‹
    8. Run composer update number of times ( do that 3 times min )
    9. Run ./bin/drush updb number of times ( do that 3 times min)
  • šŸ‡§šŸ‡ÆBenin delacosta456

    hi
    sorry forgot to add my composer.json before update

    {
        "name": "vardot/varbase-project",
        "description": "Project template for Varbase distribution.",
        "type": "project",
        "license": "GPL-2.0-or-later",
        "authors": [
            {
                "name": "Vardot",
                "homepage": "https://github.com/vardot",
                "role": "Maintainer"
            }
        ],
        "support": {
            "issues": "http://drupal.org/project/issues/varbase",
            "source": "http://cgit.drupalcode.org/varbase"
        },
        "repositories": {
            "drupal": {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
            },
            "assets": {
                "type": "composer",
                "url": "https://asset-packagist.org"
            }
        },
        "require": {
            "composer/installers": "~2.0",
            "oomphinc/composer-installers-extender": "~2.0",
            "cweagans/composer-patches": "~1.0",
            "drupal/core-composer-scaffold": "~10",
            "drupal/core-project-message": "~10",
            "webflo/drupal-finder": "~1.0",
            "drupal/core": "~10.1.0",
            "vardot/varbase": "~9.0.0",
            "vardot/varbase-updater": "~2.0",
            "drupal/module_filter": "^4.0",
            "drupal/config_split": "^2.0@RC",
            "drupal/default_content_deploy": "2.0.x-dev@dev",
            "bower-asset/jquery": "^1.6",
            "drupal/jquery_ui": "^1.6",
            "drupal/robotstxt": "^1.5",
            "drupal/unused_modules": "^1.5",
            "drupal/varbase_media_demo": "^10.0",
            "drupal/easy_install_d10": "10.x-dev@dev",
            "drupal/config_import_de": "^1.0",
            "drupal/varbase_media_header": "^9.1",
            "drupal/better_normalizers": "^2.0@beta",
            "drupal/recreate_block_content": "^3.0"
        },
        "require-dev": {
            "drupal/core-dev": "~10",
            "drush/drush": "~12.0",
            "phpstan/phpstan": "~1.10.0",
            "phpstan/extension-installer": "~1.3.0",
            "mglaman/phpstan-drupal": "~1.1.0",
            "phpstan/phpstan-deprecation-rules": "~1.1.0"
        },
        "config": {
            "bin-dir": "bin/",
            "secure-http": false,
            "optimize-autoloader": true,
            "preferred-install": {
                "drupal/core": "dist"
            },
            "allow-plugins": {
                "composer/installers": true,
                "cweagans/composer-patches": true,
                "oomphinc/composer-installers-extender": true,
                "drupal/core-composer-scaffold": true,
                "drupal/core-project-message": true,
                "dealerdirect/phpcodesniffer-composer-installer": true,
                "phpstan/extension-installer": true,
                "vardot/varbase-updater": true
            }
        },
        "scripts": {
            "post-install-cmd": [
                "Varbase\\composer\\ScriptHandler::createRequiredFiles",
                "Varbase\\composer\\ScriptHandler::removeGitDirectories"
            ],
            "post-update-cmd": [
                "Varbase\\composer\\ScriptHandler::createRequiredFiles",
                "Varbase\\composer\\ScriptHandler::removeGitDirectories"
            ],
            "post-drupal-scaffold-cmd": ["Varbase\\composer\\ScriptHandler::postDrupalScaffoldProcedure"]
        },
        "minimum-stability": "dev",
        "prefer-stable": true,
        "conflict": {
            "drupal/drupal": "*"
        },
        "extra": {
            "branch-alias": {
                "dev-9.0.x": "9.0.x-dev"
            },
            "drupal-core-project-message": {
                "include-keys": ["homepage", "support"],
                "post-create-project-cmd-message": [
                    "<bg=blue;fg=white>                                                           </>",
                    "<bg=blue;fg=white>  Congratulations, you have installed the Varbase codebase </>",
                    "<bg=blue;fg=white>  from the vardot/varbase-project template!                </>",
                    "<bg=blue;fg=white>                                                           </>",
                    "",
                    "<bg=yellow;fg=black>Next steps</>:",
    
                    "  * Install the site: https://www.drupal.org/docs/installing-drupal",
                    "  * Read the user guide: https://docs.varbase.vardot.com",
                    "  * Get support: https://www.vardot.com/en/form/get-support-varbase",
                    "  * Join Our Slack Team for Feedback and Support:",
                    "      http://slack.varbase.vardot.com",
                    "  * Remove the plugin that prints this message:",
                    "      composer remove drupal/core-project-message"
                ]
            },
            "drupal-scaffold": {
                "allowed-packages": [
                    "drupal/core",
                    "vardot/varbase"
                ],
                "gitignore": true,
                "locations": {
                    "web-root": "./docroot"
                },
                "file-mapping": {
                    "[web-root]/sites/default/default.services.yml": {
                        "mode": "replace",
                        "overwrite": false,
                        "path": "docroot/core/assets/scaffold/files/default.services.yml"
                    },
                    "[web-root]/sites/default/default.settings.php": {
                        "mode": "replace",
                        "overwrite": false,
                        "path": "docroot/core/assets/scaffold/files/default.settings.php"
                    }
                }
            },
            "installer-paths": {
                "docroot/core": ["type:drupal-core"],
                "docroot/profiles/{$name}": ["type:drupal-profile"],
                "docroot/modules/contrib/{$name}": ["type:drupal-module"],
                "docroot/themes/contrib/{$name}": ["type:drupal-theme"],
                "docroot/libraries/slick": ["npm-asset/slick-carousel"],
                "docroot/libraries/ace": ["npm-asset/ace-builds"],
                "docroot/libraries/jquery-ui-touch-punch": ["bower-asset/jqueryui-touch-punch"],
                "docroot/libraries/swagger-ui/dist": ["npm-asset/swagger-ui-dist"],
                "docroot/libraries/{$name}": [
                    "type:drupal-library",
                    "type:bower-asset",
                    "type:npm-asset"
                ],
                "docroot/modules/custom/{$name}": ["type:drupal-custom-module"],
                "docroot/themes/custom/{$name}": ["type:drupal-custom-theme"],
                "drush/contrib/{$name}": ["type:drupal-drush"]
            },
            "installer-types": [
                "bower-asset",
                "npm-asset"
            ],
            "drupal-libraries": {
                "library-directory": "docroot/libraries",
                "libraries": [
                    {"name": "objectfitpolyfill", "package": "bower-asset/objectfitpolyfill"},
                    {"name": "chartjs", "package": "bower-asset/chartjs"},
                    {"name": "c3","package": "bower-asset/c3"},
                    {"name": "d3", "package": "bower-asset/d3"},
                    {"name": "dropzone","package": "npm-asset/dropzone"},
                    {"name": "blazy", "package": "npm-asset/blazy"},
                    {"name": "slick", "package": "npm-asset/slick-carousel"},
                    {"name": "ace", "package": "npm-asset/ace-builds"},
                    {"name": "jquery-ui-touch-punch", "package": "bower-asset/jqueryui-touch-punch"},
                    {"name": "imagesloaded", "package": "npm-asset/imagesloaded"},
                    {"name": "swagger-ui", "package": "npm-asset/swagger-ui-dist"}
                ]
            },
            "enable-patching": true,
            "composer-exit-on-patch-failure": true,
            "patchLevel": {
                "drupal/core": "-p2"
            },
            "patches": {
                "drupal/core":{
                    "(Serge for DCD)[PP-1] Expose Layout Builder data to REST and JSON:API": "https://www.drupal.org/files/issues/2023-12-11/2942975-252_revised_239.patch"
                },
                "drupal/hal": {
                    "(Serge for DCD) Translated field denormalization creates duplicate values":"https://www.drupal.org/files/issues/2023-04-05/2904423-90.patch"
                },
                "drupal/easy_install": {
                    "PHP warning on": "https://www.drupal.org/files/issues/2020-07-25/Solution.patch"
                },
                "drupal/default_content": {
                    "2 - Don't add translation, if exist - https://www.drupal.org/project/default_content/issues/3176839#comment-13859359": "https://www.drupal.org/files/issues/2020-10-14/default_content-3176839-2.patch",
                    "3 - Add a Normalizer and Denormalizer to support Layout Builder - https://www.drupal.org/project/default_content/issues/3160146#comment-14814050": "https://www.drupal.org/files/issues/2022-12-06/default_content-3160146-53.patch",
                    "4 - Update inline block usage on import - https://www.drupal.org/project/default_content/issues/3359137#comment-15042582": "https://www.drupal.org/files/issues/2023-05-09/default_content-3359137-3.patch"
                }
            },
            "patches-ignore": {
                "drupal/varbase_core": {
                    "drupal/default_content": {
                        "Issue #3160146: Add Layout Builder Normalizer and Denormalize": "https://www.drupal.org/files/issues/2021-04-07/3160146-37.patch"
                    }
                }
            }
        }
    }
    
    
  • šŸ‡§šŸ‡ÆBenin delacosta456

    hi

    i just notice line are missing ..
    let me retry and get back to you please

  • šŸ‡ÆšŸ‡“Jordan Rajab Natshah Jordan

    Change "vardot/varbase": "~9.0.0", to "vardot/varbase": "~9.1.0", in the root composer.json

    Thanks for reporting issues while updating.
    Adding the highlights for that in the documentation.

    āœ… Released Varbase 9.0.17 ā†’ ( Drupal ~9 old way )
    āœ… Released Varbase 9.1.0 ā†’ ( Drupal ~10 old way ) for upgrades
    āœ… Released Varbase 10.0.0-rc1 ā†’ ( Drupal ~10 new way )

    ā†’

    Planed to drop support for Drupal 9

    Drupal 10 has 3 years LTS

  • šŸ‡§šŸ‡ÆBenin delacosta456

    hi
    ok thanks .. Update run successfully now

  • šŸ‡ÆšŸ‡“Jordan Rajab Natshah Jordan
  • Status changed to Fixed 11 months ago
  • šŸ‡ÆšŸ‡“Jordan Rajab Natshah Jordan
Production build 0.71.5 2024