Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One of the repositories is not being mapped the present classes #4066

Closed
hackin88 opened this issue May 26, 2015 · 1 comment
Closed

One of the repositories is not being mapped the present classes #4066

hackin88 opened this issue May 26, 2015 · 1 comment
Labels

Comments

@hackin88
Copy link

en_US

Hello

Good Night

I'm having the following problem:

One of the repositories is not being mapped the present classes

Composer.json created a file with the following content

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "moiplabs/moip-php",
                "version": "master",
                "source": {
                    "type": "git",
                    "url": "https://github.com/moiplabs/moip-php.git",
                    "reference": "master"
                },
                "autoload": {
                    "classmap": ["lib"]
                }
            }
        }
    ],
    "require": {
        "moiplabs/moip-php": "dev-master"
    }
}

Saved and run the following command in the terminal

composer clear-cache update && composer

In

/vendor/composer/installed.json

We have

[
    {
        "name": "moiplabs/moip-php",
        "version": "master",
        "version_normalized": "9999999-dev",
        "source": {
            "type": "git",
            "url": "https://github.com/moiplabs/moip-php.git",
            "reference": "master"
        },
        "type": "library",
        "installation-source": "source",
        "autoload": {
            "classmap": [
                "lib"
            ]
        }
    }
] 

Where we see that we have been mapped classes that library

Composer.json created a file with the following content

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "braspag/braspagapiphpsdk",
                "version": "master",
                "source": {
                    "url": "https://github.com/Braspag/BraspagApiPhpSdk.git",
                    "type": "git",
                    "reference": "master",
                    "autoload": {
                        "classmap": [
                            "Models",
                            "BraspagApiIncludes.php"
                        ]
                    }
                }
            }
        }
    ],
    "require": {
        "braspag/braspagapiphpsdk": "dev-master"
    }
}

Saved and run the following command in the terminal

composer clear-cache update && composer

In

/vendor/composer/installed.json

we have

[
    {
        "name": "braspag/braspagapiphpsdk",
        "version": "master",
        "version_normalized": "9999999-dev",
        "source": {
            "type": "git",
            "url": "https://github.com/Braspag/BraspagApiPhpSdk.git",
            "reference": "master"
        },
        "type": "library",
        "installation-source": "source"
    }
]

Where we see that NOT been mapped classes that library

Thus I can not call the same

Can anyone help me?


pt_BR

Ola

Boa Noite

Estou tendo o seguinte problema:

Um dos repositórios não está sendo mapeada as classes presente

Criei um arquivo composer.json com o seguinte conteúdo

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "moiplabs/moip-php",
                "version": "master",
                "source": {
                    "type": "git",
                    "url": "https://github.com/moiplabs/moip-php.git",
                    "reference": "master"
                },
                "autoload": {
                    "classmap": ["lib"]
                }
            }
        }
    ],
    "require": {
        "moiplabs/moip-php": "dev-master"
    }
}

Salvei e execute o seguinte comando no terminal

composer clear-cache && composer update

Em

/vendor/composer/installed.json

Temos

[
    {
        "name": "moiplabs/moip-php",
        "version": "master",
        "version_normalized": "9999999-dev",
        "source": {
            "type": "git",
            "url": "https://github.com/moiplabs/moip-php.git",
            "reference": "master"
        },
        "type": "library",
        "installation-source": "source",
        "autoload": {
            "classmap": [
                "lib"
            ]
        }
    }
] 

Onde vemos que foi mapeado as classes dessa biblioteca

Criei um arquivo composer.json com o seguinte conteúdo

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "braspag/braspagapiphpsdk",
                "version": "master",
                "source": {
                    "url": "https://github.com/Braspag/BraspagApiPhpSdk.git",
                    "type": "git",
                    "reference": "master",
                    "autoload": {
                        "classmap": [
                            "Models",
                            "BraspagApiIncludes.php"
                        ]
                    }
                }
            }
        }
    ],
    "require": {
        "braspag/braspagapiphpsdk": "dev-master"
    }
}

Salvei e execute o seguinte comando no terminal

composer clear-cache && composer update

Em

/vendor/composer/installed.json

Temos

[
    {
        "name": "braspag/braspagapiphpsdk",
        "version": "master",
        "version_normalized": "9999999-dev",
        "source": {
            "type": "git",
            "url": "https://github.com/Braspag/BraspagApiPhpSdk.git",
            "reference": "master"
        },
        "type": "library",
        "installation-source": "source"
    }
]

Onde vemos que NÂO foi mapeado as classes dessa biblioteca

Dessa forma não consigo chamar as mesmas

Alguém pode me ajudar ?

@alcohol
Copy link
Member

alcohol commented May 28, 2015

In scenario number 2: "autoload" should not be part of "source".

Compare your package definition of scenario 1 and scenario 2 and you will find the difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants