Page 1 of 1

Composer support

Posted: Mon Feb 04, 2013 1:06 pm
by naitsirch
Maybe you already have heard about "Composer" (see It is a dependency manager for PHP projects. It is a great tool and provides an easy way to include libraries into your project and update them if necessary. Symfony2 uses it for example to install other libraries like Doctrine or Twig which are needed by Symfony. This is the Symfony's composer.json file for example: ... poser.json

So if you would integrate such a composer.json file and create a project for getID3 on everyone could integrate getID3 much easier ;)

What do you think about that?

Best regards

Re: Composer support

Posted: Sun Jul 07, 2013 8:04 pm
by soulhunter
We'll do it soon.

Re: Composer support

Posted: Tue Jul 09, 2013 4:47 pm
by soulhunter
Added support for composer for version 1.10 (

Re: Composer support

Posted: Tue Jul 16, 2013 8:38 am
by sfakir
We will need this in core pretty much!

Composer + PSR-0!

There is also an aproach but only an old version :

Re: Composer support

Posted: Tue Jul 16, 2013 9:22 am
by sfakir
Hi everyone,

since I had the same issue, the following steps solved it for me, even getID3 is not PSR-0 compatible:


1. Add custom repository:

Code: Select all

            "type": "package",
            "package": {
                "name": "JamesHeinrich/getID3",
                "version": "dev-master",
                "source": {
                    "url": "",
                    "type": "git",
                    "reference": "master"

2. Require package

Code: Select all

"require": {
        "JamesHeinrich/getID3": "dev-master",

3. Add a classmap, since getID3 filenames does not refer to the containing class

Code: Select all

    "autoload": {
        "psr-0": {
            "yourCode": "src/"
        "classmap": ["vendor/JamesHeinrich/getID3/getid3/"]
Use getID3 in your Code

Code: Select all

$getID3 = new \getID3();
            $tagwriter = new \getid3_write_id3v2();

Check following mistakes:

[*] The \ is necassary
[*] getID3 has to be the first class which is loaded, because of the defined global constants in the code.