Skip to content

Released version 3.2.8

Latest

Choose a tag to compare

@dg dg released this 26 Oct 15:50
· 79 commits to master since this release

✨ New Features

  • Support for PHP 8.6
  • Support for nette/neon 4.0: configuration files are read the same way as with 3.x, which keeps working
  • #[SensitiveParameter] now hides arrays and other non-scalar arguments too, so database credentials passed as an array no longer show up in Tracy's source snippets
  • Nette\DI\Definitions\Definition now lives at Nette\DI\Definition; the old name keeps working as an alias

💥 Breaking Changes

  • Locator definitions are checked at compile time. Every reference must match a get*() or create*() method of the interface, and every method with a non-nullable return type must have its reference. A typo in a key now fails compilation with a message naming the reference or method, where it used to compile and throw MissingServiceException only on the first call. Fix the key, or make the method's return type nullable if the service is truly optional. Interfaces with a generic get($name) are exempt.
  • Service names may no longer contain __, which is reserved for encoding dots in the names of generated methods.

🐛 Bug Fixes

  • Locator methods with an acronym work with the natural key: getPDO() finds the reference pdo (and still pDO), the same for getURL(), getDB() and the like
  • Container::createInstance() and callMethod() pass the actual value to a scalar parameter marked #[SensitiveParameter]
  • getServiceDescriptors() reports a service named PDO under its real name instead of pDO