PHP - Including External Packages

To build complex applications in PHP, it is much quicker and simpler to just "glue together" relevant packages and configure them.

Related Posts


    Navigate to the root of your project's directory, or just create a new directory if you are starting from scratch.
    mkdir -p /path/to/project/directory
    cd /path/to/project/directory
    Create a composer.json file, listing all the packages that you require. If you are hosting your own private repository using Satis, you will need to list this as well using the
    section as I have done below.
        "repositories": [ { "type": "composer", "url": "" } ],
        "require": {
            "Programster/CoreLibs": "dev-trunk",
            "Programster/CliMenu": "1.0.0",
            "Programster/DigitalOceanSdk": "2.*"
    Download all the packages using composer.
    composer update
    Running composer update again later may result in packages updating, especially if you use versions like
    , so using specific versions like
    is somewhat safer!

No comments:

Post a Comment