Releases: nette/php-generator
Releases · nette/php-generator
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.
Released version 3.2.0
New features
- added
Printer
, code from __toString moved to Printer - added
PsrPrinter
, compatible with PSR-2 and PSR-12 [Closes #30] - added
PhpNamespace::add()
[Closes #27] - added
NameAware::cloneWithName()
- added
FunctionLike::removeParameter()
&ClassType::removeMethod()
,removeProperty()
,removeConstant()
- added
ClassType::addMember()
[Closes #35] - ClassType: implemented deep clone
- ClassType: added
VISIBILITY_*
constants - PhpFile: added setStrictTypes()
Changes
PhpNamespace::add*()
- removed checking whether class already exists - to be consistent with the rest of package (BC break)- FunctionLike: removed setNamespace() (BC break)
ClassType::getNamespace()
is softly deprecated. An object can be in multiple namespaces.- ClassType, Method: added validate(), prevents classes and methods from declared both final and abstract [BC break] (#36)
- __toString converts exceptions to errors
- fine tuned generated coding style
For the details you can have a look at the diff.