Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

5.0.0 - There can be more than @one

Compare
Choose a tag to compare
@mikey179 mikey179 released this 31 Dec 17:23
· 240 commits to master since this release

BC breaks

  • Removed stubbles\ioc\App::createModeBindingModule($projectPath, $mode = null)
    • project path and mode are now bound automatically if not explicitly specified
    • to overrule or configure the defaults use stubbles\ioc\App::runtime($mode = null) instead
  • A __bindings() method within an app doesn't receive the project path any more. If it is still required call self::projectPath()
  • Deprecated stubbles\ioc\App::bindCurrentWorkingDirectory(), use stubbles\ioc\App::currentWorkingDirectory() instead, will be removed with 6.0.0
  • Deprecated stubbles\ioc\App::bindHostname(), use stubbles\ioc\App::hostname() instead, will be removed with 6.0.0
  • Removed possibility to change values on annotations, annotations should be read only.
  • It is now possible to have more than one annotation of the same type. Retrieving only one annotation via one of the following methods will only return the first defined one:
    • stubbles\lang\reflect\ReflectionClass::annotation()
    • stubbles\lang\reflect\ReflectionObject::annotation()
    • stubbles\lang\reflect\ReflectionFunction::annotation()
    • stubbles\lang\reflect\ReflectionMethod::annotation()
    • stubbles\lang\reflect\ReflectionParameter::annotation()
    • stubbles\lang\reflect\ReflectionProperty::annotation()
  • Deprecated stubbles\lang\reflect\Reflection*::getAnnotation(), use stubbles\lang\reflect\Reflection*::annotation() instead
  • Retrieving a non-existing value from stubbles\lang\reflect\annotation\Annotation via method will throw a BadMethodCallException instead of stubbles\lang\exception\MethodNotSupportedException
  • Parsing null with any of the stubbles\lang\Parse methods will now always return null.
  • Removed all classes, methods and functions deprecated with 4.0.0 and 4.1.0
  • The stubbles\lang\exception\IllegalAccessException is now also an instance of LogicException. It is recommended to use the latter in catch statements, as this increases interoperability.
  • The stubbles\lang\exception\IllegalArgumentException is now also an instance of InvalidArgumentException. It is recommended to use the latter in catch statements, as this increases interoperability.
  • The stubbles\lang\exception\IllegalStateException is now also an instance of LogicException. It is recommended to use the latter in catch statements, as this increases interoperability.
  • The stubbles\lang\exception\MethodInvocationException is now also an instance of BadMethodCallException. It is recommended to use the latter in catch statements, as this increases interoperability.
  • The stubbles\lang\exception\MethodNotSupportedException is now also an instance of BadMethodCallException. It is recommended to use the latter in catch statements, as this increases interoperability.
  • Deprecated several exceptions where build-in exceptions in PHP exist, will be removed with 6.0.0:
    • stubbles\lang\exception\IllegalAccessException, use LogicException instead
    • stubbles\lang\exception\IllegalArgumentException, use InvalidArgumentException instead
    • stubbles\lang\exception\IllegalStateException, use LogicException instead
    • stubbles\lang\exception\MethodInvocationException, use BadMethodCallException instead
    • stubbles\lang\exception\MethodNotSupportedException, use BadMethodCallException instead
    • stubbles\lang\exception\RuntimeException, use native RuntimeException instead
  • Deprecated stubbles\lang\exception\Throwable, will be removed with 6.0.0

Other changes

  • Added possibility to retrieve all annotations for an element:
    • stubbles\lang\reflect\ReflectionClass::annotations()
    • stubbles\lang\reflect\ReflectionObject::annotations()
    • stubbles\lang\reflect\ReflectionFunction::annotations()
    • stubbles\lang\reflect\ReflectionMethod::annotations()
    • stubbles\lang\reflect\ReflectionParameter::annotations()
    • stubbles\lang\reflect\ReflectionProperty::annotations()
  • Added non-static usage of stubbles\lang\Parse
    • instance creation takes a string value
    • all methods to*() are additionally available as non-static as*() methods except toType()
  • Added stubbles\lang\Properties::parse() which returns an instance of stubbles\lang\Parse
  • Added stubbles\lang\reflect\annotation\Annotation::parse() which returns an instance of stubbles\lang\Parse
  • Added stubbles\lang\iterator\RecursiveArrayIterator to iterate recursively on leafs of arrays only
  • Added stubbles\lang\iterator\MappingIterator to allow mapping of keys and values during iteration