Problem/Motivation

theme.inc has three remaining functions and a few constants.

We should be able to convert them to better locations.

Steps to reproduce

Open theme.inc

Proposed resolution

Move drupal_find_theme_templates to TemplateFinder::scan
Inline theme_settings_convert_to_config
Move theme_get_suggestions to ThemeSuggestions:get We could also inline this and rework the tests, but I did see some contrib usage, and it reads like it's meant to be api.

Remaining tasks

Review
Confirm test changes
Create follow up for responsive constants

User interface changes

N/A

Introduced terminology

N/A

API changes

Data model changes

N/A

Release notes snippet

N/A

Issue fork drupal-3632284

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nicxvan created an issue. See original summary.

nicxvan’s picture

Title: Deprecate remaining contents of theme.inc » Deprecate remaining functions in theme.inc
Issue summary: View changes

nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Status: Active » Needs review

I'll work on the CR now.

nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

@nicxvan asked for a review of this.

Applied the MR locally
Searched for drupal_find_theme_templates and all instances are replaced.
Same for theme_settings_convert_to_config and theme_get_suggestions

Am moving to NW though as the CR may have a typo? Says theme_get_suggestions is replaced by \Drupal::service(ThemeSuggestions::class)->get() and \Drupal::service(TemplateFinder::class)->scan()

If drupal_find_theme_templates suppose to be in the first before?

other then that everything looks good!

nicxvan’s picture

Status: Needs work » Needs review

Thanks! I fixed the typo in the cr!

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for fixing!