[PropertyAccess] Allow usage of wildcard `[*]`

by @Brajk19

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/52723/77ec853fffda361c53f8c372238dfc834683a368/cs.diff | patch -p0
diff -ru src/Symfony/Component/PropertyAccess/PropertyAccessor.php src/Symfony/Component/PropertyAccess/PropertyAccessor.php
--- src/Symfony/Component/PropertyAccess/PropertyAccessor.php	2025-01-10 11:16:39.804559723 +0000
+++ src/Symfony/Component/PropertyAccess/PropertyAccessor.php	2025-01-10 11:16:42.805565575 +0000
@@ -72,11 +72,8 @@
      * Should not be used by application code. Use
      * {@link PropertyAccess::createPropertyAccessor()} instead.
      *
-     * @param int $magicMethods A bitwise combination of the MAGIC_* constants
-     *                          to specify the allowed magic methods (__get, __set, __call)
-     *                          or self::DISALLOW_MAGIC_METHODS for none
-     * @param int $throw        A bitwise combination of the THROW_* constants
-     *                          to specify when exceptions should be thrown
+     * @param int $throw A bitwise combination of the THROW_* constants
+     *                   to specify when exceptions should be thrown
      */
     public function __construct(
         private int $magicMethodsFlags = self::MAGIC_GET | self::MAGIC_SET,
@@ -216,7 +213,7 @@
             ];
 
             // handle stdClass with properties with a dot in the name
-            if ($objectOrArray instanceof \stdClass && str_contains($propertyPath, '.')  && property_exists($objectOrArray, $propertyPath)) {
+            if ($objectOrArray instanceof \stdClass && str_contains($propertyPath, '.') && property_exists($objectOrArray, $propertyPath)) {
                 $this->readProperty($zval, $propertyPath, $this->ignoreInvalidProperty);
             } else {
                 $this->readPropertiesUntil($zval, $propertyPath, $propertyPath->getLength(), $this->ignoreInvalidIndices);
@@ -677,7 +674,7 @@
 
         $mutatorForArray = $this->getWriteInfo($object::class, $property, []);
         if (PropertyWriteInfo::TYPE_PROPERTY === $mutatorForArray->getType()) {
-            return $mutatorForArray->getVisibility() === 'public';
+            return 'public' === $mutatorForArray->getVisibility();
         }
 
         if (PropertyWriteInfo::TYPE_NONE !== $mutatorForArray->getType()) {

0
Common Typos

0
License Headers

0
Pull Request Contributor Headers

0
JSON Files Syntax

0
File Permissions

0
Merge Commits

0
Exception Messages Formatting

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages