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.