Skip to content

Releases: nette/php-generator

Released version 3.2.0

09 Aug 15:05
@dg dg
Compare
Choose a tag to compare

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.

Released version 3.1.3

09 Aug 14:43
@dg dg
Compare
Choose a tag to compare
  • ClassType::from() resolves inheriting interfaces #32
  • added ClassType::getTraitResolutions & PhpFile::getNamespaces()
  • optimizations
  • readme.md: improved

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

Released version 3.0.5 (EOL)

09 Aug 14:42
@dg dg
Compare
Choose a tag to compare

This is the last v3.0.x release.

  • ClassType::from() resolves inheriting interfaces #32
  • optimizations

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

Released version 3.1.2

26 Apr 09:49
@dg dg
Compare
Choose a tag to compare
  • Closure: chops 'uses' when are longer than WRAP_LENGTH
  • FunctionLike: chops parameters when are longer than WRAP_LENGTH #28
  • Helpers::formatArgs() chops ?* parameters when are longer than WRAP_LENGTH
  • Helpers: changed WRAP_LENGTH to 100, added INDENT_LENGTH
  • added Helpers::tabsToSpaces()

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

Released version 3.0.4

26 Apr 09:48
@dg dg
Compare
Choose a tag to compare
  • Closure: chops 'uses' when are longer than WRAP_LENGTH
  • FunctionLike: chops parameters when are longer than WRAP_LENGTH #28
  • Helpers::formatArgs() chops ?* parameters when are longer than WRAP_LENGTH
  • Helpers: changed WRAP_LENGTH to 100, added INDENT_LENGTH
  • added Helpers::tabsToSpaces()

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

Released version 2.6.4

26 Apr 09:46
@dg dg
Compare
Choose a tag to compare

This is the last v2.x release.

  • Closure: chops 'uses' when are longer than WRAP_LENGTH
  • FunctionLike: chops parameters when are longer than WRAP_LENGTH #28
  • Helpers::formatArgs() chops ?* parameters when are longer than WRAP_LENGTH
  • Helpers: changed WRAP_LENGTH to 100, added INDENT_LENGTH
  • added Helpers::tabsToSpaces()
  • travis: added PHP 7.2

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

Released version 3.1.1

02 Apr 19:44
@dg dg
Compare
Choose a tag to compare
  • added type hints, type fixes
  • phpDoc: added $var name to @param

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

Released version 3.0.3

02 Apr 19:45
@dg dg
Compare
Choose a tag to compare
  • added type hints, type fixes
  • phpDoc: added $var name to @param

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

Released version 3.0.2

06 Feb 14:48
@dg dg
Compare
Choose a tag to compare
  • PhpNamespace: added support for PHP 7.2 type 'object'

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

Released version 3.1.0

16 Aug 16:10
@dg dg
Compare
Choose a tag to compare
  • requires PHP 7.1 and supports PHP up to 7.2
  • uses PHP 7.1 type hints and constant visiblity
  • removed deprecated stuff
  • Parameter::setOptional() triggers deprecation notice