jenssegers / laravel-ab

A server-side A/B testing tool for Laravel.
288 stars 46 forks source link

Support for Laravel 5 #6

Open Butochnikov opened 9 years ago

Butochnikov commented 9 years ago

Please add support for laravel 5

jenssegers commented 9 years ago

Laravel 5 is already supported.

Butochnikov commented 9 years ago

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 commented 9 years ago

What is your solution?

garygreen commented 9 years ago

@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 :-(

jenssegers commented 9 years ago

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

garygreen commented 9 years ago

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

jenssegers commented 9 years ago

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.

garygreen commented 9 years ago

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.

Jamongkad commented 9 years ago

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

jenssegers commented 9 years ago

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

Jamongkad commented 9 years ago

That would be great :+1:

rafelsanso commented 9 years ago

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!

chicag0 commented 8 years ago

Is this working for L5 now?

kenny08gt commented 7 years ago

is this working for Laravel 5.3?

zablockijj commented 7 years ago

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 commented 7 years ago

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

bfblackjack commented 7 years ago

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

bart commented 7 years ago

Any updates?

ben182 commented 5 years ago

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