Php Generator Versions Save

🐘 Generates neat PHP code for you. Supports new PHP 8.3 features.

v4.1.4

3 weeks ago
  • 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'

v4.1.3

2 months ago
  • 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]

v4.1.2

4 months ago
  • Support union type in Type::nullable (#141)
  • Extractor: fixed extracting of special arrays #143

v4.1.1

5 months ago
  • 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)

v4.1.0

6 months ago
  • ClassType::class(), interface(), traits() & enum() are deprecated
  • removed Nette\SmartObject
  • removed deprecated stuff

v4.0.9

6 months ago
  • Parameters can have comments
  • added Literal::new() #130
  • fixed #135

v4.0.8

7 months ago
  • support for PHP 8.3
  • Factory: properties in readonly classes are not readonly
  • FunctionLike: added getParameter() & hasParameter()
  • ConstantsAware: added hasConstant() (#133)

v4.0.7

11 months ago
  • 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

v4.0.6

1 year ago
  • 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

v4.0.4

1 year ago
  • added support for PHP 8.2 features: DNF types, constants in traits, readonly classes, Type::True
  • Type: constants are PascalCase
  • Extractor: keeps the first comment in the method #119
  • Printer: allow customizing comment formatting through protected printDocComment (#118)
  • Helpers::formatDocComment() added option $forceMultiLine
  • Factory: object class contains path from root namespace (#117)
  • Extractor: Fixed extracting enum method body #115 (#116)
  • PhpNamespace: better use-statements sorting behavior