laravel-ab icon indicating copy to clipboard operation
laravel-ab copied to clipboard

Support for Laravel 5

Open Butochnikov opened this issue 9 years ago • 19 comments

Please add support for laravel 5

Butochnikov avatar Apr 02 '15 23:04 Butochnikov

Laravel 5 is already supported.

jenssegers avatar Apr 03 '15 07:04 jenssegers

i'm sorry, but no.

After install, error:

>php artisan
[BadMethodCallException]
  Call to undefined method [package]

This method is no longer supported:

$this->package('jenssegers/ab', 'ab', realpath(__DIR__));

https://github.com/jenssegers/laravel-ab/blob/master/src/TesterServiceProvider.php#L25

Butochnikov avatar Apr 03 '15 10:04 Butochnikov

What is your solution?

Butochnikov avatar Apr 17 '15 01:04 Butochnikov

@jenssegers any idea on support for Laravel 5? Was looking for a A/B split testing package this seems perfect...but no Laravel 5 support :-(

garygreen avatar May 12 '15 16:05 garygreen

I will look into it when I can find some spare time :)

jenssegers avatar May 12 '15 16:05 jenssegers

I can do a PR if your interested? Should be pretty straight forward adding support really...

In an ideal world, I think this a/b split testing is a perfect case for middleware usage SplitTestingMiddleware which will decide what experiment to use etc. But let's get L5 up and running first ;-D

garygreen avatar May 12 '15 16:05 garygreen

Yeah indeed. The middleware might be useful for Laravel 5, but will break Laravel 4 compatibility though. Or we could just create a new major version and make it Laravel 5 only.

The main thing that was keeping me from adding L5 compatibility was the configuration loading. I did not really look into that yet.

jenssegers avatar May 12 '15 16:05 jenssegers

It's really easy with the config loading. Your just make a call to $this->mergeConfigFrom(...) coupled with a $this->publishes() for the config file.

The middleware thing could just be a usage 'option' and not a breaking change.

garygreen avatar May 12 '15 16:05 garygreen

Any news on this? The package is still not yet working for Laravel 5.

Jamongkad avatar Jul 28 '15 07:07 Jamongkad

I will take a look this weekend. If anyone wants to do a pull request that would be cool :)

jenssegers avatar Jul 28 '15 08:07 jenssegers

That would be great :+1:

Jamongkad avatar Jul 28 '15 11:07 Jamongkad

Hi!

I created a new pull request with the changes to migrate Laravel from 4 to 5. Only need to upgrade Travis to pass the tests. https://github.com/rafelsanso/laravel-ab

If you think the changes are correct, just missing pull accept the request.

Greetings!

rafelsanso avatar Aug 03 '15 14:08 rafelsanso

Is this working for L5 now?

chicag0 avatar Jan 18 '16 01:01 chicag0

is this working for Laravel 5.3?

kenny08gt avatar Jan 11 '17 17:01 kenny08gt

This is not working for Laravel 5.4. [Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Foundation\Application::share() upon running the publish the config or after including the service provider

zablockijj avatar Mar 06 '17 23:03 zablockijj

See https://laracasts.com/discuss/channels/laravel/undefined-method-illuminatefoundationapplicationshare-when-upgrading-to-laravel-54

zablockijj avatar Mar 06 '17 23:03 zablockijj

This doesn't work with Laravel 5.4 even after changing ->share to ->singleton in the vendor package.

bfblackjack avatar May 15 '17 21:05 bfblackjack

Any updates?

bart avatar Jul 17 '17 08:07 bart

I published a new package for ab testing that supports laravel 5.

ben182 avatar Feb 10 '19 11:02 ben182