Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9222263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:47:46+00:00 2026-06-18T03:47:46+00:00

I pull in a package using Composer with this composer.json: { require: { torophp/torophp:

  • 0

I pull in a package using Composer with this composer.json:

{
    "require": {
        "torophp/torophp": "dev-master",
    },
}

When I run composer install it seems to pull this package from GitHub directly.

I have created a fork of that repo on github with some small changes. Is there a way I can get composer to pull my version on GitHub instead of the original?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:47:47+00:00Added an answer on June 18, 2026 at 3:47 am

    If this is your composer.json

    "require": {
      "torophp/torophp": "dev-master"
    }
    

    and you want to change it and use your fork instead, just add your repository into composer.json as follows:

    "repositories": [
       {
         "type": "vcs",
         "url": "https://github.com/your-github-username/torophp"
       }
    ]
    

    Important: Do not change the "require" part, it must continue using torophp/torophp!

    After adding the "repositories" part, run a composer update (or composer.phar update) and composer will then download your fork (even though it echoes “installing torophp/torophp” during the operation).


    Update (18.09.2014): As mentioned by @efesaid in the comments:

    If your package is published on packagist, you need to add
    --prefer-source option to force installation from VCS.


    Note: For those having issues with pulling from the HTTP(S) source (ie you get [RuntimeException] Failed to clone https://github.com/your-github-username/torophp, could not read packages from it when trying to update), you can change the composer.json to use the git protocol instead. To do so, change the composer.json as follows and run composer update again.

    "repositories": [
       {
         "type": "git",
         "url": "git://github.com/your-github-username/torophp.git"
       }
    ]
    

    Now go into vendor/torophp/torophp and run git remote -v for a double check that you use the desired source for the repository.

    From there you can commit the changes to your fork and update it from origin (git pull origin master).


    Update: To work with private repositories at GitHub, you must use git protocol and also must have installed SSH keys for a git client.

    Composer reference: Loading a package from a VCS repository

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the RestKit iOS package to allow a user to pull info from
I pull markers' data from a MYSQL database using SQL and build up an
I am trying to pull an LDAP jpegPhoto attribute from an openLDAP server using
For my first iPhone app, I've been using SDWebImage on Github to pull images
I have a python package that needs to pull in settings from my project
I am using the forecast package in R and this creates a forecast object.
I'm using pip for deploying my package and I want it to pull my
Is there a way to get the launchable activity for a package from using
I'm developing an SSIS package which needs to pull data from ServerA based upon
I'm trying to parse the JSON data from the Rotten Tomatoes API using GSON

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.