Skip to content

Delete deprecated methods in SearchTrait #293

Description

@DenTray

Description

What needs to be done?

Remove deprecated methods from src/Traits/SearchTrait.php, refactor all current usages to the supported methods, and update visibility for internal helper methods.

Deprecated methods to remove:

  • filterMoreThan() — use filterGreater instead
  • filterLessThan() — use filterLess instead
  • filterMoreOrEqualThan() — use filterGreater instead
  • filterLessOrEqualThan() — use filterLess instead
  • filterFrom() — use filterGreater instead
  • filterTo() — use filterLess instead

Required refactoring:

    • Update searchQuery() so it no longer calls:filterFrom() for the _from suffix
    • filterTo() for the _to suffix
  • Replace all internal and external usages of deprecated methods with the new methods.

Additional visibility changes:

    • Change the following methods' visibility to protected:
    • paginate()
    • wrapPaginatedData()
    • getModifiedPaginator()
    • setModel (EntityControlTrait)

Expected Outcome

What is the expected result?

  • Deprecated methods are fully removed from src/Traits/SearchTrait.php.
  • searchQuery() uses the supported methods for _from and _to filters.
  • No code in the project calls removed deprecated methods.

    • The following internal methods have protected visibility:
    • paginate()
    • wrapPaginatedData()
    • getModifiedPaginator()
    • setModel (EntityControlTrait)
  • Search filtering behavior remains unchanged after refactoring.
  • Tests are updated and continue to pass.

Verification Scenarios

How can this be tested?

  1. Search the codebase and confirm there are no remaining usages of:

    1. filterMoreThan()
    2. filterLessThan()
    3. filterMoreOrEqualThan()
    4. filterLessOrEqualThan()
    5. filterFrom()
    6. filterTo()
  2. Verify searchQuery() uses filterGreater for _from and filterLess for _to.
  3. Verify paginate(), wrapPaginatedData(), and getModifiedPaginator() , setModel are declared as protected.
  4. Run search-related tests and confirm existing filter behavior is preserved.


Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions