Skip to main content
improved punctuation
Source Link
JFFIGK
  • 704
  • 1
  • 9
  • 24

At the time of writing in 2013, this was one way to do it. Composer has added support for better ways: See @igorw 's answer

DO YOU HAVE A REPOSITORY?

Git, Mercurial, and SVN is supported by Composer.

DO YOU HAVE WRITE ACCESS TO THE REPOSITORY?

Yes?

DOES THE REPOSITORY HAVE A composer.json FILE

If you have a repository you can write to: Add a composer.json file, or fix the existing one, and DON'T use the solution below.

Go to @igorw 's answer

ONLY USE THIS IF YOU DON'T HAVE A REPOSITORY
OR IF THE REPOSITORY DOES NOT HAVE A composer.json AND YOU CANNOT ADD IT

This will override everything that Composer may be able to read from the original repository's composer.json, including the dependencies of the package and the autoloading.

Using the package type will transfer the burden of correctly defining everything onto you. The easier way is to have a composer.json file in the repository, and just use it.

This solution really only is for the rare cases where you have an abandoned ZIP download that you cannot alter, or a repository you can only read, but it isn't maintained anymore.

"repositories": [ { "type":"package", "package": { "name": "l3pp4rd/doctrine-extensions", "version":"master", "source": { "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "type": "git", "reference":"master" } } } ], "require": { "l3pp4rd/doctrine-extensions": "master" } 

At the time of writing in 2013 this was one way to do it. Composer has added support for better ways: See @igorw 's answer

DO YOU HAVE A REPOSITORY?

Git, Mercurial, SVN is supported by Composer.

DO YOU HAVE WRITE ACCESS TO THE REPOSITORY?

Yes?

DOES THE REPOSITORY HAVE A composer.json FILE

If you have a repository you can write to: Add a composer.json file, or fix the existing one, and DON'T use the solution below.

Go to @igorw 's answer

ONLY USE THIS IF YOU DON'T HAVE A REPOSITORY
OR IF THE REPOSITORY DOES NOT HAVE A composer.json AND YOU CANNOT ADD IT

This will override everything that Composer may be able to read from the original repository's composer.json, including the dependencies of the package and the autoloading.

Using the package type will transfer the burden of correctly defining everything onto you. The easier way is to have a composer.json file in the repository, and just use it.

This solution really only is for the rare cases where you have an abandoned ZIP download that you cannot alter, or a repository you can only read, but it isn't maintained anymore.

"repositories": [ { "type":"package", "package": { "name": "l3pp4rd/doctrine-extensions", "version":"master", "source": { "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "type": "git", "reference":"master" } } } ], "require": { "l3pp4rd/doctrine-extensions": "master" } 

At the time of writing in 2013, this was one way to do it. Composer has added support for better ways: See @igorw 's answer

DO YOU HAVE A REPOSITORY?

Git, Mercurial and SVN is supported by Composer.

DO YOU HAVE WRITE ACCESS TO THE REPOSITORY?

Yes?

DOES THE REPOSITORY HAVE A composer.json FILE

If you have a repository you can write to: Add a composer.json file, or fix the existing one, and DON'T use the solution below.

Go to @igorw 's answer

ONLY USE THIS IF YOU DON'T HAVE A REPOSITORY
OR IF THE REPOSITORY DOES NOT HAVE A composer.json AND YOU CANNOT ADD IT

This will override everything that Composer may be able to read from the original repository's composer.json, including the dependencies of the package and the autoloading.

Using the package type will transfer the burden of correctly defining everything onto you. The easier way is to have a composer.json file in the repository, and just use it.

This solution really only is for the rare cases where you have an abandoned ZIP download that you cannot alter, or a repository you can only read, but it isn't maintained anymore.

"repositories": [ { "type":"package", "package": { "name": "l3pp4rd/doctrine-extensions", "version":"master", "source": { "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "type": "git", "reference":"master" } } } ], "require": { "l3pp4rd/doctrine-extensions": "master" } 
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

At the time of writing in 2013 this was one way to do it. Composer has added support for better ways: See @igorw 's answeranswer

DO YOU HAVE A REPOSITORY?

Git, Mercurial, SVN is supported by Composer.

DO YOU HAVE WRITE ACCESS TO THE REPOSITORY?

Yes?

DOES THE REPOSITORY HAVE A composer.json FILE

If you have a repository you can write to: Add a composer.json file, or fix the existing one, and DON'T use the solution below.

Go to @igorw 's answeranswer

ONLY USE THIS IF YOU DON'T HAVE A REPOSITORY
OR IF THE REPOSITORY DOES NOT HAVE A composer.json AND YOU CANNOT ADD IT

This will override everything that Composer may be able to read from the original repository's composer.json, including the dependencies of the package and the autoloading.

Using the package type will transfer the burden of correctly defining everything onto you. The easier way is to have a composer.json file in the repository, and just use it.

This solution really only is for the rare cases where you have an abandoned ZIP download that you cannot alter, or a repository you can only read, but it isn't maintained anymore.

"repositories": [ { "type":"package", "package": { "name": "l3pp4rd/doctrine-extensions", "version":"master", "source": { "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "type": "git", "reference":"master" } } } ], "require": { "l3pp4rd/doctrine-extensions": "master" } 

At the time of writing in 2013 this was one way to do it. Composer has added support for better ways: See @igorw 's answer

DO YOU HAVE A REPOSITORY?

Git, Mercurial, SVN is supported by Composer.

DO YOU HAVE WRITE ACCESS TO THE REPOSITORY?

Yes?

DOES THE REPOSITORY HAVE A composer.json FILE

If you have a repository you can write to: Add a composer.json file, or fix the existing one, and DON'T use the solution below.

Go to @igorw 's answer

ONLY USE THIS IF YOU DON'T HAVE A REPOSITORY
OR IF THE REPOSITORY DOES NOT HAVE A composer.json AND YOU CANNOT ADD IT

This will override everything that Composer may be able to read from the original repository's composer.json, including the dependencies of the package and the autoloading.

Using the package type will transfer the burden of correctly defining everything onto you. The easier way is to have a composer.json file in the repository, and just use it.

This solution really only is for the rare cases where you have an abandoned ZIP download that you cannot alter, or a repository you can only read, but it isn't maintained anymore.

"repositories": [ { "type":"package", "package": { "name": "l3pp4rd/doctrine-extensions", "version":"master", "source": { "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "type": "git", "reference":"master" } } } ], "require": { "l3pp4rd/doctrine-extensions": "master" } 

At the time of writing in 2013 this was one way to do it. Composer has added support for better ways: See @igorw 's answer

DO YOU HAVE A REPOSITORY?

Git, Mercurial, SVN is supported by Composer.

DO YOU HAVE WRITE ACCESS TO THE REPOSITORY?

Yes?

DOES THE REPOSITORY HAVE A composer.json FILE

If you have a repository you can write to: Add a composer.json file, or fix the existing one, and DON'T use the solution below.

Go to @igorw 's answer

ONLY USE THIS IF YOU DON'T HAVE A REPOSITORY
OR IF THE REPOSITORY DOES NOT HAVE A composer.json AND YOU CANNOT ADD IT

This will override everything that Composer may be able to read from the original repository's composer.json, including the dependencies of the package and the autoloading.

Using the package type will transfer the burden of correctly defining everything onto you. The easier way is to have a composer.json file in the repository, and just use it.

This solution really only is for the rare cases where you have an abandoned ZIP download that you cannot alter, or a repository you can only read, but it isn't maintained anymore.

"repositories": [ { "type":"package", "package": { "name": "l3pp4rd/doctrine-extensions", "version":"master", "source": { "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "type": "git", "reference":"master" } } } ], "require": { "l3pp4rd/doctrine-extensions": "master" } 
added 858 characters in body
Source Link
Sven
  • 71.2k
  • 10
  • 113
  • 113

At the time of writing itin 2013 this was one of the best waysway to do it. Composer has added support for better ways: See @igorw 's answer below


 

DO YOU HAVE A REPOSITORY?


 

Git, Mercurial, SVN is supported by Composer.

**Older, last ditch, way to do it:**

DO YOU HAVE WRITE ACCESS TO THE REPOSITORY?

Yes?

DOES THE REPOSITORY HAVE A composer.json FILE

If you needhave a repository you can write to: Add a composer.json file, or fix the followingexisting one, and DON'T use the solution below.

Go to @igorw 's answer

ONLY USE THIS IF YOU DON'T HAVE A REPOSITORY
OR IF THE REPOSITORY DOES NOT HAVE A composer.json AND YOU CANNOT ADD IT

This will override everything that Composer may be able to read from the original repository's composer.json, including the dependencies of the package and the autoloading.

Using the package type will transfer the burden of correctly defining everything onto you. The easier way is to have a composer.json file in your composerthe repository, and just use it.json

This solution really only is for the rare cases where you have an abandoned ZIP download that you cannot alter, or a repository you can only read, but it isn't maintained anymore.

"repositories": [ { "type":"package", "package": { "name": "l3pp4rd/doctrine-extensions", "version":"master", "source": { "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "type": "git", "reference":"master" } } } ], "require": { "l3pp4rd/doctrine-extensions": "master" } 

--EDIT-- fixed syntax error

--EDIT2-- linked to @igorw 's answer

At the time of writing it this was one of the best ways. Composer has added support for better ways: See @igorw 's answer below


 
  **Older, last ditch, way to do it:**

you need the following in your composer.json

"repositories": [ { "type":"package", "package": { "name": "l3pp4rd/doctrine-extensions", "version":"master", "source": { "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "type": "git", "reference":"master" } } } ], "require": { "l3pp4rd/doctrine-extensions": "master" } 

--EDIT-- fixed syntax error

--EDIT2-- linked to @igorw 's answer

At the time of writing in 2013 this was one way to do it. Composer has added support for better ways: See @igorw 's answer

DO YOU HAVE A REPOSITORY?

Git, Mercurial, SVN is supported by Composer.

DO YOU HAVE WRITE ACCESS TO THE REPOSITORY?

Yes?

DOES THE REPOSITORY HAVE A composer.json FILE

If you have a repository you can write to: Add a composer.json file, or fix the existing one, and DON'T use the solution below.

Go to @igorw 's answer

ONLY USE THIS IF YOU DON'T HAVE A REPOSITORY
OR IF THE REPOSITORY DOES NOT HAVE A composer.json AND YOU CANNOT ADD IT

This will override everything that Composer may be able to read from the original repository's composer.json, including the dependencies of the package and the autoloading.

Using the package type will transfer the burden of correctly defining everything onto you. The easier way is to have a composer.json file in the repository, and just use it.

This solution really only is for the rare cases where you have an abandoned ZIP download that you cannot alter, or a repository you can only read, but it isn't maintained anymore.

"repositories": [ { "type":"package", "package": { "name": "l3pp4rd/doctrine-extensions", "version":"master", "source": { "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", "type": "git", "reference":"master" } } } ], "require": { "l3pp4rd/doctrine-extensions": "master" } 
added link to @igorw 's answer
Source Link
Mike Graf
  • 5.3k
  • 4
  • 48
  • 60
Loading
Post Made Community Wiki by Mike Graf
Loading
Source Link
Mike Graf
  • 5.3k
  • 4
  • 48
  • 60
Loading