Problem/Motivation

As a follow-up to #2305199: Create a route for every variant and use a "route filter" to apply selection rules and a corollary to #2605250: ParamConverterManager::convert() should run once per request object, we can prevent upcasting from running too many times.

Proposed resolution

Subclass the ParamConversionEnhancer for now, until #2605250: ParamConverterManager::convert() should run once per request object goes in
Additionally, modify VariantRouteFilter so that it modifies the request if it finds a valid page manager route.

Remaining tasks

N/A

User interface changes

N/A

API changes

We now modify the global request during filtering

Data model changes

N/A

Comments

tim.plunkett created an issue. See original summary.

tim.plunkett’s picture

Status: Active » Needs review
StatusFileSize
new11.44 KB

Thank goodness we locked this class down with unit tests. Refactoring this wouldn't have been possible otherwise.

tim.plunkett’s picture

StatusFileSize
new1.94 KB
new12.76 KB

Justified the change to VariantRouteFilter::getRequestAttributes() with some test coverage.

dsnopek’s picture

Status: Needs review » Reviewed & tested by the community

Assuming the core patch really does get committed (and so this is temporary), this looks good to me!

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

  • tim.plunkett committed b4212b1 on 8.x-1.x
    Issue #2605282 by tim.plunkett: Ensure that upcasting only runs one...

The last submitted patch, 2: 2605282-pm-2.patch, failed testing.

Status: Fixed » Needs work

The last submitted patch, 3: 2605282-pm-3.patch, failed testing.

dsnopek’s picture

Status: Needs work » Fixed

Testbot's a little late to the party!

wim leers’s picture

tim.plunkett’s picture

Status: Active » Fixed

We still need the changes to VariantRouteFilter, but yes the rest can go. Thanks!

  • tim.plunkett committed eb38c18 on 8.x-1.x
    Issue #2605282 by tim.plunkett: Remove workaround for #2605250 now that...

Status: Fixed » Closed (fixed)

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