Skip to content

Commit 1b67fdc

Browse files
authored
feat: Add support for PHP 8.4 property hooks (#1090)
1 parent 0e1c7a0 commit 1b67fdc

File tree

3 files changed

+456
-6
lines changed

3 files changed

+456
-6
lines changed

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specs/misc/attributes.php renamed to specs/class/attributes.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,47 @@ class MainCommand
6060
{
6161
}
6262

63+
PHP,
64+
65+
'native Deprecated attribute' => <<<'PHP'
66+
<?php
67+
68+
namespace PhpScoper\Command;
69+
70+
class PhpVersion
71+
{
72+
#[\Deprecated(
73+
message: "use PhpVersion::getVersion() instead",
74+
since: "8.4",
75+
)]
76+
public function getPhpVersion(): string
77+
{
78+
return $this->getVersion();
79+
}
80+
81+
public function getVersion(): string
82+
{
83+
return '8.4';
84+
}
85+
}
86+
87+
----
88+
<?php
89+
90+
namespace Humbug\PhpScoper\Command;
91+
92+
class PhpVersion
93+
{
94+
#[\Deprecated(message: "use PhpVersion::getVersion() instead", since: "8.4")]
95+
public function getPhpVersion(): string
96+
{
97+
return $this->getVersion();
98+
}
99+
public function getVersion(): string
100+
{
101+
return '8.4';
102+
}
103+
}
104+
63105
PHP,
64106
];

0 commit comments

Comments
 (0)