Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The JSON API core patch at #2843147-51: Add JSON:API to core as a stable module is failing tests because of this deprecation error in many dozens of the tests:
Remaining deprecation notices (1)
1x: \Drupal\Core\Routing\Enhancer\RouteEnhancerInterface is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, you should use \Drupal\Core\Routing\EnhancerInterface. See https://www.drupal.org/node/2894934
See the corresponding CR at https://www.drupal.org/node/2894934.
The tricky thing is that we can't fix this in JSON API 8.x-1.x because \Drupal\Core\Routing\EnhancerInterface
only exists in 8.5. Only JSON API 8.x-2.x will require >=8.5.0.
Comment | File | Size | Author |
---|---|---|---|
#12 | interdiff-10.txt | 1002 bytes | gabesullice |
#10 | 2957271-10.patch | 4.78 KB | gabesullice |
| |||
#5 | interdiff-4-5.txt | 1.73 KB | gabesullice |
#5 | 2957271-5.patch | 6.08 KB | gabesullice |
#4 | interdiff-3-4.txt | 4.05 KB | gabesullice |
Comments
Comment #2
Wim LeersComment #3
Wim LeersI forgot one.
Comment #4
gabesulliceThis will break other routes that use the
page
parameter becauseapplies
will never be called again. See: #2961773-7: Update ParamEnhancers to not use deprecated interface to prevent unintentional interactions with requestsThe attached fixes that.
Comment #5
gabesulliceComment #6
Wim LeersChecking
would be simpler/nicer? It'd also allow custom modules to expand JSON API without being forced to use the same front controller. (Not recommended, but some custom projects may still want to do this.)
Why public?
Comment #7
gabesulliceI think the original intent for this way of checking was to prevent expanding JSON API in unsupported ways.
So that it can be used from both route enhancers. I suppose a trait could work, but that seemed like overkill. What do you think?
Comment #8
gabesulliceThis is the code that the static method replaced.
Comment #9
Wim LeersYou're right, #6.1 is misguided because it's just moving existing logic into a separate method.
#6.2 makes sense too, I misread it first, my bad!
Comment #10
gabesulliceNeeded a reroll, committing if tests pass.
Comment #12
gabesulliceFixed the two CS violations.
Comment #14
Kristen PolPer a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing tag cleanup here based on that discussion.