Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2145

[GH-514] Improved exception when a type hint class can not be found

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      This issue is created automatically through a Github pull request on behalf of arnaud-lb:

      Url: https://github.com/doctrine/doctrine2/pull/514

      Message:

      This improves the exception message when a type hint class was not found during the generation of a proxy.

      Example:

      ``` php
      <?php
      class Foo
      {
      function test(\InvalidClass $param)
      {
      }
      }
      ```

      When generating a proxy for this class `Foo`, if the type hint class `InvalidClass` cannot be found, a `ReflectionException` exception is thrown with the following message: `Class InvalidClass does not exist`. There is no hint on the real cause of the error (which class, method, ...).

      This PR wraps this exception with a message making the cause of the exception more obvious.

        Activity

        Benjamin Eberlei created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Duplicate [ 3 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: