Skip to content

Commit db4b60a

Browse files
authored
PHP 8/php-generator v4 compatibility update (#5)
* PHP 8/php-generator v4 compatibility update PhpGenerator\ClassType.php was refactored in v.4, so $methods-property became private. Fixed by using $class->getMethod('initialize') instead. * Update HttpAuthExtension.php tabs instead of spaces
1 parent 4384dc1 commit db4b60a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HttpAuthExtension/HttpAuthExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function afterCompile(ClassType $class): void
4040
$config = $this->config;
4141

4242
if (isset($config->username, $config->password, $config->title)) {
43-
$initialize = $class->methods['initialize'];
43+
$initialize = $class->getMethod('initialize');
4444

4545
$initialize->addBody('$auth = new HttpAuthExtension\HttpAuthenticator( $this->getByType(\'Nette\Http\IResponse\'), ?, ?, ? );',
4646
[$config->username, $config->password, $config->title]);

0 commit comments

Comments
 (0)