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

Install via composer reports 'No such file or directory' on MW 1.23 #220

Closed
jamesmontalvo3 opened this issue Mar 8, 2014 · 5 comments
Closed

Comments

@jamesmontalvo3
Copy link
Contributor

Running MW head (8d1ea17) I got the following errors when attempting to install via composer. Note that on this particular web server it made me specify php-cli versus php...not sure if that's normal.

When I changed to MW 1.22.3 everything installed normally.


php-cli composer.phar require mediawiki/semantic-media-wiki "~1.9"

./composer.json has been updated

Warning: Uncaught exception 'ErrorException' with message 'require_once(AutoLoader.php): failed to open stream: No such file or directory' in /path/to/my/wiki/includes/composer/ComposerHookHandler.php:7
Stack trace:
#0 /path/to/my/wiki/includes/composer/ComposerHookHandler.php(7): Composer\Util\ErrorHandler::handle(2, 'require_once(Au...', '/path/to...', 7, Array)
#1 /path/to/my/wiki/includes/composer/ComposerHookHandler.php(7): require_once()
#2 phar:///path/to/my/wiki/composer.phar/vendor/composer/ClassLoader.php(269): include('/path/to...')
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass('ComposerHookHan...')
#4 [internal function]: spl_autoload_call('ComposerHookHan...')
#5 phar:///path/to/my/wiki/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php(124): class_exists('ComposerHookHan...')
#6 phar:///path/to/my/wiki/composer.phar/sr in /path/to/my/wiki/includes/composer/ComposerHookHandler.php on line 7

Fatal error: main(): Failed opening required 'AutoLoader.php' (include_path='phar:///path/to/my/wiki/composer.phar/vendor/phpunit/phpunit-mock-objects:phar:///path/to/my/wiki/composer.phar/vendor/phpunit/php-timer:phar:///path/to/my/wiki/composer.phar/vendor/phpunit/php-token-stream:phar:///path/to/my/wiki/composer.phar/vendor/phpunit/php-file-iterator:phar:///path/to/my/wiki/composer.phar/vendor/phpunit/php-text-template:phar:///path/to/my/wiki/composer.phar/vendor/phpunit/php-code-coverage:phar:///path/to/my/wiki/composer.phar/vendor/phpunit/phpunit:phar:///path/to/my/wiki/composer.phar/vendor/symfony/yaml:.:/usr/php/54/usr/lib64:/usr/php/54/usr/share/pear') in /path/to/my/wiki/includes/composer/ComposerHookHandler.php on line 7

@JeroenDeDauw
Copy link
Member

Cannot reproduce. Install on MW master working fine for me.

That error is also odd - it states a file that was only recently added in MW cannot be found. Though nothing was using this file before it was added (obviously ;p). This seems like your composer.json file got updated while the php files did not. No idea why that would happen though, I'd more expect the opposite to occur.

Anyway, this does not strike me as an actual SMW issue.

@mwjames
Copy link
Contributor

mwjames commented Mar 8, 2014

php-cli composer.phar require mediawiki/semantic-media-wiki "~1.9"

php-cli seems ought

open stream: No such file or directory' in

No such file or directory indicates an issue with the accessibility of your file system.

Cannot reproduce. Install on MW master working fine for me.

Each push to github will trigger a Travis-CI test run which will install the environment from scratch (a new MW install + a fresh composer installed SMW version) and generally is suppose to catch any irregularities (composer or PHP based) during a test run.

@JeroenDeDauw
Copy link
Member

Haha. Fail. The Composer hook in MW is just broken. It sat there in working state for months, then I had to change a dir due to a nitpick and forgot to update the path in the hook. And then they merged it while broken. Sigh...

@mwjames
Copy link
Contributor

mwjames commented Dec 11, 2014

I'm getting these issues as well on baf4371

If you have a similar issue with my/wiki/includes/composer/ComposerHookHandler.php then you need to update your MW due to an issue on MW implemention side of the the ComposerHookHandler as pointed out in #220 (comment) / [0].

Our CI did not (using Composer installation) show any issues on 1.23.5 [1] and 1.25alpha [2].

In general, if you encounter an issue then it is customary to state your versions (SMW/MW version + other extensions).

[0] https://github.com/wikimedia/mediawiki/blob/master/composer.json#L40
[1] https://s3.amazonaws.com/archive.travis-ci.org/jobs/43398705/log.txt
[2] https://s3.amazonaws.com/archive.travis-ci.org/jobs/43398703/log.txt

@xn
Copy link

xn commented Dec 11, 2014

Thanks for the response. I realized the mistake, so I deleted my comment. I appreciate the help.

@mwjames mwjames closed this as completed Dec 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants