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

Invalid method check for Page_Controller->data() #77

Closed
Zauberfisch opened this issue Feb 16, 2017 · 1 comment
Closed

Invalid method check for Page_Controller->data() #77

Zauberfisch opened this issue Feb 16, 2017 · 1 comment

Comments

@Zauberfisch
Copy link
Contributor

In ControllerTagGenerator.php#L22 we are adding the @method Page data() tag for the Page_Controller.
While doing so, we call $this->pushMethodTag($pageClassname, $pageClassname . ' data()'); which is actually an incorrect use of pushMethodTag().

pushMethodTag() takes a method name as first argument to check if this method already exists, since the method name is data(), we should pass data instead of $pageClassname.

This however reveals the next issue: data() does exist as method because the parent ContentController implements it. So this check would not yield the desired result either.

I believe the discussion if we modify pushMethodTag() to make this possible should take place in a separate issue.
Let's keep this issue open until we decided to proceed with pushMethodTag() and either fix it with 'data' or if it's not updated add a comment to explain why we are not using 'data' here.

@Firesphere
Copy link
Member

This should be solved in #107, but if not, please re-open this issue?

Closing for now as #107 is expected to solve this issue.

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

No branches or pull requests

3 participants