- Merge request !5086Issue #3199697: Add JSON:API Translation experimental module → (Open) created by plach
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 30,274 pass, 3 fail - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 30,435 pass - Status changed to Needs work
over 1 year ago 11:10am 22 October 2023 - last update
over 1 year ago Custom Commands Failed - 🇮🇹Italy plach Venezia
The commit above adds GET test coverage, the rest is still to do.
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 30,437 pass, 1 fail - last update
over 1 year ago 30,438 pass - Status changed to Needs review
11 months ago 12:09pm 21 February 2024 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
THANK YOU SO MUCH, @plach! 🙏🥳
Posted an initial very high-level review, looking at the broad strokes of this impressive (and big! 2000 LoC!) MR. 🤩
Completely reviewing this requires understanding lower level pieces of our JSON:API implementation, knowledge of which has evaporated my brain over the past half decade 😅😶🌫️
For now, I'm especially interested in understanding why this is not extending
ResourceTestBase
butJsonApiFunctionalTestBase
. It might be fine/safe, but I'd love to A) understand it, B) have the rationale written down somewhere 🤓 - Status changed to Needs work
11 months ago 1:14pm 28 February 2024 The Needs Review Queue Bot → tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇮🇹Italy plach Venezia
@Wim Leers
Thanks for the review and sorry for the belated reply!
(I'd need more birthdays to work on this regularly ;)For now, I'm especially interested in understanding why this is not extending ResourceTestBase but JsonApiFunctionalTestBase.
I think (it's been a while for me as well), I was just hoping that as an experimental module we could get away with only generic test coverage, as providing test coverage for every entity type seemed overkill at the time, as we did not discuss any entity-type specific logic. OTOH since the scaffolding is already there now, I assume it should not be a huge amount of work to try and leverage
ResourceTestBase
instead. I'll give it a try, stay tuned :) - 🇮🇹Italy plach Venezia
I had a look and I'm not sure that providing a
ResourceTranslationTestBase
class extendingResourceTestBase
is the way to go: we would need to duplicate the children classes (e.g.EntityTestTest
), reimplementing the abstract methods twice with the same logic.I'd rather provide a test trait that could be used by both
JsonApiTranslationFunctionalTest
and any resource-specific test class, e.g.EntityTestTranslationTest
extendingEntityTestTest
. We could then extendTestCoverageTest
to check for the translation test classes presence and ensure all resources also provide translation-test coverage. - 🇳🇱Netherlands bbrala Netherlands
Only way i can see that happen is if we integrate these tests into resourcetestbase and adjust the jsonapi tests. But testing an experimental module in the main jsonapi module kinda feels weird. :x
- 🇳🇱Netherlands bbrala Netherlands
Since i worked on this issue earlier, i'll keep it in the back of my mind to do a round of tweaks on.
- 🇳🇱Netherlands bbrala Netherlands
Rebased and refactored a lot, and did all the feedback.
Unfortunately i ended up in a testfailure in this test:
// Check that translations cannot be created for non-translatable nodes. $node = $this->drupalCreateNode(); $output = $this->doTestNewTranslationRequest($node, 'it', Response::HTTP_UNPROCESSABLE_ENTITY); $this->assertSame('Translation is not enabled for the specified resource.', $output['errors'][0]['detail']);
This should be the result of refactoring the checks on enities to a check on the resourcetype. Might be because it not uses the entity type instead of the entity itself in
checkEntityTranslatability
(now renamed tocheckResourceTypeTranslatability
).Time for today is up unfortunately.
- 🇳🇱Netherlands bbrala Netherlands
Just a note. I did not handle the changes in the tests as discussed in #24
- Issue was unassigned.
- 🇳🇱Netherlands bbrala Netherlands
One of the mentioned issues is 🐛 Browser language detection is not cache aware Needs work . Did some work there to see if that can actually get fixed sometime soon.
- Status changed to Needs review
6 months ago 2:32pm 22 July 2024 - 🇺🇸United States smustgrave
I see that tests have been added so scratched that task out.
Would you all say the other tasks have been addressed?
The Needs Review Queue Bot → tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇳🇱Netherlands bbrala Netherlands
Rebased, added experimental flag, went through threads and resolved what was needed.
- Status changed to Needs work
3 months ago 4:13am 4 November 2024 The Needs Review Queue Bot → tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇳🇱Netherlands bbrala Netherlands
Fixed phpstan issues and rebased (me like cache).