laravel
laravel copied to clipboard
Declaration of BackupManager\Laravel\Laravel51Compatibility::table(array $headers, $rows, $style = 'default') should be compatible with Illuminate\Consol e\Command::table($headers, $rows, $style = 'default')
Hi friends,
I am using windows 10 with php 7.1, I am trying to update laravel 5.4* to 5.5 and when I do composer update to my app:
[ErrorException] Declaration of BackupManager\Laravel\Laravel51Compatibility::table(array $headers, $rows, $style = 'default') should be compatible with Illuminate\Consol e\Command::table($headers, $rows, $style = 'default')
Script php artisan optimize handling the post-update-cmd event returned with error code 1
What can i do?
Thanks for your help
Solved, I just changed the function: public function table($headers, $rows, $style = 'default') in BackupManager\Laravel\Laravel51Compatibility
I think that perhaps a better solution might be to create Laravel 55 compatibility.
@ShawnMcCool PR was made several days ago...
@ShawnMcCool any news on PR #87 What else needs to be done?
Ironically I get this error upgrading from 5.4 to 5.5.
Declaration of BackupManager\Laravel\Laravel55Compatibility::table($headers, $rows,
$style = 'default') should be compatible with Illuminate\Console\Command::table($headers,
$rows, $tableStyle = 'default', array $columnStyles = Array)
if I change this
public function table($headers, $rows, $style = 'default')
to
public function table($headers, $rows, $style = 'default', array $columnStyles = [])
it works.
in Laravel55Compatibility
public function table($headers, $rows, $style = 'default', array $columnStyles = [])
that works fine...
Hoping this gets pushed in soon, thanks!
Submit a PR =) I'll merge it in.
@ShawnMcCool It's here. Can you tag it too?
Please solve it in the repository because when someone works with heroku should do composer updates on the server and is so hard change this each time you push the code correct this...
Error on Laravel55Compatibility:
[ErrorException] Declaration of BackupManager\Laravel\Laravel55Compatibility::table($headers , $rows, $style = 'default') should be compatible with Illuminate\Console\C ommand::table($headers, $rows, $tableStyle = 'default', array $columnStyles = Array)
Ok, I'm not sure why anyone would do composer update on a server. But, that's beside the point.
@4sh3 did you see this? https://github.com/backup-manager/laravel/pull/91
do the same for lumen (5.5) can be a great thing no ?
I'll honestly merge anything at this point.
Still having this issue on 5.4.. For anyone else wanting to modify vendor files (shudder), change Laravel51Compatibility to:
public function table($headers, $rows, $style = 'default', array $columnStyles = [])
There are different compatibility files for each version of Laravel's API change. This ticket is about 5.1. What happens when you use the 54 compatibility file?
I changed following files: Laravel5DbListCommand Laravel5DbBackupCommand Laravel5DbRestoreCommand from use Laravel51Compatibility; into use Laravel55Compatibility;
And works like a charm
cheers