Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up to #2873395: [meta] Add @internal to core classes, methods, properties
Problem/Motivation
https://www.drupal.org/node/2562903#schema
Functions and class methods that define schema for core modules, should not be considered part of the public API. Most of schema definitions are now in YAML files; however, there is a bunch of methods called `schemaDefinition()`. All of them should have `@internal` tag
Proposed resolution
Add @internal tag to the class methods named schemaDefinition()
How to fix this issue
- Read the description for a category in its issue
- Identify and confirm an example. Ask in IRC if unclear.
- Search core for the relevant category.
- Add @internal per the backwards compatibility policy.
- Reviewers should confirm that each @internal mention is appropriate for that category according to the policy.
Remaining tasks
Make the Patch and post it
User interface changes
None.
API changes
There should be no implicit API changes.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2912636-5.patch | 9.45 KB | wengerk |
Comments
Comment #2
valthebaldComment #3
valthebaldComment #4
wengerkWorking on this issue during the DrupalConEu Vienna.
Comment #5
wengerkMade by @wengerk & review by @gido.
Comment #6
wengerkComment #8
valthebaldCI bot hiccup, sending for retest
Comment #9
valthebaldAfter applying the patch, I have searched the core for occurences of schemaDefinition functions, and all of them (excluding child classes that override parent's method) have @internal tag. Changing the issue title (narrowing the scope, in case someone will identify other functions that return schema definitions).
Moving to RTBC
Comment #10
valthebaldComment #11
gido CreditAttribution: gido as a volunteer commentedAs a side note, those classes were not touched by purpose:
* Drupal\Tests\views\Kernel\Handler\FieldDateTest
* Drupal\Tests\views\Kernel\Handler\FilterBooleanOperatorStringTest
* Drupal\Tests\language\Kernel\Views\LanguageTestBase
* Drupal\Core\ProxyClass\Lock\PersistentDatabaseLockBackend
They all have the
{@inheritdoc}
doc annotationComment #12
valthebald2 more classes that are ignored for the same reason:
* Drupal\Core\ProxyClass\Batch\BatchStorage
* Drupal\Core\ProxyClass\Lock\DatabaseLockBackend
Comment #15
lauriiiCommitted as part of the live commit in DrupalCon Vienna df0b92d and pushed to 8.5.x and to 8.4.x with the permission of @webchick. Thanks!