Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declaration of BackupManager\Laravel\Laravel51Compatibility::table(array $headers, $rows, $style = 'default') should be compatible with Illuminate\Consol e\Command::table($headers, $rows, $style = 'default') #88

Open
4sh3 opened this issue Sep 2, 2017 · 17 comments

Comments

@4sh3
Copy link

4sh3 commented Sep 2, 2017

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

@4sh3
Copy link
Author

4sh3 commented Sep 2, 2017

Solved, I just changed the function: public function table($headers, $rows, $style = 'default') in BackupManager\Laravel\Laravel51Compatibility

@ShawnMcCool
Copy link

I think that perhaps a better solution might be to create Laravel 55 compatibility.

@SergeyMiracle
Copy link

@ShawnMcCool PR was made several days ago...

@SergeyMiracle
Copy link

@ShawnMcCool any news on PR #87
What else needs to be done?

@whoacowboy
Copy link
Contributor

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.

@xembill
Copy link

xembill commented Sep 20, 2017

in Laravel55Compatibility
public function table($headers, $rows, $style = 'default', array $columnStyles = [])

that works fine...

@matthewscalf
Copy link

Hoping this gets pushed in soon, thanks!

@ShawnMcCool
Copy link

Submit a PR =) I'll merge it in.

@whoacowboy
Copy link
Contributor

whoacowboy commented Sep 22, 2017

@ShawnMcCool It's here. Can you tag it too?

@4sh3
Copy link
Author

4sh3 commented Sep 26, 2017

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...

@4sh3
Copy link
Author

4sh3 commented Sep 27, 2017

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)

@ShawnMcCool
Copy link

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? #91

@croucour
Copy link

croucour commented Dec 6, 2017

do the same for lumen (5.5) can be a great thing no ?

@ShawnMcCool
Copy link

I'll honestly merge anything at this point.

@scottybo
Copy link

scottybo commented Feb 14, 2018

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 = [])

@ShawnMcCool
Copy link

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?

@dennisvandenende
Copy link

I changed following files:
Laravel5DbListCommand
Laravel5DbBackupCommand
Laravel5DbRestoreCommand
from
use Laravel51Compatibility; into
use Laravel55Compatibility;

And works like a charm

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants