Skip to content

[PropertyInfo] Add support for promoted properties in PhpStanExtractor #46056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Apr 15, 2022

Q A
Bug fix? no
New feature? yes
Deprecations? no
License MIT
Doc PR symfony/symfony-docs#... TBA

Adds support for promoted properties in PhpStanExtractor

@simPod simPod requested a review from dunglas as a code owner April 15, 2022 12:39
@carsonbot carsonbot added this to the 6.1 milestone Apr 15, 2022
@simPod simPod force-pushed the promoted branch 2 times, most recently from f68081a to 9b1b2d2 Compare April 15, 2022 12:45
*/
public function testExtractPhp80Type($property, array $type = null)
{
$this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php80Dummy', $property, []));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php80Dummy', $property, []));
$this->assertEquals($type, $this->extractor->getTypes(Php80Dummy::class, $property, []));

@nicolas-grekas
Copy link
Member

Thank you @simPod.

@nicolas-grekas nicolas-grekas merged commit 8d29cc7 into symfony:6.1 Apr 19, 2022
@simPod simPod deleted the promoted branch April 19, 2022 09:13
@fabpot fabpot mentioned this pull request Apr 27, 2022
nicolas-grekas added a commit that referenced this pull request May 17, 2022
…ies in PhpStanExtractor (BoShurik)

This PR was merged into the 6.1 branch.

Discussion
----------

[PropertyInfo] Ignore empty doc-block for promoted properties in PhpStanExtractor

| Q             | A
| ------------- | ---
| Branch?       | 6.1
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Fix processing empty doc-block for promoted properties (introduced in #46056)

<!--
Replace this notice by a short README for your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against the latest branch.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Commits
-------

410d7f2 [PropertyInfo] Ignore empty doc-block for promoted properties in PhpStanExtractor
ostrolucky added a commit to ostrolucky/symfony that referenced this pull request Jun 1, 2022
…d properties

This demonstrates that symfony#46056 causes a regression and incorrectly detects types in case there are multiple phpdoc covered promoted properties.
ostrolucky added a commit to ostrolucky/symfony that referenced this pull request Jun 1, 2022
…d properties

This demonstrates that symfony#46056 causes a regression and incorrectly detects types in case there are multiple phpdoc covered promoted properties.
simPod pushed a commit to simPod/symfony that referenced this pull request Jun 7, 2022
…d properties

This demonstrates that symfony#46056 causes a regression and incorrectly detects types in case there are multiple phpdoc covered promoted properties.
simPod pushed a commit to simPod/symfony that referenced this pull request Jun 10, 2022
…d properties

This demonstrates that symfony#46056 causes a regression and incorrectly detects types in case there are multiple phpdoc covered promoted properties.
symfony-splitter pushed a commit to symfony/property-info that referenced this pull request Jun 10, 2022
…d properties

This demonstrates that symfony/symfony#46056 causes a regression and incorrectly detects types in case there are multiple phpdoc covered promoted properties.
nathansalter pushed a commit to nathansalter/symfony that referenced this pull request Jun 11, 2022
…d properties

This demonstrates that symfony#46056 causes a regression and incorrectly detects types in case there are multiple phpdoc covered promoted properties.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants