-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Allow to set dirs without trailing slashes #406
Comments
Yes, the trailing slash is required in most paths, this reduces the overhead of creating the real paths, in most parts of the docs that is mentioned |
for example here: http://docs.phalconphp.com/en/latest/reference/views.html no words about trailing slashes. And it's hard to guess why templates don't render |
Why can't you manually determine existence of a slash at the end of the line (and if needed - append it)? |
We need to create a full copy of path to just add the trailing slash,(not a big problem) but if the developer adds the trailing slash this reduce an unnecessary work in each request |
At least phalcon should display warning (or exception) if path hasn't trailing slash at the end (otherwise it's really hard to determine problem) |
I'm sorry to reopen this really old discussion, but I just passed by the same situation and I have to say that I totally agree with the last message of @sirian. I spent about two or three real hours, digging into the phalcon's C code, extending the framework classes, just to realize that my viewsDir path didn't had the slash at the end. I'm not saying that I wasn't wrong, and the documentation probably have mention that, but raising an error is really important for developers. For instance, in my case, I'd just see that the path was wrong, and put the slash there, in about 20 seconds, instead of some hours. |
Make sure the string is not interned (#406)
I guess this one can be closed now? |
now this lines works differently (first doesn't work)
same problem with Volt's compiledPath options
The text was updated successfully, but these errors were encountered: