composer icon indicating copy to clipboard operation
composer copied to clipboard

Files are not included if fork version of project is used.

Open DangerLifter opened this issue 10 years ago • 3 comments

With the following composer.json:

{
    "name": "TestComposerFailed",
    "description": "Tes composer failed include files if fork is used",
    "type": "test",
    "license": "",
    "keywords": [],

    "minimum-stability": "dev",
    "prefer-stable": true,

    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "guzzlehttp/psr7",
                "version": "1.3.0",
                "source": {
                    "url": "https://github.com/DangerLifter/psr7.git",
                    "type": "git",
                    "reference": "master"
                },
                "autoload": {
                    "classmap": [""]
                }
            }
        }
    ],
    "require": {
        "guzzlehttp/guzzle": "~5.3",
        "wyrihaximus/react-guzzle-ring": "dev-master"
    },
    "config": {
        "preferred-install": "dist"
    }
}

When I run this command: compose install After installation autoload_files contains :

'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php'

And it misses include of "psr7/src/functions_include.php"

Composer version 1.1.2

DangerLifter avatar Jun 21 '16 07:06 DangerLifter

I am not sure what you are expecting? Everything seems correct. You only define an autoload with an empty classmap (so it scans the root dir I believe). You do not define any autoload files definitions.

Also, you should read the documentation again about how to use forks, cause defining it as a package like this is a really bad approach.

alcohol avatar Jun 21 '16 07:06 alcohol

Ok. I see my mistakes here. Thanks. Last time when I used definition forks as "vcs" didn't work for me.

DangerLifter avatar Jun 21 '16 08:06 DangerLifter

Well, if you run into the situation where it "does not work" again, feel free to open a new issue specifically related to that situation. We are here to help :-)

alcohol avatar Jun 21 '16 08:06 alcohol