Skip to content

Releases: nette/php-generator

Released version 3.5.0

02 Nov 16:29
@dg dg
Compare
Choose a tag to compare

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)

25 Jun 12:05
@dg dg
Compare
Choose a tag to compare
  • 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

26 May 16:35
@dg dg
Compare
Choose a tag to compare
  • 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)

09 Feb 14:40
@dg dg
Compare
Choose a tag to compare
  • 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

20 Jan 12:03
@dg dg
Compare
Choose a tag to compare
  • 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

20 Nov 16:43
@dg dg
Compare
Choose a tag to compare
  • 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)

05 Jul 13:11
@dg dg
Compare
Choose a tag to compare
  • 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

25 Mar 19:17
@dg dg
Compare
Choose a tag to compare
  • Printer::setTypeResolving() adds ability to print uresolved code #31
  • Helpers::format() is preferred over formatArgs() because we have variadics :)
  • Factory: uses ReflectionNamedType
  • PhpLiteral is not final

For the details you can have a look at the diff.

Released version 3.2.1

29 Nov 18:34
@dg dg
Compare
Choose a tag to compare
  • PhpFile: added addUse() #38
  • Printer: fixed use statements generation
  • PsrPrinter is final

For the details you can have a look at the diff.

Released version 3.1.4 (EOL)

29 Nov 18:35
@dg dg
Compare
Choose a tag to compare
  • Printer: fixed use statements generation

This is the last v3.1.x release.