(planted question) What happens if you remove composer.local.json?
On Wed, Jun 26, 2019, 21:54 James Montalvo <[email protected]> wrote: > I'm getting a new error today that was not happening with the identical > config yesterday. > > With MW 1.31.1 and 1.31.2 I'm getting errors after installing dependencies > and extensions with Composer. I have the following composer.local.json: > > ``` > { > "require": { > "mediawiki/semantic-media-wiki": "3.0.0", > "mediawiki/semantic-result-formats": "3.0.0", > "mediawiki/semantic-compound-queries": "1.2.0", > "mediawiki/sub-page-list": "1.5.0", > "mediawiki/maps": "6.0.3", > "pear/net_smtp": "1.8.0" <-- remove this when using MW 1.31.2 > }, > "extra": { > "merge-plugin": { > "include": [ > "extensions/SyntaxHighlight_GeSHi/composer.json", > "extensions/Elastica/composer.json" > ] > } > } > } > ``` > > SyntaxHighlight_GeSHi and Elastica are both tracking their REL1_31 > branches, which haven't changed in about a year. Despite that, yesterday > running `composer update` caused no issues. Today I started getting the > following error: > > ``` > [Wed Jun 26 16:16:18.364715 2019] [php7:warn] [pid 12304] [client > my.ip.add.ress:46156] PHP Warning: > > require(/opt/htdocs/mediawiki/vendor/composer/../jetbrains/phpstorm-stubs/PhpStormStubsMap.php): > failed to open stream: No such file or directory in > /opt/htdocs/mediawiki/vendor/composer/autoload_real.php on line 70, > referer: https://example.com/ > [Wed Jun 26 16:16:18.364896 2019] [php7:error] [pid 12304] [client > my.ip.add.ress:46156] PHP Fatal error: require(): Failed opening required > > '/opt/htdocs/mediawiki/vendor/composer/../jetbrains/phpstorm-stubs/PhpStormStubsMap.php' > > (include_path='/opt/htdocs/mediawiki/vendor/pear/console_getopt:/opt/htdocs/mediawiki/vendor/pear/mail:/opt/htdocs/mediawiki/vendor/pear/mail_mime:/opt/htdocs/mediawiki/vendor/pear/mail_mime-decode:/opt/htdocs/mediawiki/vendor/pear/net_smtp:/opt/htdocs/mediawiki/vendor/pear/net_socket:/opt/htdocs/mediawiki/vendor/pear/pear-core-minimal/src:/opt/htdocs/mediawiki/vendor/pear/pear_exception:.:/usr/share/pear:/usr/share/php') > in /opt/htdocs/mediawiki/vendor/composer/autoload_real.php on line 70, > referer: https://example.com/ > ``` > > Using MW 1.32.1 and 1.31.2 I did the following: > > ``` > rm -f ./composer.lock && composer install && sudo systemctl reload httpd > # no mention of phpstorm-stubs in output > # page loads fail > > rm -f ./composer.lock && composer install --no-dev && sudo systemctl reload > httpd > # output includes: Removing jetbrains/phpstorm-stubs (dev-master) > # page loads succeed (no phpstorm-stubs) > > composer install && sudo systemctl reload httpd > # output includes: Installing jetbrains/phpstorm-stubs (dev-master > 9d01ce3): Cloning 9d01ce3476 > # page loads succeed (phpstorm-stubs @ 9d01ce3) > > composer update && sudo systemctl reload httpd > # output includes: Updating jetbrains/phpstorm-stubs dev-master (9d01ce3 => > 1b99060): Checking out 1b9906084d > # page loads fail (phpstorm-stubs @ 1b99060) > ``` > > I need the httpd reload to invalidate opcache in my config. Based upon the > above it seems that the phpstorm-stubs that is getting required from > non-dev dependencies doesn't have issues, but the one from dev dependencies > does. Or perhaps something to do with Composer or with the Composer merge > plugin is causing one version of phpstorm-stubs to be checked out but the > autoloader to be setup for the other version. Any thoughts? > > Thanks, > James > _______________________________________________ > Wikitech-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
