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

Carbon Error on Plugin Installation #22

Closed
danielbruni opened this issue Mar 4, 2019 · 10 comments
Closed

Carbon Error on Plugin Installation #22

danielbruni opened this issue Mar 4, 2019 · 10 comments
Assignees
Labels
bug Something isn't working support User support tickets

Comments

@danielbruni
Copy link

Iam getting the following Error on a fresh October Installation with Apache and PHP 7.1 and 7.2:

Declaration of Jenssegers\Date\Date::add($interval) must be compatible with Carbon\CarbonInterface::add($unit, $value = 1, $overflow = NULL)

@rluders
Copy link
Owner

rluders commented Mar 4, 2019 via email

@danielbruni
Copy link
Author

danielbruni commented Mar 4, 2019

Thanks for the quick reply. Just made a new Octobercms install on my server and was trying to install your plugin (no other plugins installed) and during the installation process this error shows up.

There is a nesbot/carbon in your plugins vendors folder. Iam using OctoberCMS 447 and 448.
jenssegers/date seems to be a october requirement. Maybe there is a date-carbon version conflict.

@rluders
Copy link
Owner

rluders commented Mar 4, 2019 via email

@rluders
Copy link
Owner

rluders commented Mar 4, 2019

Looks like we have two packages colliding. The first one is installed by the OctoberCMS Library and the second one is being installed by the tymon/jwt-auth, causing an conflict between two Carbon versions.

At this point I have no idea how to solve it. I need to investigate.

@rluders rluders added bug Something isn't working support User support tickets labels Mar 4, 2019
@rluders
Copy link
Owner

rluders commented Mar 4, 2019

Just adding one more extra information... Looks like the real issue is related to 'jenssegers/date' that is using an outdated Carbon version. So, I was looking the repository and it seems a little bit abandoned for me... in this case, I'll try to submit a PR to update it's dependencies.

@rluders
Copy link
Owner

rluders commented Mar 11, 2019

OK. I'll try something else during this week, my initial aproach seems to be more complicated. So, it was working before, maybe I just need to 'downgrade' a version of the tymon/jwt-auth library that I'm using.

@rluders rluders pinned this issue Mar 11, 2019
@rluders
Copy link
Owner

rluders commented Mar 12, 2019

Just one workarround that could help for now:

The issue only ocurres if you run OctoberCMS over PHP 7.1+, so, if you downgrade your PHP to 7.0 it should be fine. It's not a solution, it's just an workarround while I'm working to fix it.

@rluders rluders self-assigned this Mar 12, 2019
@sandyandi
Copy link

@rluders can you please create a version of your plugin that use tymon/jwt-auth version 1.0.0-rc.3 instead of the latest version (1.0.0-rc.4)? rc3 doesn't have Carbon 2.

It makes sense to do so as your plugin is made for October CMS which doesn't support Carbon 2 yet.

@rluders
Copy link
Owner

rluders commented Mar 13, 2019 via email

@rluders
Copy link
Owner

rluders commented Mar 13, 2019

I posted today a patch, that downgrade the tymon/jwt-auth library to avoid the issues with Carbon. In my tests it worked fine (but, since I don't have unit tests for this plugin yet), if someone find something wrong, please, let me know.

It is possible that you need to remove the plugin and install it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support User support tickets
Projects
None yet
Development

No branches or pull requests

3 participants