enhanced-router
enhanced-router copied to clipboard
Support for Laravel 4.1
There are dependency version problem when updating to Laravel 4.1
does changing this could fix the problem?
"illuminate/support": "4.0.*",
"illuminate/routing": "4.0.*"
to
"illuminate/support": "4.0.0",
"illuminate/routing": "4.0.0"
4.0.0
would be worse actually, it only matches 4.0.0 and nothing else.
It could be ~4
or ~4.0
to make it as general for Laravel 4 as possible.
I'll push a change to support 4.1 later today. Cheers.
I was going to push the changes for this but I'm going to wait for a stable 4.1 release first. I'll need to fix up some things as well as I haven't tested it with the latest development of 4.1. I'd say there will be some issues as the router had a huge overhaul between 4.0 and 4.1. Hang tight.
Laravel 4.1 came today! Waiting on your release, can't go anywhere without the router!
It'll be a priority for this weekend. On 13 Dec 2013 03:46, "Sean Fisher" [email protected] wrote:
Laravel 4.1 came today! Waiting on your release, can't go anywhere without the router!
— Reply to this email directly or view it on GitHubhttps://github.com/jasonlewis/enhanced-router/issues/16#issuecomment-30439246 .
You're more then welcome to investigate the changes necessary for it to work with 4.1. ☺ On 13 Dec 2013 06:35, "Jason Lewis" [email protected] wrote:
It'll be a priority for this weekend. On 13 Dec 2013 03:46, "Sean Fisher" [email protected] wrote:
Laravel 4.1 came today! Waiting on your release, can't go anywhere without the router!
— Reply to this email directly or view it on GitHubhttps://github.com/jasonlewis/enhanced-router/issues/16#issuecomment-30439246 .
I don't want this closed yet. Going to investigate how much work would be required to make this package 4.1 compatible but I am aware it could be rather difficult as the router has undergone a lot of change since 4.0.
I did have a little look for you but ran out of time.
The interface of classes have changed
Argument 1 passed to Illuminate\Routing\Router::__construct() must be an instance of Illuminate\Events\Dispatcher, instance of Illuminate\Foundation\Application given, called in /vendor/jasonlewis/enhanced-router/src/JasonLewis/EnhancedRouter/EnhancedRouterServiceProvider.php on line 23 and defined
Declaration of JasonLewis\EnhancedRouter\Router::findPatternFilters() should be compatible with Illuminate\Routing\Router::findPatternFilters($request)
Declaration of JasonLewis\EnhancedRouter\Router::dispatch() should be compatible with Illuminate\Routing\Router::dispatch(Illuminate\Http\Request $request)
is that someone managed to make it work?
Any news on this? I'm working on a complex app which could benefit from this.
+1
Any news about 4.1 support?
I don't have anything in the works as yet.
Damn looks like a great package, definitely interested in a L 4.1 version
Ditto!
+1
This gets round the updated Router dependencies.
src/JasonLewis/EnhancedRouter/EnhancedRouterServiceProvider.php
<?php namespace JasonLewis\EnhancedRouter;
use Illuminate\Support\ServiceProvider;
class EnhancedRouterServiceProvider extends ServiceProvider {
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app['router'] = $this->app->share(function($app)
{
$router = new Router($this->app->make('Illuminate\Events\Dispatcher'), $app);
// If the current application environment is "testing", we will disable the
// routing filters, since they can be tested independently of the routes
// and just get in the way of our typical controller testing concerns.
if ($app['env'] == 'testing')
{
$router->disableFilters();
}
return $router;
});
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return array('router');
}
}