PackageTrack
Sign in Get early access

zendframework/zend-code

Abandoned; use laminas/laminas-code. Extensions to the PHP Reflection API, static code scanning, and code generation

3.4.1 84M downloads/mo #1743 most downloaded on Packagist zendframework/zend-code

What this package is like to depend on

Last release 7 years ago

no release in 18 months

Release timing varies

gaps range from 8 days to 13 months

Rarely documented

notes for 17 of 79 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

79 releases · first in 2012

0 releases in the last 12 months

see the full history below

Release timeline

61 releases · Oct 2012 to Dec 2019
2013 2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60 of 79
  1. 3.4.1 10 Dec 2019
    Release notes

    Added

    • #180 adds support for PHP 7.4.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #179 fixes exception message when invalid value provided in Zend\Code\Generator\ValueGenerator.

    • #180 fixes PHP 7.4 compatibility.

    Open source →
    Release notes

    Added

    • #180 adds support for PHP 7.4.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #179 fixes exception message when invalid value provided in Zend\Code\Generator\ValueGenerator.

    • #180 fixes PHP 7.4 compatibility.

    Open source →
  2. 3.4.0 05 Oct 2019
    Release notes

    Added

    • #170 adds class constant visibility modifiers support.

    • #169 adds the ability to define declare statements.

    • #167 adds the ability to remove doc block of a member.

    Changed

    • #166 changes omitting default property value if it is null.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #172 fixes PHP 7.4 compatibility.
    Open source →
    Release notes

    Added

    • #170 adds class constant visibility modifiers support.

    • #169 adds the ability to define declare statements.

    • #167 adds the ability to remove doc block of a member.

    Changed

    • #166 changes omitting default property value if it is null.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #172 fixes PHP 7.4 compatibility.
    Open source →
  3. 3.3.2 31 Aug 2019
    Release notes

    Added

    • #162 adds support for PHP 7.3.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #171 changes
      curly braces in array and string offset access to square brackets
      in order to prevent issues under the upcoming PHP 7.4 release.

    • #164 fixes indentation in multi-level arrays generated by ValueGenerator.

    Open source →
    Release notes

    Added

    • #162 adds support for PHP 7.3.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #171 changes curly braces in array and string offset access to square brackets in order to prevent issues under the upcoming PHP 7.4 release.

    • #164 fixes indentation in multi-level arrays generated by ValueGenerator.

    Open source →
  4. 3.3.1 13 Aug 2018
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #158 updates several switch cases to use break instead of continue
      in order to prevent issues under the upcoming PHP 7.3 release.

    • #147 fixes the regular expression used for @var annotations to
      allow omission of the variable name.

    • #146 updates all @return annotations to reflect the correct types returned by each method.

    • #144 fixes the class generator such that it now resolves
      setExtendedClass() arguments to aliases provided to the generator.

    • #140 fixes MethodScanner::setVisibility() such that it no longer
      casts the provided visibility token to lower case; this fix is necessary, as
      the method is supposed to expect only the appropriate
      T_(PUBLIC|PROTECTED|PRIVATE) token values, which are integers.

    • #140 updates the MethodScanner::setVisibility() method to raise
      a package-specific InvalidArgumentException instead of the non-existent
      package Exception class when an invalid visibility is provided.

    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #158 updates several switch cases to use break instead of continue in order to prevent issues under the upcoming PHP 7.3 release.

    • #147 fixes the regular expression used for @var annotations to allow omission of the variable name.

    • #146 updates all @return annotations to reflect the correct types returned by each method.

    • #144 fixes the class generator such that it now resolves setExtendedClass() arguments to aliases provided to the generator.

    • #140 fixes MethodScanner::setVisibility() such that it no longer casts the provided visibility token to lower case; this fix is necessary, as the method is supposed to expect only the appropriate T_(PUBLIC|PROTECTED|PRIVATE) token values, which are integers.

    • #140 updates the MethodScanner::setVisibility() method to raise a package-specific InvalidArgumentException instead of the non-existent package Exception class when an invalid visibility is provided.

    Open source →
  5. 3.3.0 20 Oct 2017
    Release notes

    3.3.0 - 2017-10-20

    Added

    • #131 added the
      ability to omit a parameter type declaration
    • #132 added a
      lightweight MethodGenerator::copyMethodSignature() constructor that
      only copies the method declaration with no body nor docblock.
    • #134 short array
      notation is now used by default for generated array values
    • #136 added the
      ability to specify an omitdefaultvalue key when using
      ParameterGenerator::fromArray()

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #130 Updated
      links to the documentation
    • #133 The default
      value of a ParameterGenerator is always a ValueGenerator

    Total issues resolved: 6

    Open source →
    Release notes

    Added

    • #131 added the ability to omit a parameter type declaration
    • #132 added a lightweight MethodGenerator::copyMethodSignature() constructor that only copies the method declaration with no body nor docblock.
    • #134 short array notation is now used by default for generated array values
    • #136 added the ability to specify an omitdefaultvalue key when using ParameterGenerator::fromArray()

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #130 Updated links to the documentation
    • #133 The default value of a ParameterGenerator is always a ValueGenerator
    Open source →
  6. 3.2.0 23 Jul 2017
    Release notes

    3.2.0 - 2017-07-23

    Added

    • #112
      #110 Introduced
      support for the PHP 7.2 object type-hint
    • #41 Added VarTag
      support to the docblock generators and reflectors: allows generating
      and parsing @var tags.
    • #113 Added
      PHP 7.2 to the build matrix
    • #114 Increased
      minimum supported PHP version to ^7.1.0
    • #114 Upgraded
      PHPUnit dependency to ^6.2.2
    • #121 Imported
      global functions via use statements (experimenting with OpCache
      OPCODE inlining optimisations)

    Deprecated

    • Nothing.

    Removed

    • #113
      #118 Removed
      HHVM support
    • #122 Removed
      IRC notifications for pushes/build statuses

    Fixed

    • #101 avoid
      calling isInternalPhpType twice in the TypeGenerator
    • #115 Replaced
      assertions in the test suite with their static counterparts where
      applicable
    • #120
      #109
      #100 Applied
      ZendFramework coding standard to the library code
    • #119 Corrected
      test suite errors caused by mismatching parameter order
    • #106
    • #107 Minor
      typing error corrections in documentation and error messages

    Total issues resolved: 16

    Open source →
    Release notes

    Added

    • #112 #110 Introduced support for the PHP 7.2 object type-hint
    • #41 Added VarTag support to the docblock generators and reflectors: allows generating and parsing @var tags.
    • #113 Added PHP 7.2 to the build matrix
    • #114 Increased minimum supported PHP version to ^7.1.0
    • #114 Upgraded PHPUnit dependency to ^6.2.2
    • #121 Imported global functions via use statements (experimenting with OpCache OPCODE inlining optimisations)

    Deprecated

    • Nothing.

    Removed

    • #113 #118 Removed HHVM support
    • #122 Removed IRC notifications for pushes/build statuses

    Fixed

    • #101 avoid calling isInternalPhpType twice in the TypeGenerator
    • #115 Replaced assertions in the test suite with their static counterparts where applicable
    • #120 #109 #100 Applied ZendFramework coding standard to the library code
    • #119 Corrected test suite errors caused by mismatching parameter order
    • #106
    • #107 Minor typing error corrections in documentation and error messages
    Open source →
  7. 3.1.0 24 Oct 2016
    Release notes

    Added

    • #87 support for
      PHP 7.1's void return type declaration.
    • #87 support for
      PHP 7.1's nullable type declarations.
    • #87 support for
      PHP 7.1's iterable type declaration.
    • #62 added
      Zend\Code\Generator\MethodGenerator#getReturnType() accessor.
    • #68
      #26 added mutators
      to allow removing/checking for existence of methods, properties, constants,
      parameters and type declarations across all the code generator API.
    • #65 continuous
      integration testing now checks locked, newest and oldest dependency
      sets.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.

    Total issues resolved: 5

    Open source →
    Release notes

    Added

    • #87 support for PHP 7.1's void return type declaration.
    • #87 support for PHP 7.1's nullable type declarations.
    • #87 support for PHP 7.1's iterable type declaration.
    • #62 added Zend\Code\Generator\MethodGenerator#getReturnType() accessor.
    • #68 #26 added mutators to allow removing/checking for existence of methods, properties, constants, parameters and type declarations across all the code generator API.
    • #65 continuous integration testing now checks locked, newest and oldest dependency sets.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
  8. 3.0.5 24 Oct 2016
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #92 corrected Zend\Code\Scanner\ClassScanner to detect multiple interface inheritance.
    • #95 corrected Zend\Code\Generator\ParameterGenerator to allow copying parameter signatures for non-optional parameters that are still nullable via a default = null value.
    • #94 corrected Zend\Code\Generator\ValueGenerator so that class constants can now be generated with arrays as default value (supported since PHP 5.6).
    Open source →
  9. 3.0.4 30 Jun 2016
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #59 fixes an issue with detection of multiple trait use statements.
    • #75 provides a patch to ensure that extends statements qualify the parent class based on the current namespace and/or import statements.
    Open source →
  10. 3.0.3 27 Jun 2016
    Release notes

    Added

    • #66 publishes the documentation to https://docs.zendframework.com/zend-code/.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #61 fixes an issue with how parameter typehints were generated; previously, fully-qualified class names were not being generated with the leading backslash, causing them to attempt to resolve as if they were relative to the current namespace.
    • #69 fixes an issue with how class names under the same namespace are generated when generating typehints, extends, and implements values; they now strip the common namespace from the class name.
    • #72 fixes an issue within the TokenArrayScanner when scanning closures.
    Open source →
  11. 3.0.2 20 Apr 2016
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #52 updates several dependency constraints:
      • zend-stdlib now allows either the 2.7 or 3.0 series, as the APIs consumed by zend-code are compatible across versions.
      • PHP now excludes the 7.0.5 release, as it has known issues in its tokenizer implementation that make the zend-code token scanner unusable.
    • #46 updates all generators to use \n for line endings in generated code, vs PHP_EOL, ensuring cross-platform consistency.
    Open source →
  12. 3.0.1 26 Jan 2016
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #34 method name cannot be optional when adding a method to a class generator.
    • #38 PHP_CodeSniffer was moved to dev dependencies
    Open source →
  13. 3.0.0 13 Jan 2016
    Release notes

    Changed

    • #140 updates the MethodScanner::setVisibility() method to raise a package-specific InvalidArgumentException instead of the non-existent package Exception class when an invalid visibility is provided.

    This section refers to breaking changes: please refer to docs/book/migration.md for migration instructions.

    • Types string, int, float, bool passed to Zend\Code\Generator\ParameterGenerator#setType() are no longer ignored in generated code #30
    • Types declared in DocBlocks are now ignored when creating a Zend\Code\Generator\ParameterGenerator via Zend\Code\Generator\ParameterGenerator::fromReflection(). #30
    • Type strings are now validated: passing an invalid type to any method in the generator API may lead to a Zend\Code\Generator\InvalidArgumentException being thrown. #30
    • Zend\Code\Generator\ParameterGenerator::$simple was removed. #30
    • Zend\Code\Generator\ParameterGenerator#$type is now a null|Zend\Code\Generator\TypeGenerator: was a string before. #30
    • Zend\Code\Generator type-hints are now always prefixed with the namespace separator \. #30
    • Zend\Code\Reflection\ParameterReflection#getType() was renamed to Zend\Code\Reflection\ParameterReflection#detectType() in order to not override the inherited ReflectionParameter#getType(), introduced in PHP 7. #30

    Added

    • PHP 7 return type hints generation support via Zend\Code\Generator\MethodGenerator#setReturnType(). #30
    • PHP 7 scalar type hints generation support via Zend\Code\Generator\ParameterGenerator#setType() and Zend\Code\Generator\ParameterGenerator#getType(). #30
    • PHP 5.6 variadic arguments support via Zend\Code\Generator\ParameterGenerator#setVariadic() and Zend\Code\Generator\ParameterGenerator#getVariadic(). #30
    • Generation of methods returning by reference is supported via Zend\Code\Generator\ParameterGenerator#setReturnsReference(). #30

    Deprecated

    • Nothing.

    Removed

    • Zend\Code\ParameterGenerator::$simple was removed. #30

    Fixed

    • Nothing.
    Open source →
  14. 2.6.3 20 Apr 2016

    Nothing published for this version

  15. 2.6.2 05 Jan 2016
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #31 updated license year.
    Open source →
  16. 2.6.1 24 Nov 2015
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #25 changes the doctrine/common suggestion/dev-dependency to the more specific doctrine/annotations package (which is what is actually consumed).
    Open source →
  17. 2.6.0 18 Nov 2015
    Release notes

    Added

    • #12 adds the ability to generate arrays using either long/standard syntax (array(...)) or short syntax ([...]). This can be accomplished by setting the value type to ValueGenerator::TYPE_ARRAY_SHORT instead of using TYPE_ARRAY. Additionally, you can use TYPE_ARRAY_LONG instead of TYPE_ARRAY; the two constants are synonyms.
    • #11 adds the ability to generate interfaces via the new class Zend\Code\Generator\InterfaceGenerator.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #20 updates the zend-eventmanager dependency to ^2.6|^3.0, and changes its internal usage to use the triggerEventUntil() signature.
    Open source →
  18. 2.5.3 18 Nov 2015
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • #10 removes a development dependency on zendframework/zend-version.
    • #23 removes a requirement on zendframework/zend-stdlib. This results in a slight change in Zend\Code\Generator\ValueGenerator: setConstants() and getConstants() can now receive/emit either an SPL ArrayObject or Zend\Stdlib\ArrayObject. Since these are functionally equivalent, however, you will experience no change in behavior.

    Fixed

    • Nothing.
    Open source →
  19. 2.5.2 21 Jul 2015

    Nothing published for this version

  20. 2.5.1 03 Jun 2015

    Nothing published for this version

  21. 2.5.0 03 Jun 2015

    Nothing published for this version

  22. 2.4.13 11 May 2015

    Nothing published for this version

  23. 2.4.12 no date

    Nothing published for this version

  24. 2.4.11 no date

    Nothing published for this version

  25. 2.4.10 no date

    Nothing published for this version

  26. 2.4.9 no date

    Nothing published for this version

  27. 2.4.8 no date

    Nothing published for this version

  28. 2.4.7 no date

    Nothing published for this version

  29. 2.4.6 no date

    Nothing published for this version

  30. 2.4.5 no date

    Nothing published for this version

  31. 2.4.4 no date

    Nothing published for this version

  32. 2.4.3 no date

    Nothing published for this version

  33. 2.4.2 no date

    Nothing published for this version

  34. 2.4.1 07 May 2015

    Nothing published for this version

  35. 2.4.0 31 Mar 2015

    Nothing published for this version

  36. 2.3.9 12 Mar 2015

    Nothing published for this version

  37. 2.3.8 no date

    Nothing published for this version

  38. 2.3.7 no date

    Nothing published for this version

  39. 2.3.6 12 Mar 2015

    Nothing published for this version

  40. 2.3.5 18 Feb 2015

    Nothing published for this version

  41. 2.3.4 14 Jan 2015

    Nothing published for this version

  42. 2.3.3 16 Sep 2014

    Nothing published for this version

  43. 2.3.2 12 Aug 2014

    Nothing published for this version

  44. 2.3.1 15 Apr 2014

    Nothing published for this version

  45. 2.3.0 12 Mar 2014

    Nothing published for this version

  46. 2.2.10 06 Mar 2014

    Nothing published for this version

  47. 2.2.9 no date

    Nothing published for this version

  48. 2.2.8 no date

    Nothing published for this version

  49. 2.2.7 no date

    Nothing published for this version

  50. 2.2.6 no date

    Nothing published for this version

  51. 2.2.5 31 Oct 2013

    Nothing published for this version

  52. 2.2.4 26 Aug 2013

    Nothing published for this version

  53. 2.2.3 21 Aug 2013

    Nothing published for this version

  54. 2.2.2 24 Jul 2013

    Nothing published for this version

  55. 2.2.1 12 Jun 2013

    Nothing published for this version

  56. 2.2.0 15 May 2013

    Nothing published for this version

  57. 2.1.6 17 Apr 2013

    Nothing published for this version

  58. 2.1.5 no date

    Nothing published for this version

  59. 2.1.4 13 Mar 2013

    Nothing published for this version

  60. 2.1.3 21 Feb 2013

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive