Trying to install a mediawiki extension(wikibase) with composer
- Dominant language
- PHP
- Stars
- 29.5k
- Forks
- 4.8k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 12
Description
My `composer.json`:
```json
{
"name": "mediawiki/core",
"description": "Free software wiki application developed by the Wikimedia Foundation and others",
"version": "1.41.1",
"type": "mediawiki-core",
"keywords": [
"mediawiki",
"wiki"
],
"homepage": "https://www.mediawiki.org/",
"authors": [
{
"name": "MediaWiki Community",
"homepage": "https://www.mediawiki.org/wiki/Special:Version/Credits"
}
],
"license": "GPL-2.0-or-later",
"support": {
"issues": "https://phabricator.wikimedia.org/",
"irc": "irc://irc.libera.chat/mediawiki",
"wiki": "https://www.mediawiki.org/"
},
"prefer-stable": true,
"require": {
"composer/semver": "3.3.2",
"cssjanus/cssjanus": "2.1.1",
"ext-calendar": "*",
"ext-ctype": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-iconv": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlreader": "*",
"guzzlehttp/guzzle": "7.5.3",
"justinrainbow/json-schema": "5.2.13",
"liuggio/statsd-php-client": "1.0.18",
"monolog/monolog": "2.2.0",
"oojs/oojs-ui": "0.48.1",
"pear/mail": "1.5.1",
"pear/mail_mime": "1.10.11",
"pear/net_smtp": "1.10.1",
"php": ">=7.4.3",
"psr/container": "1.1.2",
"psr/http-message": "1.0.1",
"psr/log": "1.1.4",
"ralouphie/getallheaders": "3.0.3",
"symfony/polyfill-php80": "1.28.0",
"symfony/polyfill-php81": "1.28.0",
"symfony/polyfill-php82": "1.28.0",
"symfony/polyfill-php83": "1.28.0",
"symfony/yaml": "5.4.23",
"wikimedia/assert": "0.5.1",
"wikimedia/at-ease": "2.1.0",
"wikimedia/base-convert": "2.0.2",
"wikimedia/bcp-47-code": "2.0.0",
"wikimedia/cdb": "3.0.0",
"wikimedia/cldr-plural-rule-parser": "2.0.0",
"wikimedia/common-passwords": "0.5.0",
"wikimedia/composer-merge-plugin": "2.1.0",
"wikimedia/html-formatter": "4.0.3",
"wikimedia/ip-utils": "5.0.0",
"wikimedia/less.php": "4.1.1",
"wikimedia/minify": "2.5.1",
"wikimedia/normalized-exception": "1.0.1",
"wikimedia/object-factory": "5.0.1",
"wikimedia/parsoid": "0.18.2",
"wikimedia/php-session-serializer": "2.0.1",
"wikimedia/purtle": "1.0.8",
"wikimedia/relpath": "3.0.0",
"wikimedia/remex-html": "4.0.1",
"wikimedia/request-timeout": "1.2.0",
"wikimedia/running-stat": "2.1.0",
"wikimedia/scoped-callback": "4.0.0",
"wikimedia/services": "3.0.0",
"wikimedia/shellbox": "4.0.0",
"wikimedia/utfnormal": "4.0.0",
"wikimedia/timestamp": "4.1.1",
"wikimedia/wait-condition-loop": "2.0.2",
"wikimedia/wrappedstring": "4.0.1",
"wikimedia/xmp-reader": "0.9.1",
"zordius/lightncandy": "1.2.6"
},
"require-dev": {
"composer/spdx-licenses": "1.5.7",
"doctrine/dbal": "3.4.2",
"doctrine/sql-formatter": "1.1.1",
"ext-simplexml": "*",
"giorgiosironi/eris": "^0.13.0",
"hamcrest/hamcrest-php": "^2.0",
"johnkary/phpunit-speedtrap": "^4.0",
"mediawiki/mediawiki-codesniffer": "42.0.0",
"mediawiki/mediawiki-phan-config": "0.13.0",
"nikic/php-parser": "^4.10.2",
"php-parallel-lint/php-console-highlighter": "1.0.0",
"php-parallel-lint/php-parallel-lint": "1.3.2",
"phpunit/phpunit": "9.5.28",
"psy/psysh": "^0.11.1",
"seld/jsonlint": "1.8.3",
"wikimedia/alea": "1.0.0",
"wikimedia/langconv": "^0.4.2",
"wikimedia/testing-access-wrapper": "~2.0",
"wmde/hamcrest-html-matchers": "^1.0.0"
},
"replace": {
"symfony/polyfill-ctype": "1.99",
"symfony/polyfill-mbstring": "1.99"
},
"suggest": {
"ext-apcu": "Faster web responses overall.",
"ext-bcmath": "Increased performance of some operations. Required especially on 32 bit machines. This or ext-gmp are needed for scrambling Temporary Accounts.",
"ext-curl": "Faster HTTP services, e.g. when using InstantCommons, Swift, or Etcd.",
"ext-exif": "Enable processing of EXIF information in file uploads.",
"ext-gd": "Enable thumbnails for file uploads.",
"ext-gmp": "Increased performance of some operations. Required especially on 32 bit machines. This or ext-bcmath are needed for scrambling Temporary Accounts.",
"ext-mysqli": "Enable the MySQL and MariaDB database type for MediaWiki.",
"ext-openssl": "Encrypt session data (or opt-out via $wgSessionInsecureSecrets).",
"ext-pdo": "Enable the SQLite database type for MediaWiki.",
"ext-pgsql": "Enable the PostgreSQL database type for MediaWiki.",
"ext-posix": "Enable CLI concurrent processing, e.g. for runJobs.php.",
"ext-pcntl": "Enable CLI concurrent processing, e.g. for runJobs.php and rebuildLocalisationCache.php.",
"ext-readline": "Enable CLI history and autocomplete, e.g. for eval.php and other REPLs.",
"ext-sockets": "Enable CLI concurrent processing, e.g. for rebuildLocalisationCache.php.",
"ext-wikidiff2": "Faster text difference engine.",
"ext-zlib": "Enable use of GZIP compression, e.g. for SqlBagOStuff (ParserCache), $wgCompressRevisions, or $wgUseFileCache.",
"monolog/monolog": "Enable use of MonologSpi ($wgMWLoggerDefaultSpi)."
},
"autoload": {
"psr-0": {
"ComposerHookHandler": "includes/composer",
"ComposerVendorHtaccessCreator": "includes/composer",
"ComposerPhpunitXmlCoverageEdit": "includes/composer"
}
},
"autoload-dev": {
"files": [
"vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php",
"vendor/wmde/hamcrest-html-matchers/src/functions.php"
]
},
"scripts": {
"mw-install:sqlite": "@php maintenance/install.php --server=http://localhost:4000 --dbtype sqlite --dbpath cache/ --scriptpath '' --pass adminpassword MediaWiki Admin",
"serve": "@php -S localhost:4000",
"lint": "parallel-lint --exclude node_modules --exclude vendor",
"phan": "phan -d . --long-progress-bar",
"phpcs": "phpcs -p -s --cache",
"fix": [
"phpcbf"
],
"pre-install-cmd": "ComposerHookHandler::onPreInstall",
"pre-update-cmd": "ComposerHookHandler::onPreUpdate",
"post-install-cmd": "ComposerVendorHtaccessCreator::onEvent",
"post-update-cmd": "ComposerVendorHtaccessCreator::onEvent",
"releasenotes": "@phpunit:entrypoint --group ReleaseNotes",
"test": [
"@lint .",
"@phpcs ."
],
"test-some": [
"@lint",
"@phpcs"
],
"phpunit": "phpunit",
"phpunit:unit": "@phpunit --colors=always --testsuite=core:unit,extensions:unit,skins:unit",
"phpunit:integration": "@phpunit --colors=always --testsuite=core:integration,extensions:integration,skins:integration",
"phpunit:coverage": "@phpunit --testsuite=core:unit --exclude-group Dump,Broken",
"phpunit:coverage-edit": "ComposerPhpunitXmlCoverageEdit::onEvent",
"phpunit:entrypoint": "@phpunit -c tests/phpunit/suite.xml"
},
"config": {
"optimize-autoloader": true,
"prepend-autoloader": false,
"allow-plugins": {
"composer/package-versions-deprecated": true,
"wikimedia/composer-merge-plugin": true,
"composer/installers": true
}
},
"extra": {
"merge-plugin": {
"include": [
"composer.local.json"
],
"merge-dev": false
}
}
}
```
Output of `composer diagnose`:
```
Checking composer.json: WARNING
The version field is present, it is recommended to leave it out if the package is published on Packagist.
require.composer/semver : exact version constraints (3.3.2) should be avoided if the package follows semantic versioning
require.cssjanus/cssjanus : exact version constraints (2.1.1) should be avoided if the package follows semantic versioning
require.guzzlehttp/guzzle : exact version constraints (7.5.3) should be avoided if the package follows semantic versioning
require.justinrainbow/json-schema : exact version constraints (5.2.13) should be avoided if the package follows semantic versioning
require.liuggio/statsd-php-client : exact version constraints (1.0.18) should be avoided if the package follows semantic versioning
require.monolog/monolog : exact version constraints (2.2.0) should be avoided if the package follows semantic versioning
require.pear/mail : exact version constraints (1.5.1) should be avoided if the package follows semantic versioning
require.pear/mail_mime : exact version constraints (1.10.11) should be avoided if the package follows semantic versioning
require.pear/net_smtp : exact version constraints (1.10.1) should be avoided if the package follows semantic versioning
require.psr/container : exact version constraints (1.1.2) should be avoided if the package follows semantic versioning
require.psr/http-message : exact version constraints (1.0.1) should be avoided if the package follows semantic versioning
require.psr/log : exact version constraints (1.1.4) should be avoided if the package follows semantic versioning
require.ralouphie/getallheaders : exact version constraints (3.0.3) should be avoided if the package follows semantic versioning
require.symfony/polyfill-php80 : exact version constraints (1.28.0) should be avoided if the package follows semantic versioning
require.symfony/polyfill-php81 : exact version constraints (1.28.0) should be avoided if the package follows semantic versioning
require.symfony/polyfill-php82 : exact version constraints (1.28.0) should be avoided if the package follows semantic versioning
require.symfony/polyfill-php83 : exact version constraints (1.28.0) should be avoided if the package follows semantic versioning
require.symfony/yaml : exact version constraints (5.4.23) should be avoided if the package follows semantic versioning
require.wikimedia/at-ease : exact version constraints (2.1.0) should be avoided if the package follows semantic versioning
require.wikimedia/base-convert : exact version constraints (2.0.2) should be avoided if the package follows semantic versioning
require.wikimedia/bcp-47-code : exact version constraints (2.0.0) should be avoided if the package follows semantic versioning
require.wikimedia/cdb : exact version constraints (3.0.0) should be avoided if the package follows semantic versioning
require.wikimedia/cldr-plural-rule-parser : exact version constraints (2.0.0) should be avoided if the package follows semantic versioning
require.wikimedia/composer-merge-plugin : exact version constraints (2.1.0) should be avoided if the package follows semantic versioning
require.wikimedia/html-formatter : exact version constraints (4.0.3) should be avoided if the package follows semantic versioning
require.wikimedia/ip-utils : exact version constraints (5.0.0) should be avoided if the package follows semantic versioning
require.wikimedia/less.php : exact version constraints (4.1.1) should be avoided if the package follows semantic versioning
require.wikimedia/minify : exact version constraints (2.5.1) should be avoided if the package follows semantic versioning
require.wikimedia/normalized-exception : exact version constraints (1.0.1) should be avoided if the package follows semantic versioning
require.wikimedia/object-factory : exact version constraints (5.0.1) should be avoided if the package follows semantic versioning
require.wikimedia/php-session-serializer : exact version constraints (2.0.1) should be avoided if the package follows semantic versioning
require.wikimedia/purtle : exact version constraints (1.0.8) should be avoided if the package follows semantic versioning
require.wikimedia/relpath : exact version constraints (3.0.0) should be avoided if the package follows semantic versioning
require.wikimedia/remex-html : exact version constraints (4.0.1) should be avoided if the package follows semantic versioning
require.wikimedia/request-timeout : exact version constraints (1.2.0) should be avoided if the package follows semantic versioning
require.wikimedia/running-stat : exact version constraints (2.1.0) should be avoided if the package follows semantic versioning
require.wikimedia/scoped-callback : exact version constraints (4.0.0) should be avoided if the package follows semantic versioning
require.wikimedia/services : exact version constraints (3.0.0) should be avoided if the package follows semantic versioning
require.wikimedia/shellbox : exact version constraints (4.0.0) should be avoided if the package follows semantic versioning
require.wikimedia/utfnormal : exact version constraints (4.0.0) should be avoided if the package follows semantic versioning
require.wikimedia/timestamp : exact version constraints (4.1.1) should be avoided if the package follows semantic versioning
require.wikimedia/wait-condition-loop : exact version constraints (2.0.2) should be avoided if the package follows semantic versioning
require.wikimedia/wrappedstring : exact version constraints (4.0.1) should be avoided if the package follows semantic versioning
require.zordius/lightncandy : exact version constraints (1.2.6) should be avoided if the package follows semantic versioning
Checking platform settings: OK
Checking git settings: OK git version 2.43.0
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking Composer version: OK
Checking Composer and its dependencies for vulnerabilities: OK
Composer version: 2.7.7
PHP version: 8.0.30
PHP binary path: /usr/bin/php
OpenSSL version: OpenSSL 3.0.7 1 Nov 2022
curl version: 7.76.1 libz 1.2.11 ssl OpenSSL/3.0.7
zip: extension present, unzip present, 7-Zip not available
```
When I run this command:
```
composer update --no-dev -vvv
```
I get the following output:
```
$ composer update --no-dev -vvv
Running 2.7.7 (2024-06-10 22:11:12) with PHP 8.0.30 on Linux / 5.14.0-427.18.1.el9_4.x86_64
Reading ./composer.json (/var/www/html/afropedia/composer.json)
Loading config file ./composer.json (/var/www/html/afropedia/composer.json)
Checked CA file /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem: valid
Failed to initialize global composer: Composer could not find the config file: /home/vap/.config/composer/composer.json
Reading /var/www/html/afropedia/vendor/composer/installed.json
Loading plugin Composer\Installers\Plugin (from composer/installers)
Loading plugin Wikimedia\Composer\Merge\V2\MergePlugin (from wikimedia/composer-merge-plugin)
> init: Wikimedia\Composer\Merge\V2\MergePlugin->onInit
[merge-plugin] Loading composer.local.json...
[merge-plugin] Adding mediawiki/sub-page-list
[merge-plugin] Adding mediawiki/semantic-media-wiki
[merge-plugin] Adding mediawiki/semantic-cite
> pre-update-cmd: Wikimedia\Composer\Merge\V2\MergePlugin->onInstallUpdateOrDump
[merge-plugin] Already merged composer.local.json completely
> pre-update-cmd: ComposerHookHandler::onPreUpdate
This file is part of the SemanticCite extension, it is not a valid entry point.
```
And I expected this to happen:
I'm trying to install wikibase, which allows my wiki to pull data from other wikis. Part of the [installation](https://www.mediawiki.org/wiki/Wikibase/Installation#Install_dependencies) requires that I use composer to install it.
I'm expecting it to install the dependencies for wikibase
Contributor guide
Assessment
This issue has not been assessed yet.