ProxyManager v2.4.0 Release Notes
Release Date: 2019-06-03 // almost 5 years ago-
๐ This release introduces vimeo/psalm and 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
: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 thanks to @malukenho
- 360: README.md fix FQCN usage thanks to @Slamdunk
- 408: Add return type
self
to generated method thanks to @malukenho - 426: Replace one ?: by ?? for consistency thanks to @nicolas-grekas
- ๐ 428: Moved to psr-4 thanks to @samnela
- 429: #426 replace falsey check (
?:
) with null coalesce (??
) operations thanks to @Ocramius - 453: Bump dependencies/CS standard/add typed properties thanks to @Ocramius
- ๐ 463: Provide
@psalm-param class-string<T>
documentation for proxy factories and anything type-hintedobject
and: object
thanks to @Ocramius - 465: #463: psalm-specific type declarations for generic/intersection types of proxies thanks to @Ocramius