Skip to content
Snippets Groups Projects

Draft: Issue #3347502: Fix PHPStan L1 errors "Access to an undefined property Foo\Bar::$baz" (Low Hanging Fruit Edition)

Closed Draft: Issue #3347502: Fix PHPStan L1 errors "Access to an undefined property Foo\Bar::$baz" (Low Hanging Fruit Edition)
1 unresolved thread
Closed spokje requested to merge issue/drupal-3347502:3347502-low-hanging-fruit into 10.1.x
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Dave Long
    Dave Long @longwave started a thread on the diff
  • 380 380 if ($this->getEntityType()->getBundleOf()) {
    381 381 // Throw an exception if the bundle ID is longer than 32 characters.
    382 382 if (mb_strlen($this->id()) > EntityTypeInterface::BUNDLE_MAX_LENGTH) {
    383 throw new ConfigEntityIdLengthException("Attempt to create a bundle with an ID longer than " . EntityTypeInterface::BUNDLE_MAX_LENGTH . " characters: $this->id().");
    383 $id = $this->id() ?? '';
    • Annoying that we have to do this, given that the comparison above means that this must be a string by the time we get here.

    • Seems to me the root cause is the fact that EntityBase doesn't declare the property id but does have the function id() which uses $this->id.

    • Please register or sign in to reply
  • spokje changed the description

    changed the description

  • spokje changed target branch from 10.1.x to 11.x

    changed target branch from 10.1.x to 11.x

  • Ankitha Shetty added 573 commits

    added 573 commits

    Compare with previous version

  • spokje changed target branch from 11.x to 10.1.x

    changed target branch from 11.x to 10.1.x

  • Ankitha Shetty added 1 commit

    added 1 commit

    Compare with previous version

  • spokje marked this merge request as draft

    marked this merge request as draft

  • closed

  • Please register or sign in to reply
    Loading