@@ -508,7 +508,7 @@ private function readProperty($zval, $property)
508508 */
509509 private function getReadAccessInfo ($ class , $ property )
510510 {
511- $ key = ( false !== strpos ( $ class , '@ ' ) ? rawurlencode ($ class ) : $ class ). ' .. ' . $ property ;
511+ $ key = false !== strpbrk ( $ key = $ class. ' .. ' . $ property , '{}()/@: ' ) ? rawurlencode ($ key ) : $ key ;
512512
513513 if (isset ($ this ->readPropertyCache [$ key ])) {
514514 return $ this ->readPropertyCache [$ key ];
@@ -687,7 +687,7 @@ private function writeCollection($zval, $property, $collection, $addMethod, $rem
687687 */
688688 private function getWriteAccessInfo ($ class , $ property , $ value )
689689 {
690- $ key = ( false !== strpos ( $ class , '@ ' ) ? rawurlencode ($ class ) : $ class ). ' .. ' . $ property ;
690+ $ key = false !== strpbrk ( $ key = $ class. ' .. ' . $ property , '{}()/@: ' ) ? rawurlencode ($ key ) : $ key ;
691691
692692 if (isset ($ this ->writePropertyCache [$ key ])) {
693693 return $ this ->writePropertyCache [$ key ];
@@ -868,7 +868,8 @@ private function getPropertyPath($propertyPath)
868868 }
869869
870870 if ($ this ->cacheItemPool ) {
871- $ item = $ this ->cacheItemPool ->getItem (self ::CACHE_PREFIX_PROPERTY_PATH .$ propertyPath );
871+ $ key = false !== strpbrk ($ propertyPath , '{}()/@: ' ) ? rawurlencode ($ propertyPath ) : $ propertyPath ;
872+ $ item = $ this ->cacheItemPool ->getItem (self ::CACHE_PREFIX_PROPERTY_PATH .str_replace ('\\' , '. ' , $ key ));
872873 if ($ item ->isHit ()) {
873874 return $ this ->propertyPathCache [$ propertyPath ] = $ item ->get ();
874875 }
0 commit comments