You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project has a dependency on doctrine/common in the Bundle class (DoctrineBundle). It uses the ClassUtils.
As far as I can see, because doctrine/orm required doctrine/common up until 3.0, it was always installed and it was never a problem. But, when upgrading doctrine/orm to ithe 3.0-beta.2 version (to try and find some bugs to work on :p) I found that my project no longer worked.
Which is found in DoctrineBundle::boot`. The context here is (I believe) auto-loading a class for which we want to generate a proxy class.
With ClassUtils::getRealClass looking as follows:
/** * Gets the real class name of a class name that could be a proxy. * * @param string $className * @psalm-param class-string<Proxy<T>>|class-string<T> $className * * @return string * @psalm-return class-string<T> * * @template T of object */publicstaticfunctiongetRealClass($className)
{
$pos = strrpos($className, '\\' . Proxy::MARKER . '\\');
if ($pos === false) {
/** @psalm-var class-string<T> */return$className;
}
returnsubstr($className, $pos + Proxy::MARKER_LENGTH + 2);
}
So the naive solution would be to add doctrine/common to the composer.json file.
An alternative solution would be to extract the necessary feature from the doctrine/common package, and put it in this project.
I remember something about deprecating something in a doctrine common namespace a few years ago, and I am not sure if the common library is in the process of being phased out. If this is the case, the alternative solution would obviously take preference, as the method in question is quite simple.
I've made a PR (#1746 ) for the naive solution. If another solution is desired, I would also be happy to work on that. Please let me know.
The text was updated successfully, but these errors were encountered:
This project has a dependency on
doctrine/common
in the Bundle class (DoctrineBundle
). It uses theClassUtils
.As far as I can see, because
doctrine/orm
requireddoctrine/common
up until 3.0, it was always installed and it was never a problem. But, when upgradingdoctrine/orm
to ithe3.0-beta.2
version (to try and find some bugs to work on :p) I found that my project no longer worked.The offending line is at
DoctrineBundle:104
:Which is found in DoctrineBundle::boot`. The context here is (I believe) auto-loading a class for which we want to generate a proxy class.
With
ClassUtils::getRealClass
looking as follows:So the naive solution would be to add
doctrine/common
to thecomposer.json
file.An alternative solution would be to extract the necessary feature from the
doctrine/common
package, and put it in this project.I remember something about deprecating something in a doctrine common namespace a few years ago, and I am not sure if the common library is in the process of being phased out. If this is the case, the alternative solution would obviously take preference, as the method in question is quite simple.
I've made a PR (#1746 ) for the naive solution. If another solution is desired, I would also be happy to work on that. Please let me know.
The text was updated successfully, but these errors were encountered: