-
-
Notifications
You must be signed in to change notification settings - Fork 495
Move routes config for annotations #260
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10000Pull request passes validation.
1084ab9
to
7abd7ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
We cannot merge it now as it fails when the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then let's prevent the bot from auto-merging :)
@fabpot Are you sure? This works for me even when the directory is empty. It only fails when the directory does not exist. |
@@ -0,0 +1,3 @@ | |||
controllers: | |||
resource: ../../src/Controller/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource: ../src/Controller/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relative paths are interpreted relative to the location of kernel (probably related to symfony/symfony#24982)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then resource: Controller/
should be enough, asuming the Kernel is at src/Kernel.php
Yes, I believe it only errors out when the directory does NOT exist. But, it should always exist in a new Flex app, thanks to the framework-bundle recipe, correct? I mean, it would be better if it did not error if the dir didn't exist, but I think maybe it's not a problem? |
7abd7ca
to
126f532
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge now
Shouldn't this have been set for |
@Pierstoval I was just thinking the same thing. I'm not sure if it was done on purpose or not. Could you open a new PR to suggest adding it to SensioFrameworkExtraBundle instead? |
The Route annotation doesn't need to be from the bundle: 3.4 has a fine working annotation class. |
But then this should be in the framework recipe, because If i use doctrine annotations without the framework bundle, this config will cause errors, no? |
framework is a mandatory requirement of flex apps (and it doesn't require annotation, so double "no" :) ) |
To sum up: it was done on purpose :) Nothing to change here. |
@@ -0,0 +1,3 @@ | |||
controllers: | |||
resource: ../src/Controller/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is relative to %kernel.root_dir%
it should be just Controller/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's relative to the entry point (public/index.php
or bin/console
) where the kernel is instantiated.
…yan) This PR was merged into the 4.0 branch. Discussion ---------- removing need for annotation route import change See symfony/recipes#260 - this is not needed anymore 🎆 Commits ------- c2f8345 removing need for annotation route import change
Let's make routes configuration when using annotations automatic.