First add the dependecy with the defined structure, for example for the dependency Liquid\Template, note the php -v that you have, and if is compatible.
In my case, 7.1 so https://github.com/kalimatas/php-liquid/releases/tag/1.2.1
Now set the path acording the composer file, in this case will be: vendor/liquid/liquid and all the files go there.
Now edit this 3 files in vendor/composer and add the code.
installed.json
,
{
"name": "liquid/liquid",
"version": "v1.2.1",
"version_normalized": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/Lusitanian/PHPoAuthLib.git",
"reference": "fc11a53db4b66da555a6a11fce294f574a8374f9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/fc11a53db4b66da555a6a11fce294f574a8374f9",
"reference": "fc11a53db4b66da555a6a11fce294f574a8374f9",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.",
"predis/predis": "0.8.@dev",
"squizlabs/php_codesniffer": "2.*",
"symfony/http-foundation": "~2.1"
},
"suggest": {
"ext-openssl": "Allows for usage of secure connections with the stream-based HTTP client.",
"predis/predis": "Allows using the Redis storage backend.",
"symfony/http-foundation": "Allows using the Symfony Session storage backend."
},
"time": "2018-02-14T22:37:14+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.1-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"OAuth": "src",
"OAuth\Unit": "tests"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "David Desberg",
"email": "[email protected]"
},
{
"name": "Elliot Chance",
"email": "[email protected]"
},
{
"name": "Pieter Hordijk",
"email": "[email protected]"
}
],
"description": "PHP 5.3+ oAuth 1/2 Library",
"keywords": [
"Authentication",
"authorization",
"oauth",
"security"
]
}
autoload_namespaces.php
'Liquid\\Unit' => array($vendorDir . '/liquid/liquid/tests'),
'Liquid' => array($vendorDir . '/liquid/liquid/src'),
autoload_static.php
,
'Liquid\\Unit' =>
array (
0 => __DIR__ . '/..' . '/liquid/liquid/tests',
),
'Liquid' =>
array (
0 => __DIR__ . '/..' . '/liquid/liquid/src',
),
note in this last file to put the dependency in the right letter.
and it is done!