Adding multiple Composer packages

Eric

I'm using Composer to install multiple packages using the following syntax:

{
    "require": {
        "aws/aws-sdk-php": "2.*",
        "vimeo/vimeo-api" : "1.1.*",
        "phpoffice/phpexcel": "dev-master"
    }

}

The above works just fine, but now I'd like to add tcpdf via composer. I found this code here but am not sure how to integrate with my current requires. One thing that I tried was to just add it to the end, but I fear that it started deleting my current packages.

{ "name": "tecnick.com/tcpdf",
    "version": "6.2.11",
    "homepage": "http://www.tcpdf.org/",
    "type": "library",
    "description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
    "keywords": ["PDF","tcpdf","PDFD32000-2008","qrcode","datamatrix","pdf417","barcodes"],
    "license": "LGPLv3",
    "authors": [
    {
        "name": "Nicola Asuni",
        "email": "[email protected]",
        "homepage": "http://nicolaasuni.tecnick.com"
    }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "classmap": [
        "fonts",
        "config",
        "include",
        "tcpdf.php",
        "tcpdf_parser.php",
        "tcpdf_import.php",
        "tcpdf_barcodes_1d.php",
        "tcpdf_barcodes_2d.php",
        "include/tcpdf_colors.php",
        "include/tcpdf_filters.php",
        "include/tcpdf_font_data.php",
        "include/tcpdf_fonts.php",
        "include/tcpdf_images.php",
        "include/tcpdf_static.php",
        "include/barcodes/datamatrix.php",
        "include/barcodes/pdf417.php",
        "include/barcodes/qrcode.php"
        ]
    }
Sven

To add "tecnick.com/tcpdf" to an existing composer.json file, on the commandline inside the directory containing it run:

composer require tecnick.com/tcpdf

You shouldn't have to manually edit the composer.json file for such things.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How do I install Composer PHP packages without Composer?

From Java

Adding packages to Julia on WSL

From Dev

Private composer packages - no valid composer.json was found

From Dev

Excluding files from composer packages

From Dev

Different Composer packages with same namespace

From Dev

reload all packages using composer

From Dev

Composer - how to track changes to packages

From Dev

Composer, Laravel and local packages

From Dev

Composer not downloading src directory for packages

From Dev

Where are composer packages installed?

From Dev

Composer require failed to install packages

From Dev

Composer dowloading not specified packages

From Dev

adding multiple packages to the project

From Dev

Laravel 4 Composer not installing Packages

From Dev

using composer packages in a wordpress plugin

From Dev

Composer doesn't autoload packages

From Dev

Proper directory structure for composer packages that require other composer packages?

From Dev

Installing multiple packages with composer?

From Dev

Where are composer packages installed?

From Dev

Composer dowloading not specified packages

From Dev

Composer local packages

From Dev

eclipse not adding packages automatically

From Dev

Travis configuration for composer packages

From Dev

Adding files - with composer

From Dev

Adding composer into Codeigniter

From Dev

Composer specifying 'in development' packages?

From Dev

How to remove packages not installed with Composer?

From Dev

Adding packages in netbeans

From Dev

composer.json correct structure for multiple PHP packages