seo-bundle icon indicating copy to clipboard operation
seo-bundle copied to clipboard

rename SeoPresentationInterface::updateSeoPage

Open dbu opened this issue 10 years ago • 3 comments

As discussed in https://github.com/symfony-cmf/SeoBundle/pull/263/files#r40062307 this method has a strange name. what we do is add seo information. the method should be called something like updateMetadata... this would be an interface change so we can only do it for 2.0

dbu avatar Sep 28 '15 06:09 dbu

I probably should have put this comment here but I think use of the word Document is overly specific to PHPCR and this method can work for anything that implements the SeoMetadata interface. Other suggestions:

  • updateSeoMetadataFrom($object) // this one gets my vote
  • updateSeoMetadataFromObject($object)
  • updateSeoMetadataFromContent($content) // content doesnt seem like the right name in this case

We could use SeoInformation instead of SeoMetadata in any of these names

benglass avatar Sep 28 '15 15:09 benglass

  • updateSeoMetadataFrom($object) // this one gets my vote

if we ever update it from something else, this would be odd. like updateSeoMetadataFromEntityId or something. then again we can just go with ...From() and all other cases have an explicit name. this is the default case.

so +1 on this proposal

dbu avatar Sep 28 '15 15:09 dbu

@benglass proposed updateMetadata() in #263. i like that one best.

dbu avatar Sep 29 '15 07:09 dbu