googleads / googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP
Apache License 2.0
656 stars 769 forks source link

Cannot install with Laravel 6.2 #647

Closed callum-veloxcommerce closed 4 years ago

callum-veloxcommerce commented 4 years ago

While running this command:

composer require googleads/googleads-php-lib:dev-master

I get the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove phpdocumentor/reflection-common 2.0.0
    - Conclusion: don't install phpdocumentor/reflection-common 2.0.0
    - phpdocumentor/reflection-docblock 3.0.3 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.1.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.1.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.2 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.3 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.3.0 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.3.2 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.0.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.0.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.1.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.1.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.2.0 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.3.0 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.3.1 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - Can only install one of: phpdocumentor/reflection-common[1.0, 2.0.0].
    - Can only install one of: phpdocumentor/reflection-common[1.0.1, 2.0.0].
    - Installation request for phpdocumentor/reflection-common (locked at 2.0.0) -> satisfiable by phpdocumentor/reflection-common[2.0.0].
    - Installation request for googleads/googleads-php-lib dev-master -> satisfiable by googleads/googleads-php-lib[dev-master].
    - Conclusion: don't install phpdocumentor/reflection-docblock 5.0.0|install phpdocumentor/reflection-docblock 3.0.3|install phpdocumentor/reflection-docblock 3.1.0|install phpdocumentor/reflection-docblock 3.1.1|install phpdocumentor/reflection-docblock 3.2.0|install phpdocumentor/reflection-docblock 3.2.1|install phpdocumentor/reflection-docblock 3.2.2|install phpdocumentor/reflection-docblock 3.2.3|install phpdocumentor/reflection-docblock 3.3.0|install phpdocumentor/reflection-docblock 3.3.2|install phpdocumentor/reflection-docblock 4.0.0|install phpdocumentor/reflection-docblock 4.0.1|install phpdocumentor/reflection-docblock 4.1.0|install phpdocumentor/reflection-docblock 4.1.1|install phpdocumentor/reflection-docblock 4.2.0|install phpdocumentor/reflection-docblock 4.3.0|install phpdocumentor/reflection-docblock 4.3.1
    - Conclusion: remove phpdocumentor/reflection-docblock 5.0.0|install phpdocumentor/reflection-docblock 3.0.3|install phpdocumentor/reflection-docblock 3.1.0|install phpdocumentor/reflection-docblock 3.1.1|install phpdocumentor/reflection-docblock 3.2.0|install phpdocumentor/reflection-docblock 3.2.1|install phpdocumentor/reflection-docblock 3.2.2|install phpdocumentor/reflection-docblock 3.2.3|install phpdocumentor/reflection-docblock 3.3.0|install phpdocumentor/reflection-docblock 3.3.2|install phpdocumentor/reflection-docblock 4.0.0|install phpdocumentor/reflection-docblock 4.0.1|install phpdocumentor/reflection-docblock 4.1.0|install phpdocumentor/reflection-docblock 4.1.1|install phpdocumentor/reflection-docblock 4.2.0|install phpdocumentor/reflection-docblock 4.3.0|install phpdocumentor/reflection-docblock 4.3.1
    - googleads/googleads-php-lib dev-master requires phpdocumentor/reflection-docblock ^4.0.0 || ^3.0.3 -> satisfiable by phpdocumentor/reflection-docblock[3.0.3, 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.3.0, 3.3.2, 4.0.0, 4.0.1, 4.1.0, 4.1.1, 4.2.0, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[4.3.2, 5.0.0].
    - Can only install one of: phpdocumentor/reflection-docblock[4.3.3, 5.0.0].
    - Can only install one of: phpdocumentor/reflection-docblock[4.3.4, 5.0.0].
    - Installation request for phpdocumentor/reflection-docblock (locked at 5.0.0) -> satisfiable by phpdocumentor/reflection-docblock[5.0.0].
fiboknacky commented 4 years ago

Do you have other conflicting libraries? I check laravel/framework, but cannot find any reference to phpdocumentor/reflection-docblock.

callum-veloxcommerce commented 4 years ago

Here is the rest of my dependencies:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2",
        "browscap/browscap-php": "^4.2",
        "fideloper/proxy": "^4.0",
        "laravel/cashier": "^10.6",
        "laravel/framework": "^6.2",
        "laravel/passport": "^8.4",
        "laravel/tinker": "^2.0",
        "maatwebsite/excel": "^3.1",
        "owen-it/laravel-auditing": "^9.3",
        "piwik/device-detector": "^3.12"
    },
    "require-dev": {
        "facade/ignition": "^1.4",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^8.0"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}
fiboknacky commented 4 years ago
callum-veloxcommerce commented 4 years ago

apologies for the confusion, i used the laravel quickstart and haven't gotten around to swapping the name over yet.

I've removed composer lock and retried the composer require and i'm receiving the same issue. I also removed the browscap dependency as its no longer being used.

vagrant@homestead:~/velox-suggestions$ composer require googleads/googleads-php-lib
    1/1:        http://repo.packagist.org/p/provider-latest$3ff96e9198c53598a437fa13260f3b98fe059e5480c774b598592e223b2a2269.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Using version ^46.1 for googleads/googleads-php-lib
./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
    - Conclusion: remove phpdocumentor/reflection-common 2.0.0
    - Installation request for googleads/googleads-php-lib ^46.1 -> satisfiable by googleads/googleads-php-lib[46.1.0].
    - phpdocumentor/reflection-docblock 3.0.3 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.1.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.1.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.2 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.2.3 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.3.0 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 3.3.2 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.0.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.0.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.1.0 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.1.1 requires phpdocumentor/reflection-common ^1.0@dev -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.2.0 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.3.0 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - phpdocumentor/reflection-docblock 4.3.1 requires phpdocumentor/reflection-common ^1.0.0 -> satisfiable by phpdocumentor/reflection-common[1.0, 1.0.1].
    - Can only install one of: phpdocumentor/reflection-common[2.0.0, 1.0].
    - Can only install one of: phpdocumentor/reflection-common[2.0.0, 1.0.1].
    - Installation request for phpdocumentor/reflection-common (installed at 2.0.0) -> satisfiable by phpdocumentor/reflection-common[2.0.0].
    - Conclusion: remove phpdocumentor/reflection-docblock 5.0.0|install phpdocumentor/reflection-docblock 3.0.3|install phpdocumentor/reflection-docblock 3.1.0|install phpdocumentor/reflection-docblock 3.1.1|install phpdocumentor/reflection-docblock 3.2.0|install phpdocumentor/reflection-docblock 3.2.1|install phpdocumentor/reflection-docblock 3.2.2|install phpdocumentor/reflection-docblock 3.2.3|install phpdocumentor/reflection-docblock 3.3.0|install phpdocumentor/reflection-docblock 3.3.2|install phpdocumentor/reflection-docblock 4.0.0|install phpdocumentor/reflection-docblock 4.0.1|install phpdocumentor/reflection-docblock 4.1.0|install phpdocumentor/reflection-docblock 4.1.1|install phpdocumentor/reflection-docblock 4.2.0|install phpdocumentor/reflection-docblock 4.3.0|install phpdocumentor/reflection-docblock 4.3.1
    - googleads/googleads-php-lib 46.1.0 requires phpdocumentor/reflection-docblock ^4.0.0 || ^3.0.3 -> satisfiable by phpdocumentor/reflection-docblock[3.0.3, 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.3.0, 3.3.2, 4.0.0, 4.0.1, 4.1.0, 4.1.1, 4.2.0, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4].
    - Can only install one of: phpdocumentor/reflection-docblock[5.0.0, 4.3.2].
    - Can only install one of: phpdocumentor/reflection-docblock[5.0.0, 4.3.3].
    - Can only install one of: phpdocumentor/reflection-docblock[5.0.0, 4.3.4].
    - Installation request for phpdocumentor/reflection-docblock (installed at 5.0.0) -> satisfiable by phpdocumentor/reflection-docblock[5.0.0].
{
    "name": "velox/suggest",
    "type": "project",
    "description": "Suggest",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2",
        "fideloper/proxy": "^4.0",
        "laravel/cashier": "^10.6",
        "laravel/framework": "^6.2",
        "laravel/passport": "^8.4",
        "laravel/tinker": "^2.0",
        "maatwebsite/excel": "^3.1",
        "owen-it/laravel-auditing": "^9.3",
        "piwik/device-detector": "^3.12"
    },
    "require-dev": {
        "facade/ignition": "^1.4",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^8.0"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}
fiboknacky commented 4 years ago

I've checked some dependencies more deeply, and found that they should work fine together. However, somehow, when you do composer require even after removing vendor/ and composer.lock, it will prevent you from installing this library. The reason is because one or more existing dependencies require v5 of reflection-docblock.

Of course, we can also specify v5.0.0 in our composer.json too, but that requires some tests first. So, for now, I'd recommend specifying the dependency on our library directly in your composer.json like this:

    "require": {
        "php": "^7.2",
        "googleads/googleads-php-lib": "^46.1.0",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "^6.2",
        "laravel/tinker": "^2.0"
    },  

I've just tested and it worked fine. Please let me know if you can do so too.

callum-veloxcommerce commented 4 years ago

Thank you that worked fine!

Your time and effort is much appreciated.

fiboknacky commented 4 years ago

Glad that you can resolve this issue. :)