Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Laravel 5.4 Compatibility #27

Closed
alexc-hollywood opened this issue Jan 31, 2017 · 16 comments
Closed

Laravel 5.4 Compatibility #27

alexc-hollywood opened this issue Jan 31, 2017 · 16 comments
Assignees

Comments

@alexc-hollywood
Copy link

2 errors on update:

Warning: Ambiguous class resolution, "Cloudinary\Akamai" was found in both "vendor/cloudinary/cloudinary_php/src/Akamai.php" and "vendor/cloudinary/cloudinary_php/src/Cloudinary/Akamai.php", the first will be used.
> post-update-cmd: php artisan optimize                           
  [Symfony\Component\Debug\Exception\FatalThrowableError]              
  Call to undefined method Illuminate\Foundation\Application::share()  
  Script php artisan optimize handling the post-update-cmd event returned with error code 1
@jrm2k6
Copy link
Owner

jrm2k6 commented Jan 31, 2017

@azcoppen Thanks! Will try to get to this tonight and will push a 5.4 branch if it is alright with you? I haven't had time to update my projects

@jrm2k6 jrm2k6 self-assigned this Jan 31, 2017
@jrm2k6
Copy link
Owner

jrm2k6 commented Jan 31, 2017

@azcoppen for the warning, could it be because you pull the cloudinary_php library in your composer.json? It will be included by default when requiring cloudder, so maybe that can help!

@alexc-hollywood
Copy link
Author

alexc-hollywood commented Jan 31, 2017

@jrm2k6 That would be fantastic chap, thank you! I forked it into a private repo. Can do a PR if you like.

The issue is Laravel 5.4 removes share() in the register() method of the service provider. You just need to change share() to singleton().

Edit: this might require more, as i'm getting "illegal offset type" with PHP7.1. Will need your update - will wait for it instead of using a fork as it's causing errors atm.

Edit: Also, am not requiring Cloudinary API in composer.

@alexc-hollywood
Copy link
Author

@alexc-hollywood
Copy link
Author

Also, another error i'm getting here:

Warning: Ambiguous class resolution, "Cloudinary\Akamai" was found in both "vendor/cloudinary/cloudinary_php/src/Akamai.php" and "vendor/cloudinary/cloudinary_php/src/Cloudinary/Akamai.php", the first will be used.

@jrm2k6
Copy link
Owner

jrm2k6 commented Jan 31, 2017 via email

@alexc-hollywood
Copy link
Author

@jrm2k6 It's an incredibly useful package - thanks for your work. Only 1 more thing - any chance you could change the Facade name to something more uniform than Cloudder? Would be great to just use Cloudinary::upload()!

@jrm2k6
Copy link
Owner

jrm2k6 commented Jan 31, 2017

I am not sure I can change the name as I am not affiliated with Cloudinary in any way. Not sure I can use that name.

@jrm2k6
Copy link
Owner

jrm2k6 commented Feb 1, 2017

@azcoppen @nicodebin Just pushed a new branch, could you guys check and make sure it works? Works fine on my local.

@ghost
Copy link

ghost commented Feb 1, 2017

@jrm2k6 works fine in Lumen 5.4, thanks! I've made a PR (#29) for an additional change that is also needed. Please be sure this works fine with Laravel 5.4

@jrm2k6
Copy link
Owner

jrm2k6 commented Feb 1, 2017

@nicodebin Just merged it, thanks for your PR. I will double check that maybe on my lunch break, and will merge/release if it works fine. It looks like it is backwards compatible so all good! Thanks for your patience. I still have most of my side projects running on Laravel 5.2. 🚒

@ghost
Copy link

ghost commented Feb 1, 2017

@jrm2k6 cool thanks! Yeah, me too.. most of my projects are running in 5.2 too, and a very huge one in 4.2 😱

@alexc-hollywood
Copy link
Author

@jrm2k6 Testing later tonight - thanks so much for the speed you responded to the issue with!

@jrm2k6
Copy link
Owner

jrm2k6 commented Feb 2, 2017

@azcoppen let me know when it is confirmed, will try to release asap.

@alexc-hollywood
Copy link
Author

@jrm2k6 Yep, looks great!

  - Removing jrm2k6/cloudder (dev-master 534cd8c)
  - Installing jrm2k6/cloudder (dev-master 64f4615) Downloading: 100% Extracting archive

@jrm2k6
Copy link
Owner

jrm2k6 commented Feb 3, 2017 via email

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

No branches or pull requests

2 participants