我试图从Laravel 5.3升级到Laravel 5.4,但是当在php artisan Optimize中运行作曲家更新时,我在SentryServiceProvider中出现错误。 这是错误消息:
In SentryServiceProvider.php line 77:
Call to undefined method IlluminateFoundationApplication::share()
这是我的作曲家.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"
}
}
我尝试将SentryServiceProvider.php
中share()
的代码更改为singleton()
,但它不起作用。我试图研究更新 packagist 中的cartalyst/sentry
,但是,版本未更新且已弃用。
尝试运行composer update --ignore-platform-reqs