#
Dependencies
title: COMPOSER DEPENDENCIES label: Server & Software Setup order: 100 authors:
- name: Charl Cronje email: charl@webally.co.za link: https://blog.webally.co.za avatar: https://assets.webally.co.za/avatars/darker.jpg edit: repo: "https://github.com/charlpcronje/setup.docs.devserv.me/edit/" base: /src branch: main label: Edit on GitHub editor: enabled: false favicon: favicon.png links:
- text: Projects Portfolio link: https://webally.co.za/projects
- text: Wiki, Tips and Docs link: https://docs.webally.co.zao.za
- text: Resume link: https://cv.webally.co.za
- text: LinkedIn link: https://www.linkedin.com/in/charlpcronje
- text: GitHub link: https://github.com/charlpcronje
- text: Upwork Profile link: https://www.upwork.com/freelancers/~01ccb1439024ec9c50 footer: copyright: "webAlly © Copyright . All rights reserved."---
#
1. Before adding any requirements into you composer.json
# Browse to the document root of the website
echo "{}" >> composer.json
composer update
This will already create a vendor folder an autoloader.php
. This will be the only file you will ever include for any vendor dependencies ever. No matter what dependencies you install, you will always just keep on including that one autoloader.php
#
2. Add dependency to composer.json
nano composer.json
{
"require": {
"phpmailer/phpmailer": "6.5.1"
}
}
#
3. Let Composer update all the dependencies
composer update
Now you dependencies you required will be installed and they will be autoloaded if you just include the /vendor/autoloader.php