Skip to content

Commit 092d36c

Browse files
committed
New test framework: create explicit superclasses
Instead of fudging the superclasses and creating anonymous class instances, generate "real" superclass definitions when testing the stubs and helpers. This helps ensure that we properly inherit and override from the stubs and helpers and don't end up with duplicate method definitions or incompatible overrides. One issue this turned up was an inconsistent definition of the cast() helper method: the return type hint has been removed so that cast() is now consistent with PHP 7.2 covariance restrictions on overrides. Change-Id: Idd8f16cc73cde8079b85864583f890977e731ed0
1 parent 877f60f commit 092d36c

File tree

219 files changed

+351
-760
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+351
-760
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions

src/AbortSignal.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* @phan-forbid-undeclared-magic-properties
1616
*/
1717
interface AbortSignal extends EventTarget {
18+
// Direct parent: EventTarget
19+
1820
/**
1921
* @return bool
2022
*/

src/AddEventListenerOptions.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* @phan-forbid-undeclared-magic-properties
1818
*/
1919
interface AddEventListenerOptions extends EventListenerOptions {
20+
// Direct parent: EventListenerOptions
21+
2022
/**
2123
* @return bool
2224
*/

src/Attr.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
* @phan-forbid-undeclared-magic-properties
3535
*/
3636
interface Attr extends Node {
37+
// Direct parent: Node
38+
3739
/**
3840
* @return ?string
3941
*/

src/AudioTrackList.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* @phan-forbid-undeclared-magic-properties
1818
*/
1919
interface AudioTrackList extends EventTarget, \ArrayAccess {
20+
// Direct parent: EventTarget
21+
2022
/**
2123
* @return int
2224
*/

src/CDATASection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@
3333
* @phan-forbid-undeclared-magic-properties
3434
*/
3535
interface CDATASection extends Text {
36+
// Direct parent: Text
37+
3638
}

src/CharacterData.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
* @phan-forbid-undeclared-magic-properties
3232
*/
3333
interface CharacterData extends Node, ChildNode, NonDocumentTypeChildNode {
34+
// Direct parent: Node
35+
3436
/**
3537
* @return string
3638
*/

src/Comment.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@
3131
* @phan-forbid-undeclared-magic-properties
3232
*/
3333
interface Comment extends CharacterData {
34+
// Direct parent: CharacterData
3435

3536
}

src/CustomEvent.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* @phan-forbid-undeclared-magic-properties
2828
*/
2929
interface CustomEvent extends Event {
30+
// Direct parent: Event
3031

3132
/**
3233
* @return mixed|null

src/CustomEventInit.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* @phan-forbid-undeclared-magic-properties
1818
*/
1919
interface CustomEventInit extends EventInit {
20+
// Direct parent: EventInit
21+
2022
/**
2123
* @return mixed|null
2224
*/

0 commit comments

Comments
 (0)