ProxyManager icon indicating copy to clipboard operation
ProxyManager copied to clipboard

Support for non-nullable typed properties

Open petr-buchin opened this issue 4 years ago β€’ 11 comments

Fixes https://github.com/Ocramius/ProxyManager/issues/683 and https://github.com/Ocramius/ProxyManager/issues/682

This PR adds support for non-nullable typed properties when using AccessInterceptorScopeLocalizer proxy.

@Ocramius I tried to start from tests, as you said in https://github.com/Ocramius/ProxyManager/issues/683#issuecomment-815052652

do start from the test suite, by adding a class that looks like what you are trying to proxy, and making it work from there

I added class ClassWithNonNullableTypedProperties, but as far as I see, existing tests are pretty informative already when used with this class, since all I want to achieve is to have this class proxied (which is being done in tests) and to have proxy being able to act like an original object (being in sync with it), which is also covered by existing tests.

So if you can think of any other tests that I need to write for this PR, please request changes and I'll do it.

Thanks in advance!

petr-buchin avatar Apr 12 '21 21:04 petr-buchin

@Ocramius seems like in the last commit I've adressed all issues you mentioned.

Could you please give it a new review?

Thanks!

petr-buchin avatar Apr 13 '21 20:04 petr-buchin

@Ocramius sorry for bothering you, but will you have time to review this PR in the coming weeks?

petr-buchin avatar Apr 21 '21 13:04 petr-buchin

@petr-buchin possibly throwing it at the weekend - this week is packed with work.

Ocramius avatar Apr 21 '21 15:04 Ocramius

@Ocramius thank you very much - it would be great to have this reviewed in the coming weeks whenever you have time for it. So no hurry.

petr-buchin avatar Apr 21 '21 17:04 petr-buchin

@Ocramius may I ask you to look into this when you have time?

We have entire framework depending on this feature, and it would be great to use this library instead of fork (as we do now).

Thanks in advance!

petr-buchin avatar Jun 08 '21 14:06 petr-buchin

Indeed, I should try and verify this locally, but did also not get to it as I was hoping, sorry :(

Ocramius avatar Jun 09 '21 09:06 Ocramius

Dear @Ocramius, is there any chance you can look at this PR ?

Our company uses fork of ProxyManager repo, that includes this PR, for almost a year.

Our 2 opensource repositories are dependent on this fork functionality. Our clients are the biggest banks in a world, so this code is "battle-tested" for almost a year in production and did not cause any problems or performance-related troubles.

But now we need to install symfony/orm-pack, which depends on friendsofphp/proxy-manager-lts, which is a fork from your repository.

friendsofphp/proxy-manager-lts replaces ocramius/ProxyManager lib via it's Composer settings, and your repository is upstream for it, thus to use it, I must have this PR merged here and updated from upstream in friendsofphp/proxy-manager-lts.

Could you please look at this PR? Maybe I can do something for you to consider this PR?

Thanks in advance!

petr-buchin avatar Jan 31 '22 16:01 petr-buchin

Hey @petr-buchin, I'll put it on the milestone for the next minor, which includes PHP 8.1.x support, but I haven't actively worked on ocramius/proxy-manager, other than bugfixes, for a while now.

As for the clients using this, I don't really care much, an mentioning that they're the biggest banks in the world only reduces my will to throw unpaid time at it :D

I'll see when I can work on this :)

Ocramius avatar Jan 31 '22 17:01 Ocramius

@Ocramius I do understand you :)

If it matters - I don't work for a bank, banks are clients of company where I work :)

an mentioning that they're the biggest banks in the world only reduces my will to throw unpaid time at it

Π‘an I pay for you time to look at this?

If I do, please email me at [email protected].

Thanks very much!

petr-buchin avatar Jan 31 '22 17:01 petr-buchin

It'd be great rebasing + squashing this PR in one commit on top of 2.15.x

nicolas-grekas avatar May 03 '22 08:05 nicolas-grekas