-
- Downloads
Merge tag '2.4.0' into upstream
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 # gpg: Signature faite le lun. 03 juin 2019 13:10:01 -10 # gpg: avec la clef RSA 969287AB0A84CAAE3F48A69C4167D3337FD9D629 # gpg: Bonne signature de « Marco Pivetta (Ocramius) <ocramius@gmail.com> » [inconnu] # gpg: alias « [jpeg image of size 3228] » [inconnu] # gpg: alias « [jpeg image of size 12261] » [inconnu] # gpg: Attention : cette clef n'est pas certifiée avec une signature de confiance. # gpg: Rien n'indique que la signature appartient à son propriétaire. # Empreinte de clef principale : 7BB9 B50F E8E0 2118 7914 A5C0 9F65 FBC2 12EC 2DF8 # Empreinte de la sous-clef : 9692 87AB 0A84 CAAE 3F48 A69C 4167 D333 7FD9 D629
No related branches found
No related tags found
Showing
- .github/FUNDING.yml 2 additions, 0 deletions.github/FUNDING.yml
- .phpstorm.meta.php 46 additions, 0 deletions.phpstorm.meta.php
- .travis.yml 7 additions, 1 deletion.travis.yml
- composer.json 7 additions, 8 deletionscomposer.json
- examples/access-interceptor-scope-localizer.php 27 additions, 24 deletionsexamples/access-interceptor-scope-localizer.php
- examples/ghost-object-skipped-properties.php 41 additions, 29 deletionsexamples/ghost-object-skipped-properties.php
- examples/ghost-object.php 33 additions, 19 deletionsexamples/ghost-object.php
- examples/remote-proxy.php 17 additions, 13 deletionsexamples/remote-proxy.php
- examples/remote-proxy/remote-proxy-server.php 9 additions, 5 deletionsexamples/remote-proxy/remote-proxy-server.php
- examples/smart-reference.php 22 additions, 18 deletionsexamples/smart-reference.php
- examples/virtual-proxy.php 26 additions, 16 deletionsexamples/virtual-proxy.php
- phpcs.xml.dist 4 additions, 0 deletionsphpcs.xml.dist
- phpstan.neon 0 additions, 15 deletionsphpstan.neon
- psalm.xml 62 additions, 0 deletionspsalm.xml
- src/ProxyManager/Autoloader/Autoloader.php 2 additions, 5 deletionssrc/ProxyManager/Autoloader/Autoloader.php
- src/ProxyManager/Autoloader/AutoloaderInterface.php 2 additions, 0 deletionssrc/ProxyManager/Autoloader/AutoloaderInterface.php
- src/ProxyManager/Configuration.php 17 additions, 30 deletionssrc/ProxyManager/Configuration.php
- src/ProxyManager/Factory/AbstractBaseFactory.php 18 additions, 7 deletionssrc/ProxyManager/Factory/AbstractBaseFactory.php
- src/ProxyManager/Factory/AccessInterceptorScopeLocalizerFactory.php 43 additions, 6 deletions...anager/Factory/AccessInterceptorScopeLocalizerFactory.php
- src/ProxyManager/Factory/AccessInterceptorValueHolderFactory.php 45 additions, 6 deletions...xyManager/Factory/AccessInterceptorValueHolderFactory.php
Loading
Please register or sign in to comment