DDC-2145: [GH-514] Improved exception when a type hint class can not be found #2699

Closed
opened 2026-01-22 14:00:54 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 14, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

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
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.

Originally created by @doctrinebot on GitHub (Nov 14, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: 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.
admin added the Bug label 2026-01-22 14:00:54 +01:00
admin closed this issue 2026-01-22 14:00:55 +01:00
Author
Owner

@doctrinebot commented on GitHub (Nov 14, 2012):

Comment created by @beberlei:

A related Github Pull-Request [GH-514] was closed
https://github.com/doctrine/doctrine2/pull/514

@doctrinebot commented on GitHub (Nov 14, 2012): Comment created by @beberlei: A related Github Pull-Request [GH-514] was closed https://github.com/doctrine/doctrine2/pull/514
Author
Owner

@doctrinebot commented on GitHub (Nov 25, 2012):

Comment created by @beberlei:

Duplicate of DDC-2064

@doctrinebot commented on GitHub (Nov 25, 2012): Comment created by @beberlei: Duplicate of [DDC-2064](http://www.doctrine-project.org/jira/browse/DDC-2064)
Author
Owner

@doctrinebot commented on GitHub (Nov 25, 2012):

Issue was closed with resolution "Duplicate"

@doctrinebot commented on GitHub (Nov 25, 2012): Issue was closed with resolution "Duplicate"
Author
Owner

@doctrinebot commented on GitHub (Feb 8, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-514] was closed:
https://github.com/doctrine/dbal/pull/514

@doctrinebot commented on GitHub (Feb 8, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-514] was closed: https://github.com/doctrine/dbal/pull/514
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2699