The original entity is currently passed as piggy-backed property $entity->original. It's useful to have it, but it's not very visible there.

What about moving from

hook_entity_update($entity, $type)
hook_{entity_type}_update($node)

to

hook_entity_update($entity, $entity_original)
hook_{entity_type}_update($entity, $entity_original)

Analogously for the presave hooks, e.g.

hook_entity_presave($entity, $entity_original = NULL)

If we do so we could scratch $entity->original. However, currently the existence of $entity->original allows for more efficient mass-updates as original can be multiple-loaded. So what about providing entity_save_multiple($entities) which already handles that efficiently?

CommentFileSizeAuthor
#54 0001-Issue-1480696-Move-entity-original-to-separate-53.patch51.47 KBfgm
#53 0001-Issue-1480696-Move-entity-original-to-separate-53.patch51.47 KBfgm
#51 0001-Applying-old-patch-from-1480696-Move-original-to-a-s.patch49.08 KBfgm
#49 0001-Applying-old-patch-from-1480696-Move-original-to-a-s.patch49.03 KBfgm
#47 0001-Applying-old-patch-from-1480696-Move-original-to-a-s.patch49.05 KBfgm
#44 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch48.94 KBfgm
#44 interdiff.txt7.03 KBfgm
#43 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch48.61 KBfgm
#43 interdiff.txt9.1 KBfgm
#35 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch43.1 KBfgm
#33 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch43.51 KBfgm
#29 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch39.54 KBfgm
#27 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch39.54 KBfgm
#25 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch39.49 KBfgm
#23 0000-Issue-1480696-move-entity-original-to-a-separate-hoo.patch39.14 KBfgm
#21 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch39.14 KBfgm
#18 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch16.09 KBfgm
#16 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch17 KBfgm
#14 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch17.67 KBfgm
#13 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch17.67 KBfgm
#9 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch14.58 KBfgm
#6 1480696-remove-entity-original.patch3.44 KBfgm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago’s picture

Issue tags: +Entity system, +sprint

Let's leave entity_save_multiple() beside for now, but convert $entity->original to the separate parameter. Temporarly piggy-backing data is bad-practice and we should not encourage this. It was necessary in that case as $entity->original was introduced late in the d7 cycle, but now it's time to fix that.

Dave Reid’s picture

Would this be getting rid of the entity-generic hooks (e.g. hook_entity_update())? That has a bigger impact than removing $entity->original to a lot of modules.

fago’s picture

No, sry if I've been unclear - of course all the hooks should stay. This is just about moving $entity->original to a $original parameter for all the update hooks.

Dave Reid’s picture

Ah ok, was just confused since there was no "after" version of it.

catch’s picture

I can't stand the structure of $entity->original, so this seems like a good idea.

At some point I'd wanted something like hook_entity_presave($type, Entity $entity, array $changes); so you can just easily see what stuff had changed, but I'm not sure how feasible that is at all. That'd be a much bigger change though so let's go for the extra parameter for now.

fgm’s picture

Status: Active » Needs review
FileSize
3.44 KB

Here is a patch to do this.

I also added the original parameter entity to the preSave/postSave methods, which might need it too.

Status: Needs review » Needs work

The last submitted patch, 1480696-remove-entity-original.patch, failed testing.

fago’s picture

Yep, we should add it to those methods as well. I've opened for http://drupal.org/node/1634442 for the unrelated exception issue.

fgm’s picture

Status: Needs work » Needs review
FileSize
14.58 KB

Rerolled. Should have far less errors (node and user tests pass locally).

Dave Reid’s picture

I might add something that this makes impossible is being able to do token replacement using $entity->original. Moving this to a separate parameter removes the ability to fetch the original. I guess tokens could fetch it with entity_load_unchanged().

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch, failed testing.

fago’s picture

@#10: Does it make sense to have token replacements for that? It's not something that will be available everytime anyway, even more I guess it usually won't be available?
Still, if those tokens are desired the implementing module could support them by running token replacing with the original entity as well.

fgm’s picture

Status: Needs work » Needs review
FileSize
17.67 KB

Looks like it should pass this time, comment, entity, node, taxonomy, and user pass locally.

fgm’s picture

Rerolled after yesternight's commits, just in case they broke something.

fago’s picture

Status: Needs review » Needs work
+++ b/core/modules/entity/lib/Drupal/entity/DatabaseStorageController.php
@@ -396,7 +396,7 @@ class DatabaseStorageController implements EntityStorageControllerInterface {
-    catch (Exception $e) {
+    catch (\Exception $e) {

That's unrelated and already handled by another issue. So let's leave it out here.

+++ b/core/modules/entity/lib/Drupal/entity/DatabaseStorageController.php
@@ -410,18 +410,22 @@ class DatabaseStorageController implements EntityStorageControllerInterface {
+        $original_entity = isset($entity->original)
+          ? $entity->original
+          : entity_load_unchanged($this->entityType, $entity->id());

I think it's unusual to have that spanning multiple lines. Either use one line, or an if/else?
Then, let's only take $entity->original into account when it is an object implementing the EntityInterface, so entity types having an unrelated original property get not screwed on that.

+++ b/core/modules/entity/lib/Drupal/entity/DatabaseStorageController.php
@@ -429,6 +433,7 @@ class DatabaseStorageController implements EntityStorageControllerInterface {
+        // Not passing $original_entity, defaults to NULL.

I don't think that's worth commenting, you can read that from the code if you are interested in that as well.

+++ b/core/modules/entity/lib/Drupal/entity/DatabaseStorageController.php
@@ -462,8 +467,10 @@ class DatabaseStorageController implements EntityStorageControllerInterface {
+   * @param $original
+   *   The original value of the entity. Only non-NULL if $update is TRUE.

The docs miss the interface. Also I think the non-NULL docs would read better if they are not negated, i.e. NULL if the entity is inserted. Also, we mix $original and $original_entity - we should make use of the same variable name everywhere.

fgm’s picture

Status: Needs work » Needs review
FileSize
17 KB

Rerolled.

FTR, I regret our not using that ternary pattern, though: in cases like this (uncomplicated but long expression members), it is both clearer than a single line and than an if/else. But that's not an issue.

fago’s picture

Status: Needs review » Needs work

Thanks.

+++ b/core/modules/entity/lib/Drupal/entity/DatabaseStorageController.php
@@ -486,14 +495,16 @@ class DatabaseStorageController implements EntityStorageControllerInterface {
+   * @param $original
+   *   This parameter is only available on presave and update hooks.

Should be documented as (optional). Also it doesn't document what it is.

+++ b/core/modules/taxonomy/taxonomy.module
@@ -466,16 +466,16 @@ function taxonomy_vocabulary_delete_multiple(array $vids) {
-  if (!empty($vocabulary->original->machine_name) && $vocabulary->original->machine_name != $vocabulary->machine_name) {
+  if (!empty($original->machine_name) && $original->machine_name != $vocabulary->machine_name) {

I like how this makes this code shorter.

+++ b/core/modules/user/lib/Drupal/user/UserStorageController.php
@@ -86,9 +86,9 @@ class UserStorageController extends DatabaseStorageController {
+    if ($entity->isNew() || (!empty($entity->pass) && isset($original->pass) && $entity->pass != $original->pass)) {

Shouldn't that be an isset($original) ?

+++ b/core/modules/user/lib/Drupal/user/UserStorageController.php
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 6f21c5c..d2149e2 100644

index 6f21c5c..d2149e2 100644
--- a/core/modules/user/user.module

--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module

+++ b/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -2993,7 +2993,6 @@ function user_user_operations_block($accounts) {

@@ -2993,7 +2993,6 @@ function user_user_operations_block($accounts) {
  */
 function user_multiple_role_edit($accounts, $operation, $rid) {
   $role_name = db_query('SELECT name FROM {role} WHERE rid = :rid', array(':rid' => $rid))->fetchField();
-
   switch ($operation) {
     case 'add_role':
       $accounts = user_load_multiple($accounts);
-- 

Unrelated changes.

Also, there is one \Exception change left in the patch.

fgm’s picture

Status: Needs work » Needs review
FileSize
16.09 KB

Rerolled accordingly.

fago’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks good now! Checked back with Dave Reid via IRC that #10 isn't a deal breaker for moving on with this, so let's do so.

fgm’s picture

Status: Reviewed & tested by the community » Needs work

Actually, this needs some more changes in the api files.

fgm’s picture

Turned out to be much more significant. Patch rerolled on top of #1618136: Remove $type from entity hooks.

fgm’s picture

Status: Needs work » Needs review

Forgot to set status.

fgm’s picture

jcisio’s picture

Status: Needs review » Needs work
  * Implements hook_user_presave().
  */
-function contact_user_presave($account) {
+function contact_user_presave(User $account, User $original) {
   $account->data['contact'] = isset($account->contact) ? $account->contact : variable_get('contact_default_status', 1);
 }
+ *   The original entity object.
  */
-function hook_entity_presave(Drupal\entity\EntityInterface $entity) {
+function hook_entity_presave(Drupal\entity\EntityInterface $entity, Drupal\entity\EntityInterface $original) {
   $entity->changed = REQUEST_TIME;
 }

(and other places in hook_entity_presave())
$original should be default to NULL.

  * @param Drupal\Core\File\File $file
  *   The file entity that is about to be created or updated.
+ * @param Drupal\Core\File\File $file
+ *   The original file entity.
  */
-function hook_file_presave(Drupal\Core\File\File $file) {
+function hook_file_presave(Drupal\Core\File\File $file, Drupal\Core\File\File $original) {
   // Change the file timestamp to an hour prior.
   $file->timestamp -= 3600;

(a few times)

Inconsistant argument name.

--- a/core/modules/user/user.api.php
+++ b/core/modules/user/user.api.php
@@ -1,12 +1,13 @@
 <?php
 
-use Drupal\entity\EntityInterface;
-
 /**
  * @file
  * Hooks provided by the User module.
  */
 
+use Drupal\entity\EntityInterface;
+use Drupal\user\User;
+

Unrelated change.

Otherwise looks good ;)

fgm’s picture

Status: Needs work » Needs review
FileSize
39.49 KB

Thanks for the review. I think it is best to include the "use" change too since we are modifying this file anyway.

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch, failed testing.

fgm’s picture

Status: Needs work » Needs review
FileSize
39.54 KB

Hmm, looks like this was not the final patch.

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch, failed testing.

fgm’s picture

Status: Needs work » Needs review
FileSize
39.54 KB

Rerolled with all these changes. All tests I checked seem to pass locally.

fgm’s picture

#29: 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch queued for re-testing: make sure that yesterday's commits didn't break it.

fago’s picture

Status: Needs review » Needs work
+++ b/core/modules/comment/comment.api.php
@@ -20,8 +20,10 @@ use Drupal\entity\EntityInterface;
+ * @param Drupal\comment\Comment $original
+ *   The original comment object.
  */
-function hook_comment_presave(Drupal\comment\Comment $comment) {
+function hook_comment_presave(Drupal\comment\Comment $comment, Drupal\comment\Comment $original) {

This has to note that original can be NULL, as we dor for hook_entity_presave(). Same for others.

fgm’s picture

I checked for more occurrences and found a few, but then something else emerged: Node::save() overrides Entity::save(), and needs to be converted to that format too for the issue to be completely addressed for the _update() hooks.

fgm’s picture

Status: Needs work » Needs review
FileSize
43.51 KB

Actually, this also required changes in taxonomy.module and node tests, which implements these hooks.

All tests I've checked locally pass (book, comment, node, path, taxonomy).

fago’s picture

Status: Needs review » Needs work
+++ b/core/modules/user/user.api.php
@@ -1,12 +1,13 @@
-
 /**
  * @file
  * Hooks provided by the User module.
  */
 
+use Drupal\entity\EntityInterface;
+use Drupal\user\User;
+

Documentation guidelines say we have to go with absolute class names in hook docs for now.

fgm’s picture

Status: Needs work » Needs review
FileSize
43.1 KB

Removed, along with the stray reference to the Monolog logger patch subcommit which found its way in the previous version too.

fago’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed it (again). Also, I was not able to find other references to $*->original anymore, so it should be complete now as well and all hook changes are properly documented.

This will need a change notification.

Dries’s picture

I'm in favor of this API change. I want to give more people the time to comment on it so I'll wait a couple of days before committing it.

fgm’s picture

The prospective change notice is at http://drupal.org/node/1643406

fago’s picture

fago’s picture

It has been a week now, so let's move on? :)

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch, failed testing.

fgm’s picture

Assigned: Unassigned » fgm

After one week, it was bound to be broken.... will fix it tonight.

fgm’s picture

Status: Needs work » Needs review
FileSize
9.1 KB
48.61 KB

All failing tests pass with this version.

Note that this required starting to use EntityInterface in field hooks.

fgm’s picture

Typo in the API file, no code change. Rerolled a better interdiff.

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-1480696-move-entity-original-to-a-separate-hoo.patch, failed testing.

fgm’s picture

Hmmm, now that the original exceptions have been addressed, more appear. Looks like a lot more type hinting is required. Will be rerolling tomorrow.

fgm’s picture

Status: Needs work » Needs review
FileSize
49.05 KB

Rerolled on current HEAD.

Status: Needs review » Needs work

The last submitted patch, 0001-Applying-old-patch-from-1480696-Move-original-to-a-s.patch, failed testing.

fgm’s picture

Status: Needs work » Needs review
FileSize
49.03 KB

Grrr 8.x moved in the meantime. Rerolled.

Status: Needs review » Needs work

The last submitted patch, 0001-Applying-old-patch-from-1480696-Move-original-to-a-s.patch, failed testing.

fgm’s picture

Status: Needs work » Needs review
FileSize
49.08 KB

Of course there had to be a merge error..

Status: Needs review » Needs work

The last submitted patch, 0001-Applying-old-patch-from-1480696-Move-original-to-a-s.patch, failed testing.

fgm’s picture

Rerolled on today's HEAD. Removed previously appeared exceptions and fail on local tests. Will they pass on q.d.o. ?

fgm’s picture

Status: Needs work » Needs review
FileSize
51.47 KB

Rerolled on today's HEAD. Removed previously appeared exceptions and fail on local tests. Will they pass on q.d.o. ?

fgm’s picture

#54: 0001-Issue-1480696-Move-entity-original-to-separate-53.patch queued for re-testing: some recent change supposedly broke it w.r.t field updates.

Berdir’s picture

Note that this patch and #1723892: Support for revisions for entity save and delete operations are currently on a conflicting path. The patch over there requires $entity->original in hook_field_update().

We'll need to figure out a solution, see the other issue for details.

Dave Reid’s picture

I really don't like the DX of moving this to a separate argument. :/ I'd much rather remove $original all together, and if you need the original entity, you can fetch it yourself.

Berdir’s picture

@DaveReid: The problem is that that is impossible. By the time hook_insert()/update are called we've already updated the database and it is impossible to load the original entity anymore. So you'd have to do it in hook_entity_presave() and then modules might end up doing this multiple times which is the reason this was added in the beginning.

jibran’s picture

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-1480696-Move-entity-original-to-separate-53.patch, failed testing.

Anonymous’s picture

Issue summary: View changes

made it more clear that no hook is supposed to go away

fago’s picture

Assigned: fgm » Unassigned
Issue summary: View changes
Issue tags: +Entity Field API, +API change

This would fix #2140179: $entity->original gets stale between updates - so should we reboot this?

Berdir’s picture

I don't think that's possible, seems like a large API change, we would now also have to update all pre/post methods. And there are unsolved problems when trying to access it in some function calls later on, as pointed out by dave reid.

However, what we still could do is provide a method for it, that would at least make it a bit less weird? And define it as an explicit property, possibly public for now?

Because right now ->original isn't even defined anywhere, which means it's stored in $this->values, for the current language and weird stuff like that.

fago’s picture

Yes, it's a rather large API change, but having it available everywhere it's needed shouldn't be a big deal now - we just need to pass it on the related entity and field item methods also.

drunken monkey’s picture

I'm much in favor of this proposal, I was always annoyed by that magic property. A separate method/hook argument seems way cleaner. However, I guess this now won't happen anymore? Or is there still a chance? Really a bummer that it was already almost committed two years ago …

Anyways, if this API change won't happen anymore in D8 then, as Sascha says, we should at least properly define that property. With #2256679: Use config schema to determine which config entity properties to export regardless of whether they are public or protected landed, there shouldn't be any problem with config entities there anymore.

Berdir’s picture

I'm pretty sure we can still do it as an explicit method, we can keep support for $this->original if we want to.

drunken monkey’s picture

I'm pretty sure we can still do it as an explicit method, we can keep support for $this->original if we want to.

You mean adding getOriginalEntity()/setOriginalEntity() (or whatever) and making $original an explicit protected property? That's what I meant we should do in any case, yes, I do hope that's still possible.

What I fear won't be possible anymore (though I'd love to hear I'm mistaken) is adding $original as a separate argument to all update/presave hooks and methods, and completely getting rid of the property.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joachim’s picture

> I'm pretty sure we can still do it as an explicit method, we can keep support for $this->original if we want to.

That's now covered by #2839195: Add a method to access the original property , which I think would make this issue obsolete.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.