#2497667: Add libraries-extend to themes' *.info.yml introduced a \Drupal\Core\Theme\ActiveTheme::getLibrariesExtend(), and a respective key 'libraries_extend' in the theme info array.

Unfortunately, the property ActiveTheme->librariesExtend was not declared as a property.
Instead we are using a dynamic, public property.

I can only imagine that this was a mistake.

Comments

donquixote created an issue. See original summary.

donquixote’s picture

Status: Active » Needs review
StatusFileSize
new501 bytes

For a start, I simply copied the description and type from the method.

Maybe we could document it more specific than @var array?

donquixote’s picture

Btw what's the best way to name a property here in the issue queue?

ActiveTheme->librariesExtend
ActiveTheme::$librariesExtend (This could be mistaken for a static property)

or something else?

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

#3, no idea - I usually go for the second.

#2 looks solid

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Since there is a getter that returns this \Drupal\Core\Theme\ActiveTheme::getLibrariesExtend() I don;t think we should go to the trouble of BC - this property was never intended to be public. Also this is a really an internal of how LibraryDiscovery works so the API for this is adding stuff to your theme,info.yml and seeing it happen.

Committing only to 8.6.x because technically it is an API change. Just not one that has any likely impact.

  • alexpott committed 64252f9 on 8.6.x
    Issue #2959972 by donquixote: Undeclared property: ActiveTheme::$...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.