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

Make possible to inherit normalizer annotation from a parent class #37

Open
BowlOfSoup opened this issue Sep 1, 2020 · 1 comment
Open

Comments

@BowlOfSoup
Copy link
Owner

class Bar
{
    /**
     * @Bos\Normalize()
     */
    public function getName(): string
    {
        return 'john wick';
    }
}
 
class Foo extends Bar
{
    /**
     * PHPDoc without @Bos\Normalize annotation
     */
    public function getName(): string
    {
        return 'John Wick';
    }
}

When normalizing getName() from Foo, nothing will output.

We should make an annotation that indicates that the parent Normalize() annotations should be inherited.

Example:

class Foo extends Bar
{
    /**
     * @Bos\InheritNormalize()
     */
    public function getName(): string
    {
        return 'John Wick';
    }
}
@BowlOfSoup BowlOfSoup added this to the 2.2 milestone Sep 4, 2020
@BowlOfSoup BowlOfSoup removed this from the 3.0 milestone Sep 14, 2020
@BowlOfSoup
Copy link
Owner Author

For now, just add the correct normalize options to the child properties or methods.
This would need refactoring. If you have a valid and clear real-life use-case I may put more prio on this.

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

1 participant