8000 [PropertyAccess] Add public method to see if property exists/is accessible · Issue #8659 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[PropertyAccess] Add public method to see if property exists/is accessible #8659

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

Closed
ianfp opened this issue Aug 3, 2013 · 5 comments
Closed

Comments

@ianfp
Copy link
ianfp commented Aug 3, 2013

I have a use-case where I'd like to see if a property is accessible using the PropertyAccess component. If it just try to access it, it throws an exception, which is great, but an isAccessible() would be a nice feature.

Is this a good idea?

@wouterj
Copy link
Member
wouterj commented Aug 3, 2013

👍

@webmozart
Copy link
Contributor

Sounds good to me. :)

@cordoval
Copy link
Contributor
cordoval commented Dec 7, 2013

@ianfp could you please elaborate in your use case?

@ianfp
Copy link
Author
ianfp commented Dec 9, 2013

@cordoval Well... I ended up finding a different solution, and now I can't remember where I needed it. Perhaps someone else has a more pressing use case that they can share?

@cordoval
Copy link
Contributor
cordoval commented Dec 9, 2013

@bschussek should we then keep this open without a usecase?

fabpot added a commit that referenced this issue Mar 31, 2014
…webmozart)

This PR was merged into the 2.5-dev branch.

Discussion
----------

[PropertyAccess] Added isReadable() and isWritable()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8659
| License       | MIT
| Doc PR        | symfony/symfony-docs#3729

This PR introduces BC breaks that are described in detail in the UPGRADE file. The BC breaks conform to our policy. They shouldn't affect many people, so I think we can safely do them.

Commits
-------

f7fb855 [PropertyAccess] Added missing exceptions to phpdoc
9aee2ad [PropertyAccess] Removed the argument $value from isWritable()
4262707 [PropertyAccess] Fixed CS and added missing documentation
6d2af21 [PropertyAccess] Added isReadable() and isWritable()
20e6bf8 [PropertyAccess] Refactored PropertyAccessorCollectionTest
0488389 [PropertyAccess] Refactored PropertyAccessorTest
@fabpot fabpot closed this as completed Mar 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0