Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0-ALPHA2, 2.0-ALPHA3, 2.0-ALPHA4, 2.0-BETA1
    • Fix Version/s: 2.0-BETA2
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None
    • Environment:
      Mac, php 5.3.2, Postgresql 8.4

      Description

      There is just a minor bug on XmlDriver.

      The actual code is :

      Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      protected function _loadMappingFile($file)
          {
              $result = array();
              $xmlElement = simplexml_load_file($file);
      
              if (isset($xmlElement->entity)) {
                  foreach ($xmlElement->entity as $entityElement) {
                      $entityName = (string)$entityElement['name'];
                      $result[$entityName] = $entityElement;
                  }
              } else if (isset($xmlElement->{'mapped-superclass'})) {
                  foreach ($xmlElement->{'mapped-superclass'} as $mapperSuperClass) {
                      $className = (string)$mappedSuperClass['name'];
                      $result[$className] = $mappedSuperClass;
                  }
              }
      
              return $result;
          }
      

      The error is on the foreach section. The code should be :

      Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
      protected function _loadMappingFile($file)
          {
              $result = array();
              $xmlElement = simplexml_load_file($file);
      
              if (isset($xmlElement->entity)) {
                  foreach ($xmlElement->entity as $entityElement) {
                      $entityName = (string)$entityElement['name'];
                      $result[$entityName] = $entityElement;
                  }
              } else if (isset($xmlElement->{'mapped-superclass'})) {
                  foreach ($xmlElement->{'mapped-superclass'} as $mappedSuperClass) {
                      $className = (string)$mappedSuperClass['name'];
                      $result[$className] = $mappedSuperClass;
                  }
              }
      
              return $result;
          }
      

        Activity

        Hide
        Christian Heinrich added a comment -

        Fixed in http://github.com/Shurakai/doctrine2 and should be fixed in trunk soon.

        Show
        Christian Heinrich added a comment - Fixed in http://github.com/Shurakai/doctrine2 and should be fixed in trunk soon.

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Paul Fariello
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: