diff --git a/src/Entity/Feed.php b/src/Entity/Feed.php index 09fc30a..ae84d94 100644 --- a/src/Entity/Feed.php +++ b/src/Entity/Feed.php @@ -76,16 +76,16 @@ class Feed extends ContentEntityBase implements FeedInterface { */ public function __set($name, $value) { if ($name == 'items') { - @trigger_error('The $items property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/project/aggregator/issues/3239690.', E_USER_DEPRECATED); + @trigger_error('The $items property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/node/3386012.', E_USER_DEPRECATED); $this->items = $value; + return; } - elseif ($name == 'source_string') { - @trigger_error('The $source_string property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/project/aggregator/issues/3239690.', E_USER_DEPRECATED); + if ($name == 'source_string') { + @trigger_error('The $source_string property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/node/3386012.', E_USER_DEPRECATED); $this->source_string = $value; + return; } - else { - parent::__set($name, $value); - } + parent::__set($name, $value); } /** @@ -93,11 +93,11 @@ class Feed extends ContentEntityBase implements FeedInterface { */ public function &__get($name) { if ($name == 'items') { - @trigger_error('The $items property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/project/aggregator/issues/3239690.', E_USER_DEPRECATED); + @trigger_error('The $items property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/node/3386012.', E_USER_DEPRECATED); return $this->items; } - elseif ($name == 'source_string') { - @trigger_error('The $source_string property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/project/aggregator/issues/3239690.', E_USER_DEPRECATED); + if ($name == 'source_string') { + @trigger_error('The $source_string property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/node/3386012.', E_USER_DEPRECATED); return $this->source_string; } return parent::__get($name); diff --git a/tests/src/Kernel/AggregatorLegacyTest.php b/tests/src/Kernel/AggregatorLegacyTest.php index 3e8a1c7..bf5878a 100644 --- a/tests/src/Kernel/AggregatorLegacyTest.php +++ b/tests/src/Kernel/AggregatorLegacyTest.php @@ -36,10 +36,10 @@ class AggregatorLegacyTest extends EntityKernelTestBase { */ public function testDeprecationFeedProperties() { $feed = Feed::create([]); - $this->expectDeprecation('The $items property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/project/aggregator/issues/3239690.'); + $this->expectDeprecation('The $items property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/node/3386012.'); $feed->items = []; $this->assertSame([], $feed->items); - $this->expectDeprecation('The $source_string property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/project/aggregator/issues/3239690.'); + $this->expectDeprecation('The $source_string property is deprecated in 2.1.0 and will be removed from 3.0.0. See https://www.drupal.org/node/3386012.'); $feed->source_string = 'abcde'; $this->assertSame('abcde', $feed->source_string); }