- πΊπΈUnited States moshe weitzman Boston, MA
Do we really need a change record for an MR that is policy and has no code change at all? This has been sitting near the finish line for a year.
As per #1158720-69: [policy, no patch] Add parameter type hinting to function declaration coding standards β this issue proposes that all new Drupal 9 code should use scalar typehints and return typehints since our minimum PHP version is 7.3.
This is only for new code to avoid BC implications. We will work out how to change existing code (probably in Drupal 10) in π± [Meta] Implement strict typing in existing code Active .
The related Coding Standards issue explains that there is an existing policy for using strict type hints. See comment #17 β for the details.
New methods and functions added in Drupal 9 should use scalar typehints and return typehints.
public function checkAccess(string $permission): AccessResult {
$access_result = AccessResult::allowedIfHasPermission($this->user, $permission);
return $access_result;
}
Post something on groups.drupal.org/core
Add examples to Parameter and return typehinting β
Draft and publish a change record that links that coding standards section.
None
None
None
N/a
Needs review
10.0 β¨
Last updated
A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Do we really need a change record for an MR that is policy and has no code change at all? This has been sitting near the finish line for a year.