@AdamDickins

Как залить на composer новый fork git проекта?

Здравстуйте.
Есть проект на github reactphp / socket
https://github.com/reactphp/socket?tab=readme-ov-f...
На данный момент версия. 1.15.0

Что бы Reactphp работал c nginx через FastCGI я использовал данный проект
https://github.com/garveen/fastcgi-react
Но он не обновлялся 7 лет.

Когда пытаюсь установить через Composer
composer require garveen/fastcgi-react

Пишет что нужна старая версия github reactphp / socket

Вообщем моя задача сделать форк для
https://github.com/garveen/fastcgi-react

И залить его на composer.

Как сделать fork я разобрался в github.
А дальше как залить на composer я что то не понял.
  • Вопрос задан
  • 53 просмотра
Решения вопроса 2
Loading a package from a VCS repository
There are a few use cases for this. The most common one is maintaining your own fork of a third party library. If you are using a certain library for your project, and you decide to change something in the library, you will want your project to use the patched version. If the library is on GitHub (this is the case most of the time), you can fork it there and push your changes to your fork. After that you update the project's composer.json. All you have to do is add your fork as a repository and update the version constraint to point to your custom branch. In composer.json only, you should prefix your custom branch name with "dev-" (without making it part of the actual branch name). For version constraint naming conventions see Libraries for more information.

Example assuming you patched monolog to fix a bug in the bugfix branch:
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/igorw/monolog"
        }
    ],
    "require": {
        "monolog/monolog": "dev-bugfix"
    }
}
https://getcomposer.org/doc/05-repositories.md#loa...

как залить на composer
Если вы под этим понимаете Packagist, то инструкция находится прямо на главной странице:
Define Your Package
Put a file named composer.json at the root of your package's repository, containing this information:
{
    "name": "your-vendor-name/package-name",
    "description": "A short description of what your package does",
    "require": {
        "php": ">=8.2",
        "another-vendor/package": "1.*"
    }
}

This is the strictly minimal information you have to give.

For more details about package naming and the fields you can use to document your package better, see the about page.

Validate The File
Run composer validate to check that your file has no syntax errors.

Commit The File
Add the composer.json to your git or other VCS repository and commit it.

Publish It
Log in or register on this site, then hit the submit button in the menu.

Once you entered your public repository URL in there, your package will be automatically crawled periodically. You just have to make sure you keep the composer.json file up to date.
Ответ написан
Комментировать
delphinpro
@delphinpro
frontend developer
Не обязательно заливать на композер packagist.org в виде пакета.
В composer.json можно использовать любые репозитории.

"repositories": [
        {
            "type": "git",
            "url": "git@github.com:packages/path/to/repo.git"
        },
    ],
    "require": {
        "app/name": "dev-main"
    }
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы