Page MenuHomePhabricator

Composer can't regenerate class map at operations/mediawiki-config
Closed, ResolvedPublic

Description

When I add a PSR-4 block to the repository composer.json, with or without an update of the autoloader (we need it), the operations-mw-config-composer-hhvm-jessie Jenkins job want to dump a new list.

To do it, it needs to touch the wmf-config/PrivateSettings.php file.

Currently, the file doesn't exist, so test fails:

Job console output
02:38:56 Dependency resolution completed in 0.002 seconds
02:38:56 Writing lock file
02:38:56 Generating optimized autoload files
02:38:57 
02:38:57 Installation failed, reverting ./composer.json to its original content.
02:38:57 
02:38:57                                                                                                                                                               
02:38:57   [RuntimeException]                                                                                                                                          
02:38:57   File at "/home/jenkins/workspace/operations-mw-config-composer-hhvm-jessie/wmf-config/PrivateSettings.php" does not exist, check your classmap definitions

Event Timeline

greg subscribed.

Sorry for not really seeing this until now, is this still an issue for you @Dereckson ?

hashar claimed this task.

Was probably due to wmf-config/PrivateSettings.php being a symbolic link until we removed it in Nov 2017 via https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/389780

We also had until 2019 ( https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/542658 ):

"config": {
        "classmap-authoritative": true,
        "optimize-autoloader": true,
        "prepend-autoloader": false,
        "vendor-dir": "vendor"

Anyway nowadays it is no more an issue and even if I create a symlink pointing to a non existing file composer does not complain.