Comments (50)
100% the plan once it's accepted 👍
from route.
Sweet. Good news. Feel free to close this out.
from route.
Worth keeping open for clarification to others, I'll rename to reflect as a task
from route.
@codeguy would actually like your input re a middleware strategy if you'd be OK with me shooting you an email when I have a bit of time?
from route.
Sounds great! You can reach me at hello at joshlockhart dot com.
from route.
Good man, thanks
from route.
Just another quick one, are you planning an implementation of PSR-7 for Slim 3? Obviously we'll be waiting a while for the Enterprises so if you are planning something, I'd give you a friendly nudge to make it a standalone package :-)
from route.
Yes Slim 3 will have PSR-7 messages objects. I should probably split that into a separate component for sure.
from route.
Would be ideal for me, don't want to take the implementation on myself right now but obviously need to point to an implementation once I swap it out
from route.
@philipobenito about middleware strategy: I think stackphp will depend on PSR-7 instead of http foundation once it's out. So imo following stackphp would be a good move.
Instead of depending on an implementation of PSR-7, league/route should depend on psr/http-message.
from route.
@hannesvdvreken PSR-7 === psr/http-message in this context, depending on the interfaces resulting from PSR-7. My point is that @codeguy is working on an implementation that I'd like to point to from a documentation perspective. Also I'm using Route heavily day to day so I'll need an implementation pretty quickly for my own use :-)
from route.
@hannesvdvreken Yep, we all have the same goal. Everything will be coded for PSR-7 interfaces and not particular implementation of such.
from route.
That was always the aim with Route, ideally to write an application that was properly agnostic of it's framework/bootstrap, I want people to be able to move away from League\Route if they want to, and with the look of what @codeguy is doing with Slim 3, it would be minimal work to drop an app built on this router straight in to Slim and for it to work, first example of the FIG stuff working in the wild hopefully, which I'm kind of excited about.
from route.
@philipobenito I'm pretty sure I'm going to use Route in Slim 3... if it doesn't support PSR7 by release date, I'll just write a quick strategy for it.
from route.
@codeguy that's fantastic news, if you need anything from me just shout, even if that be a specific tag for you to use until the PSR is official
from route.
@philipobenito Pushed an experimental branch for you to review that integrates League/Route. You'll want to look at these files specifically:
- https://github.com/slimphp/Slim/blob/develop-route/Slim/Router.php
- https://github.com/slimphp/Slim/blob/develop-route/Slim/RouteStrategy.php
- https://github.com/slimphp/Slim/blob/develop-route/Slim/Route.php
- https://github.com/slimphp/Slim/blob/develop-route/Slim/App.php#L245
from route.
@philipobenito: 👌 pointing to an implementation from docs. We're on the same page then ;-)
from route.
All looks good @codeguy, I wrestled with the idea of catching not found etc within the strategy but settled on the opinion that it's better outside of there for the user to decide what to do. Will you be exposing the container or continuing with Pimple like it says in your blog post?
from route.
May as well move over to League/container to reduce dependencies.
from route.
Ok so I'm planning a simplification of the API which will probably be much better for you, we can discuss what changes I have planned before release. Do you have a release date you're aiming for then I can aim to get v2 of both packages ready for then? Route won't be changing much at all, just the dependency change and a possible filesystem caching layer for defined routes so that it's not interacted with every request (this is something built in to FastRoute). Container again isn't gonna be changing in terms of functionality, just a big internal tidy up and improving the cohesiveness between features.
from route.
No hard release date yet.
from route.
Ok, well I'll be starting my planned works the next couple of days and shouldn't take me too long so I'll keep you updated to public changes.
from route.
👍
from route.
@philipobenito Not sure if your changes will include this or not, but can you create a new tag/branch that does not have the Symfony HTTP Foundation dependency in composer.json
? No immediate rush.
from route.
Yeah, I'll create you a branch later tonight and alias a packagist tag to it then any specifics for Slim can be put in there
from route.
@codeguy hopefully this will help for now, http exceptions and and json responses will be broken for now but will fix that tomorrow 1f97cd5
from route.
@philipobenito After some experimentation, I've found it's going to be easier and cleaner to use FastRoute directly. However, I'm definitely going to extract the PSR-7 stuff into a separate component and do what I can to advertise and help league/route.
from route.
@codeguy That makes sense based on what you're doing, look forward to the PSR-7 package though, aiming to get that implemented asap.
from route.
@codeguy @philipobenito are you sure that stackphp will rely on PSR-7? Because I heard other news. I was also thinking about creating a middleware package for PSR-7, because phly/conduit is not really what I imagine as the clone of stackphp.
In the meantime check phly/http which is a HTTP Message implementation created by the editor of the PSR.
from route.
Some update: PSR 7 is out. There are already a few implementations out there, the most sane ones:
They both provide the psr/http-message-implementation
virtual package.
from route.
@sagikazarmark v2 is due soon and will depend on the abstractions but not provide an implementation by default. It will simply suggest several alternatives and the documentation/skeleton applications will handle the implementation details.
from route.
The provided virtual package is great for both directly requiring or suggesting.
from route.
I would probably extract the PSR7 part from the main package and move it to a separate one so that you can require the virtual package instead of suggesting it.
from route.
I agree with @sagikazarmark about moving PSR7 implementation to a separate package!
from route.
@philipobenito do you want me to work on a PR for this?
from route.
It's actually already being worked on for v2, was waiting for the vote to pass before finalising but thank you.
Sent from my iPhone
On 21 May 2015, at 17:19, Woody Gilk [email protected] wrote:
@philipobenito do you want me to work on a PR for this?
—
Reply to this email directly or view it on GitHub.
from route.
@philipobenito when can we expect to see a branch?
from route.
@philipobenito Which implementations are being suggested going forward using PSR-7 with Route?
from route.
It will be completely up to the user which implementation is used but there will be a section in the docs to outline options.
Sent from my iPhone
On 21 May 2015, at 17:41, Daniel Olfelt [email protected] wrote:
@philipobenito Which implementations are being suggested going forward using PSR-7 with Route?
—
Reply to this email directly or view it on GitHub.
from route.
Next 1-2 weeks
Sent from my iPhone
On 21 May 2015, at 17:37, Woody Gilk [email protected] wrote:
@philipobenito when can we expect to see a branch?
—
Reply to this email directly or view it on GitHub.
from route.
It seems that the complete replace of Symfony HttpFoundation might not be necessary:
http://symfony.com/blog/psr-7-support-in-symfony-is-here
To preserve compatibility (for example with Stack based applications, like Proton) this compatibility layer could be used.
For the record I suggest preserving compatibility next to the new, PSR-7 strategy which should be the recommended one.
from route.
This has already been discussed on several threads and is being implemented for v2.
Sent from my iPhone
On 30 May 2015, at 21:04, Márk Sági-Kazár [email protected] wrote:
It seems that the complete replace of Symfony HttpFoundation might not be necessary:
http://symfony.com/blog/psr-7-support-in-symfony-is-here
To preserve compatibility (for example with Stack based applications, like Proton) this compatibility layer could be used.
For the record I suggest preserving compatibility next to the new, PSR-7 strategy which should be the recommended one.
—
Reply to this email directly or view it on GitHub.
from route.
Sorry, I didn't find any reference to symfony's compatibility layer. Also, it just have been released.
from route.
Less Symfony specific but the fact that strategies are going to be split out and HTTP Foundation will still be supported.
Sent from my iPhone
On 30 May 2015, at 21:33, Márk Sági-Kazár [email protected] wrote:
Sorry, I didn't find any reference to symfony's compatibility layer. Also, it just have been released.
—
Reply to this email directly or view it on GitHub.
from route.
Hey @philipobenito where are you with this? Am happy to help with this
from route.
Hey man. Already done, just got some changes to make to Container before I release, next week some time for both v2 releases.
—
Sent from Mailbox
On Fri, Jul 24, 2015 at 6:28 PM, Alex Bilbie [email protected]
wrote:
Hey @philipobenito where are you with this? Am happy to help with this
Reply to this email directly or view it on GitHub:
#32 (comment)
from route.
❤️
from route.
@philipobenito any chance of creating a branch with some of this so that it can be exposed and some of us can start testing it?
from route.
👍 I am also curious about new features.
from route.
+1
from route.
Related Issues (20)
- Feature request: custom attributes for route and route group accessible within a middleware HOT 6
- Catch Exception Best Way HOT 3
- Feature request: map with array of methods HOT 1
- Feature request: make $request available in getOptionsCallable HOT 2
- I cannot make post requests HOT 5
- Url resolve fails with 2 numeric parameter HOT 3
- Add an option to get the target route from the middleware HOT 2
- Why isn't the middleware stack executed for unmatched routes? HOT 2
- psr/simple-cache version constraints HOT 2
- Allow for empty route paths to be treat as the base route path HOT 2
- Nested groups are required HOT 1
- Feature request: Treat Route `$handler` that implements RequestHandlerInterface as callable
- Root exception class (and possibly, its children) not compatible with PHP7+
- Request matcher? guess if ServerRequest can be handled
- Dispatcher: handle and find HOT 1
- Feature: Extra map() options
- Method to get declared routes?
- How can I assign controller to errors http ? HOT 1
- Cannot Change Cache Key
- Is this package still actively maintained? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from route.