Skip to content

Releases: nette/php-generator

Released version 4.1.5

12 May 17:13
@dg dg
Compare
Choose a tag to compare
  • added PhpNamespace::getClass() & getFunction()
  • added CommentAware::removeComment()
  • added PhpFile::removeNamespace()
  • Factory, Extractor: sets flag readonly for promoted properties #158 (reverts "Factory: properties in readonly classes are not readonly")
  • ClassType: cloning includes attributes and parameters
  • GlobalFunction, Method: from() accepts first-class callables

Released version 4.1.4

07 Mar 23:00
@dg dg
Compare
Choose a tag to compare
  • PsrPrinter: opening bracket on the correct line #155
  • Make ClassLike::from return type assert the subclass type (BC break) (#154)
  • Dumper::dumpArray(), dumpArguments() optimization
  • Dumper: simplified list with negative keys
  • added parameter $overwrite to addMember(), addMethod(), addProperty(), addConstant(), addCase() #152
  • Factory: parameters 'int $foo = null' are parsed as '?int'

Released version 4.1.3

18 Jan 17:52
@dg dg
Compare
Choose a tag to compare
  • Extractor: supports PHP-Parser 5.0 (#150)
  • Extractor: fix escaping quotes when converting to double quoted string #151
  • Extractor: NOWDOC/HEREDOC are not converted to single line strings
  • Dumper: added $customObjects
  • Dumper: refactoring, added dumpCustomObject()
  • Printer: option $omitEmptyNamespaces is applied by printFile() [Close #147]

Released version 4.1.2

29 Oct 22:58
@dg dg
Compare
Choose a tag to compare
  • Support union type in Type::nullable (#141)
  • Extractor: fixed extracting of special arrays #143

Released version 4.1.1

17 Oct 08:16
@dg dg
Compare
Choose a tag to compare
  • ClassType: added inheritMethod() & inheritProperty()
  • Printer: added option $omitEmptyNamespaces
  • added ConstantsAware::getConstant()
  • Extractor::extractAll() extracts only top-level classes and functions, fixed file comment parsing
  • Extractor: extracts native PHP values
  • ClassType: getType() is deprecated
  • Printer: fixed falsy Attribute aren't printed (#142)

Released version 4.1.0

29 Aug 19:06
@dg dg
Compare
Choose a tag to compare
  • ClassType::class(), interface(), traits() & enum() are deprecated
  • removed Nette\SmartObject
  • removed deprecated stuff

Released version 4.0.9

29 Aug 19:06
@dg dg
Compare
Choose a tag to compare
  • Parameters can have comments
  • added Literal::new() #130
  • fixed #135

Released version 4.0.8

30 Jul 14:04
@dg dg
Compare
Choose a tag to compare
  • support for PHP 8.3
  • Factory: properties in readonly classes are not readonly
  • FunctionLike: added getParameter() & hasParameter()
  • ConstantsAware: added hasConstant() (#133)

Released version 4.0.7

26 Apr 15:16
@dg dg
Compare
Choose a tag to compare
  • Printer: added $singleParameterOnOneLine (#132)
  • fixed class resolving in trait usages #128
  • Printer: multiline attributes are in own attribute block
  • Printer: attributes on parameters are placed on its own line
  • coding style

Released version 4.0.6

13 Mar 15:26
@dg dg
Compare
Choose a tag to compare
  • added support for typed constants
  • Printer: print brace on next line when method/function has typehint
  • Printer: promoted parameters / parameter with attributes are always multiline
  • Printer: printAttributes & printReturnType are protected #123
  • used PhpStorm Language attribute