Skip to content
This release introduces [vimeo/psalm](https://github.com/vimeo/psalm) and
[PHPStorm](https://www.jetbrains.com/phpstorm/)-specific type-declarations for
all API endpoints that do not return simple scalar/object types.

Effectively, that means that following code will now be statically analysable
by psalm and PHPStorm, which will know the exact type of `$proxy`:

```php
class MyExample
{
    public function bar(int $parameter) : void {}
}

$proxyFactory
    ->createProxy(MyExample::class)
    ->bar('hello world!'); // this will be detected as a type mismatch
```

In practice, this means that most projects won't need to use explicit inline
type-hints such as `/** @var SomeClassName $proxy */`, and the tooling will
pick up these types implicitly.

Improvements were also applied to type declarations in generated code,
autoloading (now switched to PSR-4) and null-check `??` operator usages.

Total issues resolved: **9**

- [359: Extend date for bug fixes and security fixes for the 2.x series](https://github.com/Ocramius/ProxyManager/pull/359) thanks to @malukenho
- [360: README.md fix FQCN usage](https://github.com/Ocramius/ProxyManager/pull/360) thanks to @Slamdunk
- [408: Add return type `self` to generated method](https://github.com/Ocramius/ProxyManager/pull/408) thanks to @malukenho
- [426: Replace one ?: by ?? for consistency](https://github.com/Ocramius/ProxyManager/pull/426) thanks to @nicolas-grekas
- [428: Moved to psr-4](https://github.com/Ocramius/ProxyManager/pull/428) thanks to @samnela
- [429: #426 replace falsey check (`?:`) with null coalesce (`??`) operations](https://github.com/Ocramius/ProxyManager/pull/429) thanks to @Ocramius
- [453: Bump dependencies/CS standard/add typed properties](https://github.com/Ocramius/ProxyManager/pull/453) thanks to @Ocramius
- [463: Provide `@psalm-param class-string<T>` documentation for proxy factories and anything type-hinted `object` and `: object`](https://github.com/Ocramius/ProxyManager/issues/463) thanks to @Ocramius
- [465: #463: psalm-specific type declarations for generic/intersection types of proxies](https://github.com/Ocramius/ProxyManager/pull/465) thanks to @Ocramius