Skip to content
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

[Annotation] Added the ability to set the type when using @VirtualProperty #69

Merged
merged 2 commits into from
Mar 28, 2013

Conversation

pylebecq
Copy link

As discussed in nelmio/NelmioApiDocBundle#161, I added the ability to force the type of a virtual property when using the @VirtualProperty annotation.

Comments are always welcome :)

@stof
Copy link
Contributor

stof commented Mar 28, 2013

Wouldn't it be better to use the @Type annotation ?

@pylebecq
Copy link
Author

I don't know. I talked about that in the discussion nelmio/NelmioApiDocBundle#161 but I thought you guys didn't see it.
Sorry if I misunderstood.

@schmittjoh Do you prefer the use of the @Type annotation ?

@schmittjoh
Copy link
Owner

Yeah, using the @type annotation is more consistent with all the other
annotations.

On Thu, Mar 28, 2013 at 2:51 PM, Pierre-Yves LEBECQ <
[email protected]> wrote:

I don't know. I talked about that in the discussion
nelmio/NelmioApiDocBundle#161https://github.com/nelmio/NelmioApiDocBundle/issues/161but I thought you guys didn't see it. I thought you were
Sorry if I misunderstood.

@schmittjoh https://github.com/schmittjoh Do you prefer the use of the
@type annotation ?


Reply to this email directly or view it on GitHubhttps://github.com//pull/69#issuecomment-15589306
.

@pylebecq
Copy link
Author

That was easier than I though this way.

@schmittjoh
Copy link
Owner

Could you add a small test-case? Just so that we avoid regressions later.

@pylebecq
Copy link
Author

I added a test case but there is something odd : adding a new virtual property in ObjectWithVirtualProperties.php changes the order of the properties. That's why I had to switch some positions in the test files.
Maybe it's normal but I don't understand why. Any hint ?

@schmittjoh
Copy link
Owner

Did you run the test-case before you added the new property and was it
successful?

On Thu, Mar 28, 2013 at 4:31 PM, Pierre-Yves LEBECQ <
[email protected]> wrote:

I added a test case but there something odd : adding a new virtual
property in ObjectWithVirtualProperties.php change the order of the
properties. That why I had to switch some positions in the test files.
Maybe it's normal but I don't understand why. Any hint ?


Reply to this email directly or view it on GitHubhttps://github.com//pull/69#issuecomment-15594927
.

@pylebecq
Copy link
Author

Yes.

@schmittjoh schmittjoh merged commit b199ae3 into schmittjoh:master Mar 28, 2013
@schmittjoh
Copy link
Owner

Must be some weird PHP behavior, but as long as there is no explicit order requested, it's basically undefined; so, it should not bother us too much.

I've merged the changes in.

@pylebecq
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants