All dependencies that are used in XenForo

When using the composer package manager. There are such cases when you need to load some kind of library and there is such an unpleasant fact that some of the libraries that you pull with your package are used in the engine. The batch manager composer allows you to exclude these libraries.
The replace directive will come to the replace.
replace

Lists packages that are replaced by this package. This allows you to fork a package, publish it under a different name with its own version numbers, while packages requiring the original package continue to work with your fork because it replaces the original package.
This is also useful for packages that contain sub-packages, for example the main symfony/symfony package contains all the Symfony Components which are also available as individual packages. If you require the main package it will automatically fulfill any requirement of one of the individual components, since it replaces them.
Caution is advised when using replace for the sub-package purpose explained above. You should then typically only replace using self.version as a version constraint, to make sure the main package only replaces the sub-packages of that exact version, and not any other version, which would be incorrect.
All dependencies used by XenForo.
JSON:
{
    "authy/php": "3.0.5",
    "braintree/braintree_php": "3.40.0",
    "ccampbell/chromephp": "4.1.0",
    "christian-riesen/base32": "1.3.2",
    "christian-riesen/otp": "2.6.2",
    "container-interop/container-interop": "1.2.0",
    "doctrine/cache": "v1.6.2",
    "emojione/emojione": "4.5.0",
    "fgrosse/phpasn1": "v2.1.1",
    "guzzlehttp/guzzle": "6.3.3",
    "guzzlehttp/promises": "v1.3.1",
    "guzzlehttp/psr7": "1.6.1",
    "league/event": "1.0.1",
    "league/flysystem": "1.0.57",
    "league/flysystem-eventable-filesystem": "1.0.0",
    "league/flysystem-ziparchive": "1.0.3",
    "lusitanian/oauth": "v0.8.11",
    "minishlink/web-push": "v4.0.2",
    "oyejorge/less.php": "dev-master",
    "paragonie/constant_time_encoding": "v1.0.4",
    "paragonie/random_compat": "v2.0.18",
    "paragonie/sodium_compat": "v1.12.1",
    "pelago/emogrifier": "v2.1.1",
    "psr/container": "1.0.0",
    "psr/http-message": "1.0.1",
    "psr/log": "1.1.2",
    "ralouphie/getallheaders": "3.0.3",
    "spomky-labs/base64url": "v2.0.1",
    "stripe/stripe-php": "v6.43.1",
    "swiftmailer/swiftmailer": "v5.4.12",
    "symfony/console": "v3.4.36",
    "symfony/css-selector": "v3.4.36",
    "symfony/debug": "v3.4.36",
    "symfony/dom-crawler": "v3.4.36",
    "symfony/filesystem": "v3.4.36",
    "symfony/polyfill-ctype": "v1.13.1",
    "symfony/polyfill-mbstring": "v1.13.1",
    "symfony/polyfill-php56": "v1.13.1",
    "symfony/polyfill-util": "v1.13.1",
    "symfony/process": "v3.4.36",
    "symfony/var-dumper": "v3.4.36",
    "true/punycode": "v2.1.1",
    "web-token/jwt-core": "v1.3.9",
    "web-token/jwt-key-mgmt": "v1.3.9",
    "web-token/jwt-signature": "v1.3.9",
    "web-token/jwt-signature-algorithm-ecdsa": "v1.3.9",
    "web-token/jwt-signature-algorithm-eddsa": "v1.3.9",
    "web-token/jwt-signature-algorithm-hmac": "v1.3.9",
    "web-token/jwt-signature-algorithm-none": "v1.3.9",
    "web-token/jwt-signature-algorithm-rsa": "v1.3.9",
    "web-token/jwt-util-ecc": "v1.3.9",
    "zendframework/zend-escaper": "2.6.1",
    "zendframework/zend-feed": "2.12.0",
    "zendframework/zend-loader": "2.6.1",
    "zendframework/zend-mail": "2.10.0",
    "zendframework/zend-mime": "2.7.2",
    "zendframework/zend-stdlib": "3.2.1",
    "zendframework/zend-validator": "2.12.2"
}
If you want to pull all the dependencies yourself, then use the following code:
PHP:
<?php

$sourceFile = json_decode(file_get_contents("C:\\domains\\xf.local\\src\\vendor\\composer\\installed.json"), true);
$existingPackages = [];

foreach ($sourceFile as $package)
{
    $existingPackages[$package['name']] = $package['version'];
}

file_put_contents("C:\\domains\\xf.local\\packages.json", json_encode($existingPackages, JSON_PRETTY_PRINT));
For example, we need the league/flysystem-sftp package
But at the same time he will load another league/flysystem and phpseclib/phpseclib
XenForo already has this package league/flysystem.
So our composer.json will look like this:
Less:
{
    "require": {
        "league/flysystem-sftp": "^1.0"
    },
    "replace": {
        "league/flysystem": "1.0.57"
    }
}
 
Back
Top