Help talk:Using Composer

From semantic-mediawiki.org

Contents

Thread titleRepliesLast modified
update composer fails100:08, 7 January 2016
Strange error - composer misinterpreting 'require' as an input file319:52, 7 May 2014

update composer fails

Today I got this for a change trying to update via Composer:

[RuntimeException]                                                                                                                              
  Failed to execute git checkout 'f7543bcb7ad1b08c1924d65aeea9e353d5953381' -- && git reset --hard 'f7543bcb7ad1b08c1924d65aeea9e353d5953381' --  
  error: The following untracked working tree files would be overwritten by checkout:                                                             
  	tests/phpunit/Integration/ByJsonScript/Fixtures/p-0408 [#1252] intext to use non-strict mode.json                                              
  Please move or remove them before you can switch branches.                                                                                      
  Aborting 
Solution

Go to the directory "/extensions", do a rm -r SemanticMediaWiki/ there, go back to wiki root "/w" and do the composer update --prefer-source --no-dev

18:30, 6 January 2016

See also issue 1351 on GitHub.

00:08, 7 January 2016
 

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

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