Problem/Motivation

Part of #3299855: [META] Get rid of #[\AllowDynamicProperties] attribute

There's a set of undefined properties muted with attribute, it should be defined and attribute removed

From #3295821-94: Ignore: patch testing issue for PHP 8.2 attributes

		+  protected $langcode;
		+  protected $pass;
		+  protected $status;
		+  protected $created;
		+  protected $changed;
		+  protected $login;
		+  protected $init;
		+  protected $default_langcode;
		+  protected $content_translation_source;
		+  protected $content_translation_outdated;
		+  protected $content_translation_uid;
		+  protected $content_translation_status;
		+  protected $content_translation_created;
		+  protected $rest_test_validation;
		+  public $pass_raw;
		+  public $passRaw;
		+  public $sessionId;

Proposed resolution

define all missing properties, refactor test code if it using object without reason

Remaining tasks

- agree
- patch/review/commit

User interface changes

no

API changes

no

Data model changes

no

Release notes snippet

CommentFileSizeAuthor
#2 3344729-2.patch1.04 KBandypost

Comments

andypost created an issue. See original summary.

andypost’s picture

Status: Active » Needs review
StatusFileSize
new1.04 KB

all properties

ranjit1032002’s picture

Status: Needs review » Reviewed & tested by the community

I had Reviewed the patch and it's working as expected mentioned in comment #2

andypost’s picture

Status: Reviewed & tested by the community » Needs work

At least half of this properties are externally set by rest and content translation modules - needs refactoring of usage, removal of dynamic access or replacing userSession with real User entity

berdir’s picture

That (using user entity) won't be enough. The user password stuff is drupalLogin() related and will likely require is to refactor that to avoid storing arbitrary stuff on either UserSession or content entities, these are just hiding the problem for now.

Version: 10.1.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, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.