Skip to content

Commit d184745

Browse files
authored
Merge pull request #937 from sarjona/fixselfclass
[docs] Fix call to emit_deprecation_if_present using self
2 parents 1897578 + 9f1cd75 commit d184745

File tree

1 file changed

+2
-2
lines changed
  • general/development/policies/deprecation

1 file changed

+2
-2
lines changed

general/development/policies/deprecation/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ debugging('foobar() is deprecated. Please use foobar::blah() instead.', DEBUG_DE
6464
```php
6565
#[\core\attribute\deprecated('foobar::blahv()', since: '4.4', mdl: 'MDL-XXXXX')]
6666
public function foobar(): void {
67-
\core\deprecation::emit_deprecation_if_present([self, __FUNCTION__]);
67+
\core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]);
6868
}
6969
```
7070

@@ -120,7 +120,7 @@ throw new coding_exception(
120120
```php
121121
#[\core\attribute\deprecated('foobar::blah()', since: '4.4', mdl: 'MDL-XXXXX', final: true)]
122122
public function foobar(): void {
123-
\core\deprecation::emit_deprecation_if_present([self, __FUNCTION__]);
123+
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
124124
}
125125
```
126126

0 commit comments

Comments
 (0)