Конфликт с движением ларавеллы / светского человека tp laravel 7 - PullRequest
0 голосов
/ 16 апреля 2020

Я пытаюсь переместить ветку laravel 6 appto 7x и у меня возникла проблема с laravel / socialite, похоже, разные пакеты зависят от разных версий laravel / socialite:

 Problem 1
    - Installation request for laravel/socialite dev-master -> satisfiable by laravel/socialite[dev-master].
    - socialiteproviders/manager dev-master requires laravel/socialite ~3.0|~4.0 -> satisfiable by laravel/socialite[3.0.x-dev, 4.0.x-dev].
    - Can only install one of: laravel/socialite[dev-master, 3.0.x-dev].
    - Can only install one of: laravel/socialite[dev-master, 4.0.x-dev].
    - Installation request for socialiteproviders/manager dev-master -> satisfiable by socialiteproviders/manager[dev-master].

В моем composer. json:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.2.5",
        "alaouy/youtube": "^2.2",
        "aloha/twilio": "^4.0",
        "arrilot/laravel-widgets": "^3.12",
        "cornford/googlmapper": "2.*",
        "cviebrock/eloquent-sluggable": "^7.0",
        "davejamesmiller/laravel-breadcrumbs": "5.x",
        "doctrine/dbal": "^2.8",
        "facebook/graph-sdk": "^5.7",
        "fideloper/proxy": "^4.0",
        "google/apiclient": "dev-master",
        "guzzlehttp/guzzle": "6.5.x-dev",
        "intervention/image": "^2.4",
        "itsgoingd/clockwork": "^3.0",
        "jrean/laravel-user-verification": "dev-master",
        "laravel/cashier": "^10.3",
        "laravel/framework": "^7.0",
        "laravel/socialite": "dev-master",
        "laravel/tinker": "^2.0",
        "laravelium/sitemap": "7.0.1",
        "maatwebsite/excel": "^3.1",
        "qlick/laravel-full-calendar": "~1.0",
        "mews/captcha": "3.1.0",
        "mews/purifier": "3.2.0",
        "paypal/rest-api-sdk-php": "*",
        "pelago/emogrifier": "3.1.0",
        "proengsoft/laravel-jsvalidation": ">2.2.0",
        "s-ichikawa/laravel-sendgrid-driver": "~2.0",
        "snowfire/beautymail": "dev-master",
        "socialiteproviders/manager": "dev-master",
        "socialiteproviders/instagram": "dev-master",
        "spipu/html2pdf": "^5.2",
        "stripe/stripe-php": "^7.2",
        "symfony/psr-http-message-bridge": "^1.2",
        "themsaid/laravel-mail-preview": "dev-master",
        "unisharp/laravel-filemanager": "^1.9",
        "wboyz/laravel-enum": "^0.2.1",
        "willvincent/feeds": "dev-master",
        "yajra/laravel-datatables-oracle": "^9.0.0",
        "zendframework/zend-diactoros": "^2.1"
    },
    "require-dev": {
    },
    ...
}

Я не смог решить проблему. Каким образом это можно сделать?

МОДИФИЦИРОВАННЫЙ БЛОК: Я добавил определения репозиториев в composer. json:

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/jeremykenedy/Generators-1.git"
    }
],
"require": {
    "php": "^7.2.5",
    "alaouy/youtube": "^2.2",
    "aloha/twilio": "^4.0",
    "arrilot/laravel-widgets": "^3.12",
    "cornford/googlmapper": "2.*",
    "cviebrock/eloquent-sluggable": "^7.0",
    "davejamesmiller/laravel-breadcrumbs": "5.x",
    "doctrine/dbal": "^2.8",
    "facebook/graph-sdk": "^5.7",
    "fideloper/proxy": "^4.0",
    "google/apiclient": "dev-master",
    "guzzlehttp/guzzle": "6.5.x-dev",
    "intervention/image": "^2.4",
    "itsgoingd/clockwork": "^3.0",
    "jrean/laravel-user-verification": "dev-master",
    "laravel/cashier": "^10.3",
    "laravel/framework": "^7.0",
    "laravel/socialite": "dev-master",
    "laravel/tinker": "^2.0",
    "laravelium/sitemap": "7.0.1",
    "maatwebsite/excel": "^3.1",
    "mews/captcha": "3.1.0",
    "mews/purifier": "3.2.0",
    "paypal/rest-api-sdk-php": "*",
    "pelago/emogrifier": "3.1.0",
    "proengsoft/laravel-jsvalidation": ">2.2.0",
    "qlick/laravel-full-calendar": "~1.0",
    "s-ichikawa/laravel-sendgrid-driver": "~2.0",
    "snowfire/beautymail": "dev-master",
    "socialiteproviders/generators": "^4.6",
    "socialiteproviders/instagram": "dev-master",
    "socialiteproviders/manager": "dev-master",
    "spatie/browsershot": "^3.27",
    "spatie/db-dumper": "^2.14",
    "spatie/laravel-activitylog": "^3.1",
    "spatie/laravel-backup": "^6.1",
    "spatie/laravel-feed": "^2.1",
    "spatie/laravel-image-optimizer": "^1.4",
    "spatie/laravel-newsletter": "^4.2",
    "spatie/laravel-sitemap": "^5.3",
    "spatie/laravel-tags": "^2.1",
    "spipu/html2pdf": "^5.2",
    "stripe/stripe-php": "^7.2",
    "symfony/psr-http-message-bridge": "^1.2",
    "themsaid/laravel-mail-preview": "dev-master",
    "unisharp/laravel-filemanager": "^1.9",
    "wboyz/laravel-enum": "^0.2.1",
    "willvincent/feeds": "dev-master",
    "yajra/laravel-datatables-oracle": "^9.0.0",
    "zendframework/zend-diactoros": "^2.1"
},
"require-dev": {
    "barryvdh/laravel-debugbar": "^3.1",
    "filp/whoops": "^2.0",
    "fzaninotto/faker": "^1.4",
    "mockery/mockery": "^1.0",
    "nunomaduro/collision": "4.1",
    "orangehill/iseed": "^2.6",
    "phpunit/phpunit": "^8.5"
},

Но я получил ошибку:

$ composer require socialiteproviders/generators
Using version ^4.6 for socialiteproviders/generators           
./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 laravel/socialite dev-master -> satisfiable by laravel/socialite[dev-master].
    - socialiteproviders/manager dev-master requires laravel/socialite ~3.0|~4.0 -> satisfiable by laravel/socialite[3.0.x-dev, 4.0.x-dev].
    - Can only install one of: laravel/socialite[dev-master, 3.0.x-dev].
    - Can only install one of: laravel/socialite[dev-master, 4.0.x-dev].
    - Installation request for socialiteproviders/manager dev-master -> satisfiable by socialiteproviders/manager[dev-master].

Нужно ли мне убрать некоторые пункты из "Требовать" моего composer. json? Что нужно заменить социальными провайдерами / генераторами?

МОДИФИЦИРОВАННЫЙ БЛОК # 2: Я пытаюсь получить другую ошибку:

$ composer dump-autoload                                                                                                                                
Generating optimized autoload files                                                                                                                                                                  
Class Illuminate\Foundation\ComposerScripts is not autoloadable, can not call post-autoload-dump script                                                                                              
> @php artisan package:discover                                                                                                                                                                      

Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /mnt/_work_sdb8/wwwroot/lar/votes/bootstrap/app.php:14                                                           
Stack trace:
#0 /mnt/_work_sdb8/wwwroot/lar/votes/artisan(20): require_once()
#1 {main}
  thrown in /mnt/_work_sdb8/wwwroot/lar/votes/bootstrap/app.php on line 14
PHP Fatal error:  Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /mnt/_work_sdb8/wwwroot/lar/votes/bootstrap/app.php:14
Stack trace:
#0 /mnt/_work_sdb8/wwwroot/lar/votes/artisan(20): require_once()
#1 {main}
  thrown in /mnt/_work_sdb8/wwwroot/lar/votes/bootstrap/app.php on line 14
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

В моем загрузчике / приложении. php:

<?php


$app = new Illuminate\Foundation\Application(
    realpath(__DIR__ . '/../')
);

Потерял ли я некоторые объявления?

МОДИФИЦИРОВАННЫЙ БЛОК № 3: Я пытался следить за порядком ваших файлов: блокирует "ключевые слова", "лицензию" "," type "," require "с

"laravel/socialite": "dev-master",
...
"socialiteproviders/generators": "^4.6",
"socialiteproviders/manager": "dev-master",
"socialiteproviders/instagram": "dev-master"

внизу

следующими блоками:

репозиториев" require-dev ",

" ": [{" type ":" vcs "," url ":" https://github.com/jeremykenedy/Generators-1.git "}],

" автозагрузка ":

my composer . json имеет:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "type": "project",

    "require": {
        "php": "^7.2.5",
        "alaouy/youtube": "^2.2",
        "aloha/twilio": "^4.0",
        "arrilot/laravel-widgets": "^3.12",
        "cornford/googlmapper": "2.*",
        "cviebrock/eloquent-sluggable": "^7.0",
        "davejamesmiller/laravel-breadcrumbs": "5.x",
        "doctrine/dbal": "^2.8",
        "facebook/graph-sdk": "^5.7",
        "fideloper/proxy": "^4.0",
        "google/apiclient": "dev-master",
        "guzzlehttp/guzzle": "6.5.x-dev",
        "intervention/image": "^2.4",
        "itsgoingd/clockwork": "^3.0",
        "jrean/laravel-user-verification": "dev-master",
        "laravel/cashier": "^10.3",
        "laravel/framework": "^7.0",
        "laravel/socialite": "dev-master",
        "laravel/tinker": "^2.0",
        "laravelium/sitemap": "7.0.1",
        "maatwebsite/excel": "^3.1",
        "qlick/laravel-full-calendar": "~1.0",
        "mews/captcha": "3.1.0",
        "mews/purifier": "3.2.0",
        "paypal/rest-api-sdk-php": "*",
        "pelago/emogrifier": "3.1.0",
        "proengsoft/laravel-jsvalidation": ">2.2.0",
        "s-ichikawa/laravel-sendgrid-driver": "~2.0",
        "snowfire/beautymail": "dev-master",

        "spatie/browsershot": "^3.27",
        "spatie/db-dumper": "^2.14",
        "spatie/laravel-activitylog": "^3.1",
        "spatie/laravel-backup": "^6.1",
        "spatie/laravel-feed": "^2.1",
        "spatie/laravel-image-optimizer": "^1.4",
        "spatie/laravel-newsletter": "^4.2",
        "spatie/laravel-sitemap": "^5.3",
        "spatie/laravel-tags": "^2.1",
        "spipu/html2pdf": "^5.2",
        "stripe/stripe-php": "^7.2",
        "symfony/psr-http-message-bridge": "^1.2",
        "themsaid/laravel-mail-preview": "dev-master",
        "unisharp/laravel-filemanager": "^1.9",
        "wboyz/laravel-enum": "^0.2.1",
        "willvincent/feeds": "dev-master",
        "yajra/laravel-datatables-oracle": "^9.0.0",
        "zendframework/zend-diactoros": "^2.1",

        "socialiteproviders/generators": "^4.6",
        "socialiteproviders/manager": "dev-master",
        "socialiteproviders/instagram": "dev-master"
    },

    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.1",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "4.1",
        "orangehill/iseed": "^2.6",
        "phpunit/phpunit": "^8.5"
    },

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/jeremykenedy/Generators-1.git"
        }
    ],

    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ],
        "post-update-cmd": [
            "php artisan vendor:publish --provider=\"Proengsoft\\JsValidation\\JsValidationServiceProvider\" --tag=public --force"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

Но я все еще получил ошибку:

$ composer install
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 laravel/socialite dev-master -> satisfiable by laravel/socialite[dev-master].
    - socialiteproviders/manager dev-master requires laravel/socialite ~3.0|~4.0 -> satisfiable by laravel/socialite[3.0.x-dev, 4.0.x-dev].
    - Can only install one of: laravel/socialite[dev-master, 3.0.x-dev].
    - Can only install one of: laravel/socialite[dev-master, 4.0.x-dev].
    - Installation request for socialiteproviders/manager dev-master -> satisfiable by socialiteproviders/manager[dev-master].

Какой порядок неправильный?

Спасибо!

1 Ответ

1 голос
/ 16 апреля 2020

В настоящее время Socialite не обновляется для обработки Laravel 7.

Но есть способ обойти это.

Вы можете разветвить проект, обновив composer вашего форка до Позвольте 7, а затем обновите composer.json в вашем проекте. Я делал это до тех пор, пока автор не добавил поддержку L7.

Вот как я это сделал:

Мои проекты composer.json, которые вызывают мой форк:

    "repositories": [
        {
            "type": "vcs",
            "url":  "https://github.com/jeremykenedy/Generators-1.git"
        }
    ],

А потом я делаю обычный composer update или composer install socialiteproviders/generators, а затем он использует мой форк, у которого есть поддержка в это время.

Мои проекты composer:

https://github.com/jeremykenedy/laravel-auth/blob/master/composer.json#L37

https://github.com/jeremykenedy/laravel-auth/blob/master/composer.json#L51

Мой разветвленный социалист composer, который поддерживает L7: https://github.com/jeremykenedy/Generators-1/blob/master/composer.json#L19

"socialiteproviders / manager": "^ 3.5"

https://github.com/SocialiteProviders/Manager/releases

"socialiteproviders / instagram": "^ 3.0"

https://github.com/SocialiteProviders/Instagram/releases

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...