我试图从Laravel 5.3升级到Laravel 5.4,但是当在php artisan optimize中运行composer update时,我在SentryServiceProvider中遇到错误。这是错误消息:In SentryServiceProvider.php line 77: Call to undefined method Illuminate\Foundation\Application::share()
这是我的composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.4.36",
"doctrine/dbal": "2.5",
"cartalyst/sentry": "dev-feature/laravel-5",
"tymon/jwt-auth": "0.5.*",
"guzzlehttp/guzzle": "^6.2",
"barryvdh/laravel-cors": "0.9.x",
"guzzlehttp/oauth-subscriber": "0.3.*",
"intervention/image": "2.3",
"yajra/laravel-datatables-oracle": "6.3",
"yaro/log-envelope": "1.*",
"mcamara/laravel-localization": "1.0.*",
"schuppo/password-strength": "~1.5",
"maatwebsite/excel": "2.1.29",
"tecnick.com/tcpdf": "~6.0.0",
"cviebrock/eloquent-sluggable": "^3.1",
"predis/predis": "^1.0",
"nicolaslopezj/searchable": "1.*",
"zizaco/entrust": "5.2.x-dev",
"facebook/php-sdk-v4": "~5.0",
"facebook/graph-sdk": "^5.3",
"torann/currency": "^0.3.1",
"league/flysystem-aws-s3-v3": "^1.0",
"s-ichikawa/laravel-sendgrid-driver": "~1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7",
"phpspec/phpspec": "~2.1",
"symfony/dom-crawler": "~3.1",
"symfony/css-selector": "~3.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
}
}
我已经尝试改变一些代码share()
在SentryServiceProvider.php
到singleton()
,但它不工作。我试图在packagist中研究更新cartalyst/sentry
,但是,版本没有更新和弃用。
1条答案
按热度按时间yquaqz181#
尝试运行
composer update --ignore-platform-reqs