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

How to fork with reverse dependencies? #5922

Closed
x-yuri opened this issue Dec 1, 2016 · 3 comments
Closed

How to fork with reverse dependencies? #5922

x-yuri opened this issue Dec 1, 2016 · 3 comments

Comments

@x-yuri
Copy link

x-yuri commented Dec 1, 2016

I forked laravel/framework and want to use clone's testing-encoding branch:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/x-yuri/framework"
        }
    ],
    "require": {
        "laravel/framework": "dev-testing-encoding"
    }
}

Output of composer diagnose:

You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: WARNING
The xdebug extension is loaded, this can slow down Composer a little.
 Disabling it when using Composer is recommended.

Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK

When I run composer require modelizer/selenium, I get the following output:

You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.o
rg/xdebug
Using version ^1.1 for modelizer/selenium                      
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)                  
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for modelizer/selenium ^1.1 -> satisfiable by modelizer/selenium[v1.1.0].
    - Conclusion: remove laravel/framework dev-testing-encoding
    - Conclusion: don't install laravel/framework dev-testing-encoding
    - modelizer/selenium v1.1.0 requires laravel/framework ^5.1 -> satisfiable by laravel/framework[5.4.x-dev, 5.1.x-de
v, 5.2.x-dev, 5.3.x-dev].
    - Can only install one of: laravel/framework[5.1.x-dev, dev-testing-encoding].
    - Can only install one of: laravel/framework[5.2.x-dev, dev-testing-encoding].
    - Can only install one of: laravel/framework[5.3.x-dev, dev-testing-encoding].
    - Can only install one of: laravel/framework[5.4.x-dev, dev-testing-encoding].
    - Can only install one of: laravel/framework[dev-testing-encoding, 5.4.x-dev].
    - Can only install one of: laravel/framework[dev-testing-encoding, 5.1.x-dev].
    - Can only install one of: laravel/framework[dev-testing-encoding, 5.2.x-dev].
    - Can only install one of: laravel/framework[dev-testing-encoding, 5.3.x-dev].
    - Installation request for laravel/framework dev-testing-encoding -> satisfiable by laravel/framework[dev-testing-e
ncoding].


Installation failed, reverting ./composer.json to its original content.

I tried to experiment with minimum-stability, and stability flags. To no avail. The best I could come up with is fork modelizer/selenium as well, and hardcode there laravel's branch I need:

diff --git a/composer.json b/composer.json
index 9036e47..65facf0 100644
--- a/composer.json
+++ b/composer.json
@@ -12,8 +12,14 @@
             "email": "john.hoopes@madisoncreativeweb.com"
         }
     ],
+    "repositories": [
+        {
+            "type": "vcs",
+            "url": "https://github.com/x-yuri/framework"
+        }
+    ],
     "require": {
-        "laravel/framework": "^5.1",
+        "laravel/framework": "dev-testing-encoding",
         "symfony/process": ">=2.7",
         "phpunit/phpunit-selenium": ">=1.2",
         "guzzlehttp/guzzle": "^6.2"

Add the repo to root composer.json:

{
    "type": "vcs",
    "url": "https://github.com/x-yuri/Selenium"
}

And then do: composer require modelizer/selenium=dev-laravel-testing-encoding. Which also means, I've got to fork laravel/socialite too, though it doesn't require laravel/framework directly. Can it be any simpler than this?

@stof
Copy link
Contributor

stof commented Dec 1, 2016

use version aliases: https://getcomposer.org/doc/articles/aliases.md

@alcohol
Copy link
Member

alcohol commented Dec 1, 2016

What @stof said:

    "require": {
        "laravel/framework": "dev-testing-encoding as 5.1.0"
    }

@alcohol alcohol closed this as completed Dec 1, 2016
@x-yuri
Copy link
Author

x-yuri commented Dec 1, 2016

Awesome, guys, you've made my day :)

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

No branches or pull requests

3 participants