Repository navigation
2.4.0
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 mismatchIn 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
selfto 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-hintedobjectand: objectthanks to @Ocramius - 465: #463: psalm-specific type declarations for generic/intersection types of proxies thanks to @Ocramius