feat(router): preload model relations during route binding#2232
Conversation
8232333 to
c795cb9
Compare
Benchmark ResultsComparison of Open to see the benchmark resultsNo benchmark changes above ±5%. Generated by phpbench against commit 3cd214f |
|
Looks good to me. One edge case I wonder about: I guess PHP will simply ignore the additional parameter if it's not present, so I guess we're good. Just wanted to double check if I hadn't missed anything |
Good catch. Usually PHP would ignore the additional parameter. However, it's a named one, so that will throw. I'm not yet sure what we should do about this - making it unnamed feels a bit weird. What do you think would be good here? |
|
Well… it would only call the method with named parameter if the attribute was provided. Can we wrap this in an exception that clearly explains what's wrong? (eg. "You added It's a bit dirty, but I feel it's good enough for now |
|
Perfect :) |
Closes #2110.