Browse Source

Merge branch 'hotfix/post_release_fixes'

Olivier Massot 2 years ago
parent
commit
46f7f9528c
3 changed files with 5 additions and 50 deletions
  1. 0 45
      composer.json
  2. 0 0
      src/ApiResource/.gitignore
  3. 5 5
      src/State/Provider/Enum/EnumProvider.php

+ 0 - 45
composer.json

@@ -110,51 +110,6 @@
     "psr-4": {
       "App\\": "src/"
     },
-    "classmap": [
-      "vendor/opentalent/phpdocx/Classes/Phpdocx/Create/CreateDocx.php",
-      "vendor/opentalent/phpdocx/Classes/Phpdocx/Create/CreateDocxFromTemplate.php"
-    ],
-    "autoload-dev": {
-        "psr-4": {
-            "DataFixtures\\": "tests/Fixture",
-            "App\\Tests\\": "tests/"
-        }
-    },
-    "replace": {
-        "paragonie/random_compat": "2.*",
-        "symfony/polyfill-ctype": "*",
-        "symfony/polyfill-iconv": "*",
-        "symfony/polyfill-php72": "*",
-        "symfony/polyfill-php71": "*",
-        "symfony/polyfill-php70": "*",
-        "symfony/polyfill-php56": "*"
-    },
-    "scripts": {
-        "auto-scripts": {
-            "cache:clear": "symfony-cmd",
-            "assets:install %PUBLIC_DIR%": "symfony-cmd"
-        },
-        "post-install-cmd": [
-            "@auto-scripts"
-        ],
-        "post-update-cmd": [
-            "@auto-scripts"
-        ]
-    },
-    "conflict": {
-        "symfony/symfony": "*"
-    },
-    "extra": {
-        "symfony": {
-            "allow-contrib": false,
-            "require": "6.3.*"
-        },
-        "phpstan": {
-            "includes": [
-                "extension.neon"
-            ]
-        }
-    },
     "classmap": [
       "vendor/opentalent/phpdocx/Classes/Phpdocx/Create/CreateDocx.php",
       "vendor/opentalent/phpdocx/Classes/Phpdocx/Create/CreateDocxFromTemplate.php"

+ 0 - 0
src/ApiResource/.gitignore


+ 5 - 5
src/State/Provider/Enum/EnumProvider.php

@@ -38,12 +38,12 @@ final class EnumProvider implements ProviderInterface
             throw new RuntimeException('not supported', 500);
         }
 
-        $id = $uriVariables['id'];
+        $name = $uriVariables['name'];
         $enums = $this->parameterBag->get('opentalent.enum');
-        $enumClass = $enums['opentalent'][$id];
+        $enumClass = $enums[$name];
 
         if(!$enumClass) {
-            throw new NotFoundHttpException(sprintf('Enum %s does\'nt exist', $id));
+            throw new NotFoundHttpException(sprintf('Enum %s does\'nt exist', $name));
         }
 
         try{
@@ -52,11 +52,11 @@ final class EnumProvider implements ProviderInterface
                 'toArray'
             );
         }catch (Exception){
-            throw new NotFoundHttpException(sprintf('Enum %s does\'nt exist', $id));
+            throw new NotFoundHttpException(sprintf('Enum %s does\'nt exist', $name));
         }
 
         $enumResponse = new Enum();
-        $enumResponse->setName($id);
+        $enumResponse->setName($name);
         $enumResponse->setItems($items);
         return $enumResponse;
     }