@@ -351,7 +351,9 @@ public function map($json, $object)
351351 $ refDeserializePostMethod = $ rc ->getMethod (
352352 $ this ->postMappingMethod
353353 );
354- $ refDeserializePostMethod ->setAccessible (true );
354+ if (\PHP_VERSION_ID < 80100 ) {
355+ $ refDeserializePostMethod ->setAccessible (true );
356+ }
355357 $ refDeserializePostMethod ->invoke (
356358 $ object , ...$ this ->postMappingMethodArguments
357359 );
@@ -694,7 +696,9 @@ protected function setProperty(
694696 $ object , $ accessor , $ value
695697 ) {
696698 if (!$ accessor ->isPublic () && $ this ->bIgnoreVisibility ) {
697- $ accessor ->setAccessible (true );
699+ if (\PHP_VERSION_ID < 80100 ) {
700+ $ accessor ->setAccessible (true );
701+ }
698702 }
699703 if ($ accessor instanceof ReflectionProperty) {
700704 $ accessor ->setValue ($ object , $ value );
@@ -754,7 +758,7 @@ protected function createInstance(
754758 */
755759 protected function getMappedType ($ type , $ jvalue = null )
756760 {
757- if (isset ($ this ->classMap [$ type ])) {
761+ if (isset ($ this ->classMap [$ type ?? '' ])) {
758762 $ target = $ this ->classMap [$ type ];
759763 } else if (is_string ($ type ) && $ type !== '' && $ type [0 ] == '\\'
760764 && isset ($ this ->classMap [substr ($ type , 1 )])
0 commit comments