Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Laravel 4.1 #16

Open
kentliau opened this issue Dec 2, 2013 · 17 comments
Open

Support for Laravel 4.1 #16

kentliau opened this issue Dec 2, 2013 · 17 comments

Comments

@kentliau
Copy link

kentliau commented Dec 2, 2013

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"
@tlgreg
Copy link

tlgreg commented Dec 2, 2013

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.

@jasonlewis
Copy link
Owner

I'll push a change to support 4.1 later today. Cheers.

@jasonlewis
Copy link
Owner

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.

@srtfisher
Copy link

Laravel 4.1 came today! Waiting on your release, can't go anywhere without the router!

@jasonlewis
Copy link
Owner

It'll be a priority for this weekend.
On 13 Dec 2013 03:46, "Sean Fisher" notifications@github.com 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//issues/16#issuecomment-30439246
.

@jasonlewis
Copy link
Owner

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" jason.lewis1991@gmail.com wrote:

It'll be a priority for this weekend.
On 13 Dec 2013 03:46, "Sean Fisher" notifications@github.com 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//issues/16#issuecomment-30439246
.

@jasonlewis
Copy link
Owner

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.

@jasonlewis jasonlewis reopened this Dec 13, 2013
@mrsimonbennett
Copy link

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)

@100terres
Copy link

is that someone managed to make it work?

@jbrooksuk
Copy link

Any news on this? I'm working on a complex app which could benefit from this.

@danielealbano
Copy link

+1

@jgrossi
Copy link

jgrossi commented Mar 25, 2014

Any news about 4.1 support?

@jasonlewis
Copy link
Owner

I don't have anything in the works as yet.

@stevebauman
Copy link

Damn looks like a great package, definitely interested in a L 4.1 version

@gcphost
Copy link

gcphost commented May 14, 2014

Ditto!

@dennisoderwald
Copy link

+1

@anthonysterling
Copy link

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');
        }

}

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

No branches or pull requests