php - query - update laravel installer
laravel update de 5.1 a 5.2 error de actualizaciĆ³n del compositor (2)
Estoy tratando de actualizar laravel de 5.1 a 5.2. Seguí las instrucciones de acuerdo con la actualización del documento, pero estoy obteniendo este error cuando ejecuto udpate del compositor:
Error Output: PHP Fatal error: Call to undefined method Illuminate/Foundation/Application::bindShared() in /my_app/vendor/illuminate/html/HtmlSe rviceProvider.php on line 36
He buscado este problema y vi que la gente estaba recibiendo este problema al actualizar a la versión 5.1 y vi que el método bindShared ha sido reemplazado por singleton (), pero no quiero meterme con los archivos del proveedor. Aquí está mi config / app.php proveedores y alias matrices:
''providers'' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate/Auth/AuthServiceProvider::class,
Illuminate/Broadcasting/BroadcastServiceProvider::class,
Illuminate/Bus/BusServiceProvider::class,
Illuminate/Cache/CacheServiceProvider::class,
Illuminate/Foundation/Providers/ConsoleSupportServiceProvider::class,
Illuminate/Cookie/CookieServiceProvider::class,
Illuminate/Database/DatabaseServiceProvider::class,
Illuminate/Encryption/EncryptionServiceProvider::class,
Illuminate/Filesystem/FilesystemServiceProvider::class,
Illuminate/Foundation/Providers/FoundationServiceProvider::class,
Illuminate/Hashing/HashServiceProvider::class,
Illuminate/Mail/MailServiceProvider::class,
Illuminate/Pagination/PaginationServiceProvider::class,
Illuminate/Pipeline/PipelineServiceProvider::class,
Illuminate/Queue/QueueServiceProvider::class,
Illuminate/Redis/RedisServiceProvider::class,
Illuminate/Auth/Passwords/PasswordResetServiceProvider::class,
Illuminate/Session/SessionServiceProvider::class,
Illuminate/Translation/TranslationServiceProvider::class,
Illuminate/Validation/ValidationServiceProvider::class,
Illuminate/View/ViewServiceProvider::class,
Illuminate/Html/HtmlServiceProvider::class,
/*
* Application Service Providers...
*/
App/Providers/AppServiceProvider::class,
App/Providers/EventServiceProvider::class,
App/Providers/RouteServiceProvider::class,
App/Providers/ViewComposerServiceProvider::class,
Laracasts/Flash/FlashServiceProvider::class,
Baum/Providers/BaumServiceProvider::class
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don''t hinder performance.
|
*/
''aliases'' => [
''App'' => Illuminate/Support/Facades/App::class,
''Artisan'' => Illuminate/Support/Facades/Artisan::class,
''Auth'' => Illuminate/Support/Facades/Auth::class,
''Blade'' => Illuminate/Support/Facades/Blade::class,
''Bus'' => Illuminate/Support/Facades/Bus::class,
''Cache'' => Illuminate/Support/Facades/Cache::class,
''Config'' => Illuminate/Support/Facades/Config::class,
''Cookie'' => Illuminate/Support/Facades/Cookie::class,
''Crypt'' => Illuminate/Support/Facades/Crypt::class,
''DB'' => Illuminate/Support/Facades/DB::class,
''Eloquent'' => Illuminate/Database/Eloquent/Model::class,
''Event'' => Illuminate/Support/Facades/Event::class,
''File'' => Illuminate/Support/Facades/File::class,
''Hash'' => Illuminate/Support/Facades/Hash::class,
''Input'' => Illuminate/Support/Facades/Input::class,
''Inspiring'' => Illuminate/Foundation/Inspiring::class,
''Lang'' => Illuminate/Support/Facades/Lang::class,
''Log'' => Illuminate/Support/Facades/Log::class,
''Mail'' => Illuminate/Support/Facades/Mail::class,
''Password'' => Illuminate/Support/Facades/Password::class,
''Queue'' => Illuminate/Support/Facades/Queue::class,
''Redirect'' => Illuminate/Support/Facades/Redirect::class,
''Redis'' => Illuminate/Support/Facades/Redis::class,
''Request'' => Illuminate/Support/Facades/Request::class,
''Response'' => Illuminate/Support/Facades/Response::class,
''Route'' => Illuminate/Support/Facades/Route::class,
''Schema'' => Illuminate/Support/Facades/Schema::class,
''Session'' => Illuminate/Support/Facades/Session::class,
''Storage'' => Illuminate/Support/Facades/Storage::class,
''URL'' => Illuminate/Support/Facades/URL::class,
''Validator'' => Illuminate/Support/Facades/Validator::class,
''View'' => Illuminate/Support/Facades/View::class,
''Form'' => Illuminate/Html/FormFacade::class,
''Html'' => Illuminate/Html/HtmlFacade::class,
''Carbon'' => ''Carbon/Carbon'',
''Flash'' => Laracasts/Flash/Flash::class,
],
y aquí está mi compositor.json:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"repositories": [{
"type": "vcs",
"url": "https://github.com/nWidart/Elasticquent"
}],
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"doctrine/dbal": "^2.6@dev",
"illuminate/html": "^5.0@dev",
"laracasts/flash": "dev-master",
"fairholm/elasticquent": "dev-feature/laravel-5",
"baum/baum": "~1.1"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"symfony/dom-crawler": "~3.0",
"symfony/css-selector": "~3.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App//": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"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"
},
"minimum-stability": "dev",
"prefer-stable": true
}
Alguna idea de lo que debería hacer para arreglar esto? Empecé con una versión de instalación 5.1 de laravel.
Creo que debe usar https://laravelcollective.com/docs/5.2/html en lugar de illuminate/html
porque ahora está desactualizado en Laravel 5.2
.
El componente "illuminate/html"
ya no es compatible con Laravel y no es compatible con la versión 5.2.
Puede reemplazarlo con laravelcollective / html
Tienes que:
elimine la referencia de
"illuminate/html": "^5.0@dev"
, decomposer.json
agregue
"laravelcollective/html": "5.1.*"
(o la versión que desee)Ejecute la
composer update
para actualizar las dependencias (esto eliminará su componente"illuminate/html"
e instalará el componente"laravelcollective/html"
Ahora debe reemplazar su proveedor de servicios HTML con:
''providers'' => [
Collective/Html/HtmlServiceProvider::class,
],
y las fachadas:
''aliases'' => [
''Form'' => Collective/Html/FormFacade::class,
''Html'' => Collective/Html/HtmlFacade::class,
],