Skip to content

Use config array instead of object for Facet Search Params - #5639

Merged
demiankatz merged 3 commits into
vufind-org:devfrom
rtloftus:facet-limit
Sep 10, 2026
Merged

Use config array instead of object for Facet Search Params#5639
demiankatz merged 3 commits into
vufind-org:devfrom
rtloftus:facet-limit

Conversation

@rtloftus

@rtloftus rtloftus commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you change these traits, you will also have to change all of the calls to the modified methods in the classes that use them (in this case, \VuFind\Search\Solr\Params and \VuFind\Search\Summon\Params). You should be able to use the ->toArray() method to convert objects to arrays when calling the methods for now, so we can wrap up these changes and simplify the eventual work to get rid of the remaining objects in the Params classes.

For example, change:

        $this->initFacetLimitsFromConfig($config->Results_Settings ?? null);
        $this->initFacetRestrictionsFromConfig($config->Results_Settings ?? null);

to:

        $resultsSettings = isset($config->Results_Settings) ? $config->Results_Settings->toArray() : null;
        $this->initFacetLimitsFromConfig($resultsSettings);
        $this->initFacetRestrictionsFromConfig($resultsSettings);

@demiankatz demiankatz added this to the 12.0 milestone Sep 9, 2026
@demiankatz demiankatz added the architecture pull requests that involve significant refactoring / architectural changes label Sep 9, 2026
@rtloftus
rtloftus requested a review from demiankatz September 9, 2026 15:02

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, @rtloftus; looks good, and tests are passing!

@demiankatz
demiankatz merged commit 07defca into vufind-org:dev Sep 10, 2026
8 checks passed
rtloftus added a commit to rtloftus/vufind that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture pull requests that involve significant refactoring / architectural changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants