Skip to content

Class name conflict with Symfony Bridge proxy manager and Ocramius ProxyManager #33364

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
crmpicco opened this issue Aug 28, 2019 · 3 comments
Closed

Comments

@crmpicco
Copy link

Symfony version(s) affected: 3.4.31

Description
I am experiencing a warning when running composer dump-autoload --optimize in my application and it is happening because of my apparent use of the proxy manager along with the Symfony bridge.

How to reproduce

$ composer dump-autoload --optimize
Generating optimized autoload files

Warning: Ambiguous class resolution, "ProxyManager\Generator\Util\ProxiedMethodReturnExpression" was found in both "/private/var/www/crmpicco/symfony/vendor/ocramius/proxy-manager/src/ProxyManager/Generator/Util/ProxiedMethodReturnExpression.php" and "/private/var/www/crmpicco/symfony/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/Legacy/ProxiedMethodReturnExpression.php", the first will be used.

Generated optimized autoload files containing 8939 classes 

I am using Proxy-Manager 2.2.3:

$ composer show -i | grep proxy
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
ocramius/proxy-manager               2.2.3                 A library providing utilities to generate, instantiate and generally operate with Object Proxies

Additional context
I reported this on Ocramius' Github account, however he suggested it is a Symfony issue and pointed me in this direction. Ocramius/ProxyManager#489 (comment)

@stof
Copy link
Member

stof commented Aug 28, 2019

this is related to #32992

@stof
Copy link
Member

stof commented Aug 28, 2019

@Ocramius any chance to backport the PHP 7.4 compat fix (avoiding the deprecation warning) to older ProxyManager versions (which tell composer they support PHP 7.4) instead of forcing to implement such hack in Symfony to workaround the issue ?

@Ocramius
Copy link
Contributor

Ocramius commented Aug 28, 2019

@stof newer ProxyManager releases already support PHP 7.4 in the stable 2.x series

nicolas-grekas added a commit that referenced this issue Aug 29, 2019
…ll (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[ProxyManager] remove ProxiedMethodReturnExpression polyfill

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

Let's make this unneeded.

Commits
-------

792f930 [ProxyManager] remove ProxiedMethodReturnExpression polyfill
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