Releases: nette/php-generator
Releases · nette/php-generator
Released version 3.0.0
- requires PHP 7.0
- uses declare(strict_types=1)
- uses PHP 7.0 scalar and return type hints
- some classes & members marked as final (BC break)
- Method: empty body is NULL instead of FALSE (BC break)
- Helpers::formatArgs() checks for insufficient number of placeholders (BC break)
- Parameter::setDefaultValue() automatically sets setOptional(), setOptional is deprecated (BC break)
- PhpNamespace: global namespace represents '' instead of NULL (BC break)
- PhpNamespace::__construct() $name is mandatory, setName() triggers warnings (BC break)
- new deprecated stuff triggers warnings b357b90
Released version 2.6.2
- fixed default values
- ClassType: checks whether names are valid
- Helpers::
isNamespaceIdentifier()
added $allowLeadingSlash - Helpers::
isNamespace()
->isNamespaceIdentifier()
- Closure::
setUses()
checks argument type
For the details you can have a look at the diff.
Released version 2.6.1
- Helpers::formatArgs() escaped
\?
means?
- Helpers::formatArgs()
...?
is substitution for?*
- Helpers::formatArgs() refactoring
For the details you can have a look at the diff.
Released version 2.6.0
- Checks whether names are valid [Closes #24]
- added GlobalFunction & Closure
- ClassType: added possibility to define trait resolution rules
- PhpNamespace: recognizes 'void' and 'iterable' as built-in types
- deprecated setName() & from() trigger warnings (BC break)
- added Factory::fromMethodReflection()
- refactoring: transformed to traits, removed Member
For the details you can have a look at the diff.
Released version 2.5.0
- added Factory
- Method, Parameter: added support for PHP 7.1 nullable types
- Parameter::from() prevents fatal error when default value is not resolvable
- ClassType: improved rendering of anonymous classes
- add Constant; class constants can have declared visibility and comment
- refactoring: extracted base class Member for properties, methods and constants
- Method::from() sets visibility 'public'
- Parameters: added hasDefaultValue() as replacement of isOptional()
- deprecated Parameter::from() and Property::from() (BC break)
Released version 2.4.1
Released version 2.4.0
- requires PHP 5.6
- uses Nette\SmartObject & StaticClass
- deprecated
addDocument()
,setDocuments()
andgetDocuments()
and replaced withaddComment()
,setComment()
andgetComment()
For the details you can have a look at the diff.
Released version 2.3.6
- Helpers::
dump()
support for infinite floats - added
addComment()
,setComment()
andgetComment()
For the details you can have a look at the diff.
Released version 2.3.5
Released version 2.3.4
- ClassType::
from()
fixes for ReflectionObject - added support for anonymous classes
- Helpers::
dump()
throws exception for closures - PhpFile::
__toString()
: brackets are no longer set when generating classes from global namespace only
For the details you can have a look at the diff.