Skip to content

[PropertyInfo] Add possibility to extract private and protected properties in reflection extractor #30706

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

Conversation

joelwurtz
Copy link
Contributor

@joelwurtz joelwurtz commented Mar 26, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #30248
License MIT
Doc PR TODO

This PR add the possibility to extract private and protected properties from a class by passing a new argument to the ReflectionExtractor

This new argument consist of flag that filters properties, so someone will also be able to use the ReflectionExtractor only for private property

new ReflectionExtractor(null, null, null, true, ReflectionExtractor::ALLOW_PRIVATE | ReflectionExtractor::ALLOW_PROTECTED)

Flags method was prefered over a list of bool to avoid too many parameters and also be close to the reflection API of PHP

@joelwurtz joelwurtz changed the title Add possibility to extract private and protected properties in reflection extractor [PropertyInfo] Add possibility to extract private and protected properties in reflection extractor Mar 26, 2019
@fabpot fabpot force-pushed the feature/private-reflection-extractor branch from 8cafd2e to 05e487f Compare March 27, 2019 06:41
@fabpot
Copy link
Member

fabpot commented Mar 27, 2019

Thank you @joelwurtz.

@fabpot fabpot merged commit 05e487f into symfony:master Mar 27, 2019
fabpot added a commit that referenced this pull request Mar 27, 2019
…protected properties in reflection extractor (joelwurtz)

This PR was squashed before being merged into the 4.3-dev branch (closes #30706).

Discussion
----------

[PropertyInfo] Add possibility to extract private and protected properties in reflection extractor

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30248
| License       | MIT
| Doc PR        | TODO

This PR add the possibility to extract private and protected properties from a class by passing a new argument to the `ReflectionExtractor`

This new argument consist of flag that filters properties, so someone will also be able to use the `ReflectionExtractor` only for private property

```php
new ReflectionExtractor(null, null, null, true, ReflectionExtractor::ALLOW_PRIVATE | ReflectionExtractor::ALLOW_PROTECTED)
```

Flags method was prefered over a list of bool to avoid too many parameters and also be close to the reflection API of PHP

Commits
-------

05e487f [PropertyInfo] Add possibility to extract private and protected properties in reflection extractor
nicolas-grekas added a commit that referenced this pull request Mar 28, 2019
…cted (joelwurtz)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[PropertyInfo] Add missing changelog for private / protected

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | somehow
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Add missing changelog for #30706

Commits
-------

8c5663d Add missing changelog for private / protected
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Apr 1, 2019
This PR was squashed before being merged into the master branch (closes #11247).

Discussion
----------

Documented the new Unique constraint

Documents symfony/symfony#30706

Commits
-------

4b2007e Documented the new Unique constraint
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
@joelwurtz joelwurtz deleted the feature/private-reflection-extractor branch May 9, 2019 07:29
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