larasearch icon indicating copy to clipboard operation
larasearch copied to clipboard

Added Support for Laravel 5

Open innonagle opened this issue 9 years ago • 6 comments

Use the Iverberk\Laraserach\Providers\L5ServiceProvider for Laravel 5 and Iverberk\Larasearch\Providers\L4ServiceProvider for Laravel 4. For backwards compatibility Iverberk\Larasearch\LarasearchServiceProvider simple extends L4ServiceProvider.

innonagle avatar Mar 31 '15 03:03 innonagle

Thanks for this major effort. I've been in the process of switching jobs and had very little time to properly maintain this. I checked out your branch and ran a composer update. I wanted to run the tests but I run into:

Cannot redeclare any() (previously declared in /home/Ivo/Projects/Larasearch/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php:362) in /home/Ivo/Projects/Larasearch/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php on line 24

Are you able to run the tests?

iverberk avatar Mar 31 '15 08:03 iverberk

Yes. I was able to run the tests in a Laravel Homestead VM. Please let me know any information that may help me recreate this.

Cheers, -Chris

The roots of education are bitter, but the fruit is sweet --Aristotle

On Mar 31, 2015, at 4:55 AM, iverberk [email protected] wrote:

Thanks for this major effort. I've been in the process of switching jobs and had very little time to properly maintain this. I checked out your branch and ran a composer update. I wanted to run the tests but I run into:

Cannot redeclare any() (previously declared in /home/Ivo/Projects/Larasearch/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php:362) in /home/Ivo/Projects/Larasearch/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php on line 24 Are you able to run the tests?

— Reply to this email directly or view it on GitHub.

innonagle avatar Mar 31 '15 11:03 innonagle

Sorry didn't recognize this earlier.

I ran into this earlier and it's caused by a require statement in the tests directory. If you look at the tests/Iverberk/Larasearch/Providers/L4ServiceProvider.php you can see I changed it to a require_once. Did git auto-merge in my pull request?

innonagle avatar Mar 31 '15 13:03 innonagle

So, I've been looking to merge this today. I believe there is a problem with the Arrayable interface. The names are different between L4 en L5 and I don't see any easy way around this. My suggestion would be to continue with Laravel 5 from now on. People still using L4 can use a different branch and any additional features could be backported if necessary. Thoughts? I will remove the L4/L5 distinction in the serviceproviders if you agree.

iverberk avatar Apr 17 '15 08:04 iverberk

Sounds Good to me. I was trying to make it as painless as possible but obviously that’s not possible. At least for package developers.

Warm regards, -Chris

Stay Hungry, Stay Foolish.

On Apr 17, 2015, at 4:17 AM, iverberk [email protected] wrote:

So, I've been looking to merge this today. I believe there is a problem with the Arrayable interface. The names are different between L4 en L5 and I don't see any easy way around this. My suggestion would be to continue with Laravel 5 from now on. People still using L4 can use a different branch and any additional features could be backported if necessary. Thoughts? I will remove the L4/L5 distinction in the serviceproviders if you agree.

— Reply to this email directly or view it on GitHub.

innonagle avatar Apr 17 '15 12:04 innonagle

I remember reading on Twitter that this is how Taylor suggested handling L5 upgrades. Different branches for different versions of Laravel.

This package looks great and I would love to use it in my L5 project I start working on this week. Do you have an eta for L5 support?

Thanks

joshhornby avatar Apr 18 '15 23:04 joshhornby