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

Created SeoAwareTrait #274

Merged
merged 1 commit into from
Jun 19, 2018
Merged

Created SeoAwareTrait #274

merged 1 commit into from
Jun 19, 2018

Conversation

core23
Copy link
Member

@core23 core23 commented Jun 15, 2018

I am targeting this branch, because this is a new feature.

Changelog

### Added
- Added `SeoAwareTrait`

Subject

This trait can be used the same way as the LoggerAwareTrait, ContainerAwareTrait, ...

@core23 core23 added the minor label Jun 15, 2018
@core23 core23 requested a review from a team June 15, 2018 14:57
trait SeoAwareTrait
{
/**
* @var SeoPageInterface|null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding @required it will try to autowire it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't find any examples in the other traits.
Should you use autowiring when there is a setter method?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not? You can still set it yourself or let it be autowired. A better question is, should we autowire it at all, I think it is not a best practice for 3rd party bundles.

Copy link
Member Author

@core23 core23 Jun 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it

@OskarStark
Copy link
Member

Do we need to tweak the docs or add a cookbook article about it?

@kunicmarko20
Copy link
Contributor

Yes, people need to know about it so they can use it.

@greg0ire greg0ire merged commit 6a475fd into sonata-project:2.x Jun 19, 2018
@greg0ire
Copy link
Contributor

Thanks @core23 !

@core23 core23 deleted the feature/trait branch June 19, 2018 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants