Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable classmap authoritative autoloading #1046

Merged
merged 15 commits into from
Dec 6, 2024
8 changes: 8 additions & 0 deletions lib/PhpParser/Node/Expr/ArrayItem.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Expr;

require __DIR__ . '/../ArrayItem.php';

if (false) {
ghostwriter marked this conversation as resolved.
Show resolved Hide resolved
// For classmap-authoritative support.
class ArrayItem extends \PhpParser\Node\ArrayItem {
}
}
8 changes: 8 additions & 0 deletions lib/PhpParser/Node/Expr/ClosureUse.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Expr;

require __DIR__ . '/../ClosureUse.php';

if (false) {
// For classmap-authoritative support.
class ClosureUse extends \PhpParser\Node\ClosureUse {
}
}
8 changes: 8 additions & 0 deletions lib/PhpParser/Node/Scalar/DNumber.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Scalar;

require __DIR__ . '/Float_.php';

if (false) {
// For classmap-authoritative support.
class DNumber extends Float_ {
}
}
8 changes: 8 additions & 0 deletions lib/PhpParser/Node/Scalar/Encapsed.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Scalar;

require __DIR__ . '/InterpolatedString.php';

if (false) {
// For classmap-authoritative support.
class Encapsed extends InterpolatedString {
}
}
10 changes: 10 additions & 0 deletions lib/PhpParser/Node/Scalar/EncapsedStringPart.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Scalar;

use PhpParser\Node\InterpolatedStringPart;

require __DIR__ . '/../InterpolatedStringPart.php';

if (false) {
// For classmap-authoritative support.
class EncapsedStringPart extends InterpolatedStringPart {
}
}
8 changes: 8 additions & 0 deletions lib/PhpParser/Node/Scalar/LNumber.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Scalar;

require __DIR__ . '/Int_.php';

if (false) {
// For classmap-authoritative support.
class LNumber extends Int_ {
}
}
10 changes: 10 additions & 0 deletions lib/PhpParser/Node/Stmt/DeclareDeclare.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Stmt;

use PhpParser\Node\DeclareItem;

require __DIR__ . '/../DeclareItem.php';

if (false) {
// For classmap-authoritative support.
class DeclareDeclare extends DeclareItem {
}
}
10 changes: 10 additions & 0 deletions lib/PhpParser/Node/Stmt/PropertyProperty.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Stmt;

use PhpParser\Node\PropertyItem;

require __DIR__ . '/../PropertyItem.php';

if (false) {
// For classmap-authoritative support.
class PropertyProperty extends PropertyItem {
}
}
8 changes: 8 additions & 0 deletions lib/PhpParser/Node/Stmt/StaticVar.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Stmt;

require __DIR__ . '/../StaticVar.php';

if (false) {
// For classmap-authoritative support.
class StaticVar extends \PhpParser\Node\StaticVar {
}
}
10 changes: 10 additions & 0 deletions lib/PhpParser/Node/Stmt/UseUse.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<?php declare(strict_types=1);

namespace PhpParser\Node\Stmt;

use PhpParser\Node\UseItem;

require __DIR__ . '/../UseItem.php';

if (false) {
// For classmap-authoritative support.
class UseUse extends UseItem {
}
}
50 changes: 50 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,56 @@ parameters:
count: 1
path: lib/PhpParser/Lexer/Emulative.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Expr/ArrayItem.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Expr/ClosureUse.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Scalar/DNumber.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Scalar/Encapsed.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Scalar/EncapsedStringPart.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Scalar/LNumber.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Stmt/DeclareDeclare.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Stmt/PropertyProperty.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Stmt/StaticVar.php

-
message: "#^If condition is always false\\.$#"
count: 1
path: lib/PhpParser/Node/Stmt/UseUse.php

-
message: "#^Constant T_PRIVATE_SET not found\\.$#"
count: 2
Expand Down
Loading