🐘 Generates neat PHP code for you. Supports new PHP 8.3 features.
This release takes advantage of all the new features of PHP 8 and cleans up some issues in the API.
Stricter behaviour:
Changes:
$this
Deprecations:
ClassType::withBodiesFrom()
replaced with from(..., withBodies: true)
GlobalFunction::withBodyFrom()
replaced with from(..., withBody: true)
resolveName()
PhpNamespace::addUse()
ignores names in current namespace #96BLOG POST: https://blog.nette.org/en/phpgenerator-3-6-news-from-php-8-1-and-more
addUse()
& simplifyName()
is case-insensitivePhpNamespace::simplifyName()
fixed collision when alias already existsPhpNamespace::addUse()
removed parameter $aliasOut (BC break)PhpNamespace::addUse()
simplified aliases generationaddUse()
& simplifyName()
is case-insensitivePhpNamespace::simplifyName()
fixed collision when alias already existsPhpNamespace::addUse()
removed parameter $aliasOut (BC break)PhpNamespace::addUse()
simplified aliases generationgetType()
, getReturnType()
: added option $asObject that returns Nette\Utils\TypePhpNamespace::simplifyType()
supports generics like Foo<A, B>
PhpNamespace::unresolveName()
renamed to simplifyName()
Helpers::unindent()
fixed when level = 0Dumper::format()
placeholder ? must not be followed by \wPhpNamespace::addUse()
added validationClassType::fromCode()
& PhpFile::fromCode()
#79getClasses()
fn()
without spaceBranch 3.5 is no longer supported