php - Modify files in /vendor directory and commit changes to composer.lock?

897

Solution:

You should fork the package, create a custom repo with your changes - then include that in yourcomposer.json.

{
    "repositories": [ {
            "type": "vcs",
            "url": "https://github.com/YourGithubUsername/PackageName"
         }
    }],
    "require": {
        "laravel/framework": "4.0.*",
        "OriginalVendor/PackageName": "1.0.*"
    },
}

That way you can pull your custom changes in anytime, without having to commit it to your specific project.

You can read more about forking and loading packages here: https://getcomposer.org/doc/05-repositories.md#vcs

People are also looking for solutions to the problem: php - After woocommerce/wordpress registration

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.