Strange error - composer misinterpreting 'require' as an input file

From semantic-mediawiki.org

My CPANEL interface doesn't allow .phar files, so I've had to unpack composer.phar and run it directly. It was working, but I've now got this strange behaviour:

Error message: " PHP: syntax error, unexpected '(' in /home/kchcl200/public_html/wiki/extensions/Composer/bin/composer on line 3 Could not open input file: require " Command: cd www/wiki;php-cli -c extensions/Composer/bin/composer require mediawiki/semantic-media-wiki "~1.9.2"

The file structure is:

public_html/wiki/extensions/Composer

 bin
  composer
  composer.json
 res
  composer-schema.json
  spdx-identifier.json
 src
  Composer
    bootstrap.php
    Composer
      Autoload
      Command
      Config
      Console
        Application.php
        HtmlOutputFormatter.php
      ...

I suspect it's something to do with the:

use Composer\Console\Application;

That's the third line of composer.php - but I don't know php, so I'm not familiar with what the back-slashes are supposed to be.

I also think that, in this case, trying to fix the code is probably the wrong approach.

Hence my question here.

03:57, 4 May 2014

Heiya, it will be great if you could always include the pointer to the mailing list item. This will make it easier for others to get the connection to it. Thank you and cheers

10:57, 4 May 2014

OK - I'll do that in future. I wasn't aware that that was the form.

14:58, 4 May 2014

On the mailing list you will get much more attention for an issue.

19:52, 7 May 2014