You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

260 lines
8.4 KiB

3 years ago
  1. CHANGELOG
  2. ---------
  3. ### v3.6.2, 2021.04.09
  4. - Fixed string interpolation
  5. ### v3.6.1, 2020.11.07
  6. - Fixed serialization error [#84](https://github.com/opis/closure/issues/84)
  7. ### v3.6.0, 2020.10.12
  8. - Initial PHP 8 Support [#67](https://github.com/opis/closure/issues/67).
  9. ### v3.5.7, 2020.09.06
  10. - Fixed issue [#76](https://github.com/opis/closure/issues/76).
  11. - Fixed issue [#78](https://github.com/opis/closure/issues/78).
  12. ### v3.5.6, 2020.08.11
  13. - Fixed issue [#70](https://github.com/opis/closure/issues/70)
  14. ### v3.5.5, 2020.06.17
  15. - Fixed a false-positive when using `Opis\Closure\ReflectionClosure::isScopeRequired` method
  16. ### v3.5.4, 2020.06.07
  17. - Fixed a false-positive when using `Opis\Closure\ReflectionClosure::isScopeRequired` method
  18. - Fixed a bug related to `T_STRING_VARNAME`
  19. ### v3.5.3, 2020.05.25
  20. - Improved parser
  21. - The class scope optimisation is no longer used. We always bind now to the closure's original class scope.
  22. When the class scope was `null`, the optimisation failed to work as expected and kept the wrong `SerializableClosure` scope.
  23. ### v3.5.2, 2020.05.21
  24. - Removed extra semicolon in short closures, since is not part of the closure's body.
  25. ### v3.5.1, 2019.11.30
  26. - Bugfix. See #47
  27. ### v3.5.0, 2019.11.29
  28. - Added support for short closures (arrow functions)
  29. - Added `isShortClosure` method to `Opis\Closure\ReflectionClosure`
  30. ### v3.4.2, 2019.11.29
  31. - Added `stream_set_option()`
  32. ### v3.4.1, 2019.10.19
  33. - Fixed a [bug](https://github.com/opis/closure/issues/40) that prevented serialization to work correctly.
  34. ### v3.4.0, 2019.09.03
  35. - Added `createClosure` static method in `Opis\Closure\SerializableClosure`.
  36. This method creates a new closure from arbitrary code, emulating `create_function`,
  37. but without using eval
  38. ### v3.3.1, 2019.07.10
  39. - Use `sha1` instead of `md5` for hashing file names in `Opis\Closure\ReflectionClosure` class
  40. ### v3.3.0, 2019.05.31
  41. - Fixed a bug that prevented signed closures to properly work when the serialized string
  42. contains invalid UTF-8 chars. Starting with this version `json_encode` is no longer used
  43. when signing a closure. Backward compatibility is maintained and all closures that were
  44. previously signed using the old method will continue to work.
  45. ### v3.2.0, 2019.05.05
  46. - Since an unsigned closure can be unserialized when no security provider is set,
  47. there is no reason to treat differently a signed closure in the same situation.
  48. Therefore, the `Opis\Closure\SecurityException` exception is no longer thrown when
  49. unserializing a signed closure, if no security provider is set.
  50. ### v3.1.6, 2019.02.22
  51. - Fixed a bug that occurred when trying to set properties of classes that were not defined in user-land.
  52. Those properties are now ignored.
  53. ### v3.1.5, 2019.01.14
  54. - Improved parser
  55. ### v3.1.4, 2019.01.14
  56. - Added support for static methods that are named using PHP keywords or magic constants.
  57. Ex: `A::new()`, `A::use()`, `A::if()`, `A::function()`, `A::__DIR__()`, etc.
  58. - Used `@internal` to mark classes & methods that are for internal use only and
  59. backward compatibility is not guaranteed.
  60. ### v3.1.3, 2019.01.07
  61. - Fixed a bug that prevented traits to be correctly resolved when used by an
  62. anonymous class
  63. - Fixed a bug that occurred when `$this` keyword was used inside an anonymous class
  64. ### v3.1.2, 2018.12.16
  65. * Fixed a bug regarding comma trail in group-use statements. See [issue 23](https://github.com/opis/closure/issues/23)
  66. ### v3.1.1, 2018.10.02
  67. * Fixed a bug where `parent` keyword was treated like a class-name and scope was not added to the
  68. serialized closure
  69. * Fixed a bug where return type was not properly handled for nested closures
  70. * Support for anonymous classes was improved
  71. ### v3.1.0, 2018.09.20
  72. * Added `transformUseVariables` and `resolveUseVariables` to
  73. `Opis\Closure\SerializableClosure` class.
  74. * Added `removeSecurityProvider` static method to
  75. `Opis\Closure\SerializableClosure` class.
  76. * Fixed some security related issues where a user was able to unserialize an unsigned
  77. closure, even when a security provider was in use.
  78. ### v3.0.12, 2018.02.23
  79. * Bugfix. See [issue 20](https://github.com/opis/closure/issues/20)
  80. ### v3.0.11, 2018.01.22
  81. * Bugfix. See [issue 18](https://github.com/opis/closure/issues/18)
  82. ### v3.0.10, 2018.01.04
  83. * Improved support for PHP 7.1 & 7.2
  84. ### v3.0.9, 2018.01.04
  85. * Fixed a bug where the return type was not properly resolved.
  86. See [issue 17](https://github.com/opis/closure/issues/17)
  87. * Added more tests
  88. ### v3.0.8, 2017.12.18
  89. * Fixed a bug. See [issue 16](https://github.com/opis/closure/issues/16)
  90. ### v3.0.7, 2017.10.31
  91. * Bugfix: static properties are ignored now, since they are not serializable
  92. ### v3.0.6, 2017.10.06
  93. * Fixed a bug introduced by accident in 3.0.5
  94. ### v3.0.5, 2017.09.18
  95. * Fixed a bug related to nested references
  96. ### v3.0.4, 2017.09.18
  97. * \[*internal*\] Refactored `SerializableClosure::mapPointers` method
  98. * \[*internal*\] Added a new optional argument to `SerializableClosure::unwrapClosures`
  99. * \[*internal*\] Removed `SerializableClosure::getClosurePointer` method
  100. * Fixed various bugs
  101. ### v3.0.3, 2017.09.06
  102. * Fixed a bug related to nested object references
  103. * \[*internal*\] `Opis\Closure\ClosureScope` now extends `SplObjectStorage`
  104. * \[*internal*\] The `storage` property was removed from `Opis\Closure\ClosureScope`
  105. * \[*internal*\] The `instances` and `objects` properties were removed from `Opis\Closure\ClosureContext`
  106. ### v3.0.2, 2017.08.28
  107. * Fixed a bug where `$this` object was not handled properly inside the
  108. `SerializableClosre::serialize` method.
  109. ### v3.0.1, 2017.04.13
  110. * Fixed a bug in 'ignore_next' state
  111. ### v3.0.0, 2017.04.07
  112. * Dropped PHP 5.3 support
  113. * Moved source files from `lib` to `src` folder
  114. * Removed second parameter from `Opis\Closure\SerializableClosure::from` method and from constructor
  115. * Removed `Opis\Closure\{SecurityProviderInterface, DefaultSecurityProvider, SecureClosure}` classes
  116. * Refactored how signed closures were handled
  117. * Added `wrapClosures` and `unwrapClosures` static methods to `Opis\Closure\SerializableClosure` class
  118. * Added `Opis\Colosure\serialize` and `Opis\Closure\unserialize` functions
  119. * Improved serialization. You can now serialize arbitrary objects and the library will automatically wrap all closures
  120. ### v2.4.0, 2016.12.16
  121. * The parser was refactored and improved
  122. * Refactored `Opis\Closure\SerializableClosure::__invoke` method
  123. * `Opis\Closure\{ISecurityProvider, SecurityProvider}` were added
  124. * `Opis\Closure\{SecurityProviderInterface, DefaultSecurityProvider, SecureClosure}` were deprecated
  125. and they will be removed in the next major version
  126. * `setSecretKey` and `addSecurityProvider` static methods were added to `Opis\Closure\SerializableClosure`
  127. ### v2.3.2, 2016.12.15
  128. * Fixed a bug that prevented namespace resolution to be done properly
  129. ### v2.3.1, 2016.12.13
  130. * Hotfix. See [PR](https://github.com/opis/closure/pull/7)
  131. ### v2.3.0, 2016.11.17
  132. * Added `isBindingRequired` and `isScopeRequired` to the `Opis\Closure\ReflectionClosure` class
  133. * Automatically detects when the scope and/or the bound object of a closure needs to be serialized.
  134. ### v2.2.1, 2016.08.20
  135. * Fixed a bug in `Opis\Closure\ReflectionClosure::fetchItems`
  136. ### v2.2.0, 2016.07.26
  137. * Fixed CS
  138. * `Opis\Closure\ClosureContext`, `Opis\Closure\ClosureScope`, `Opis\Closure\SelfReference`
  139. and `Opis\Closure\SecurityException` classes were moved into separate files
  140. * Added support for PHP7 syntax
  141. * Fixed some bugs in `Opis\Closure\ReflectionClosure` class
  142. * Improved closure parser
  143. * Added an analyzer for SuperClosure library
  144. ### v2.1.0, 2015.09.30
  145. * Added support for the missing `__METHOD__`, `__FUNCTION__` and `__TRAIT__` magic constants
  146. * Added some security related classes and interfaces: `Opis\Closure\SecurityProviderInterface`,
  147. `Opis\Closure\DefaultSecurityProvider`, `Opis\Closure\SecureClosure`, `Opis\Closure\SecurityException`.
  148. * Fiexed a bug in `Opis\Closure\ReflectionClosure::getClasses` method
  149. * Other minor bugfixes
  150. * Added support for static closures
  151. * Added public `isStatic` method to `Opis\Closure\ReflectionClosure` class
  152. ### v2.0.1, 2015.09.23
  153. * Removed `branch-alias` property from `composer.json`
  154. * Bugfix. See [issue #6](https://github.com/opis/closure/issues/6)
  155. ### v2.0.0, 2015.07.31
  156. * The closure parser was improved
  157. * Class names are now automatically resolved
  158. * Added support for the `#trackme` directive which allows tracking closure's residing source
  159. ### v1.3.0, 2014.10.18
  160. * Added autoload file
  161. * Changed README file
  162. ### Opis Closure 1.2.2
  163. * Started changelog