Releases: nette/php-generator
Releases · nette/php-generator
Released version 3.5.0
Supports all new PHP 8 features!
- implemented support for PHP 8 attributes
- implemented support for PHP 8 union types
- implemented PHP 8 constructor property promotion
- Factory: supports attributes in PHP 8
- Dumper::format() syntax ...? now supports named parameters (possible BC break)
- Printer: prints trailing comma in parameter lists when PHP 8 syntax is used
- Factory: loads method bodies from traits
- PhpFile::addNamespace() accepts PhpNamespace object (#68)
BLOG POST https://blog.nette.org/en/news-in-phpgenerator-3-5
Released version 3.4.1 (EOL)
- PHP-safe indentation replaced with Helpers::
unindent()
because requires too much memory - Factory: fix method bodies import #61 (#62)
- Factory::
extractBody()
replaces multi-line & HEREDOC strings with single-line - Printer: added $returnTypeColon #63
- Printer: added $linesBetweenProperties #60
- added support for PHP 8.0 types mixed, static, false, null
This is the last 3.4.x release.
Released version 3.4.0
- Factory: reads class constants with visibility & phpDoc
- Factory: added option to load methods a functions with bodies [Closes #59][Closes #4]
- implemented PHP-safe indentation
- Printer: one-line properties without comments are not separated using one empty line
- Printer: constants with comments are separated using one empty line
Released version 3.3.4 (EOL)
- ClassType: added
removeImplement()
&removeTrait()
#53 - Printer:
printParameters()
is public - Printer: added
printType()
- added Factory::
fromCallable()
- added Type::
getType()
This is the last 3.3.x release.
Released version 3.3.3
- ClassType: added new setter/getters for each type
- VisibilityAware: added new setter/getters for each visibility
- added Type
- added Literal as alias for PhpLiteral
- Dumper: dumped classes are fully qualified
- Dumper::
dumpArray()
hides keys only in non-associative arrays #51
For the details you can have a look at the diff.
Released version 3.3.0
- supports PHP 7.4
- added support for PHP 7.4 typed properties
- added Printer::printArrowFunction() for new PHP 7.4 arrow functions
- added new class Dumper
- output better respects wrap-length #45 #47
- default wrap-length changed to 120
- added setType()/getType()/hasStrictTypes()/hasBracketedSyntax()/isReturnNullable() as future replacements for setTypeHint()/getTypeHint()/getStrictTypes()/getBracketedSyntax()/getReturnNullable()
Released version 3.2.3 (EOL)
- PsrPrinter: fixed indentation of dumps #41
- Printer: added
printUses()
- ClassType: added
hasProperty()
&hasMethod()
This is the last 3.2.x release.
Released version 3.2.2
Released version 3.2.1
Released version 3.1.4 (EOL)
- Printer: fixed use statements generation
This is the last v3.1.x release.