Doctrine Website
  1. Doctrine Website
  2. DWEB-19

Description of autoloading models not updated for version 1.2

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Component/s: None
    • Labels:
      None

      Description

      In the section Introduction to Models/Autoloading Models it says that Doctrine_Core::autoload() will autoload the model. This isn't correct anymore in version 1.2. You have to use Doctrine_Core::modelsAutoload().

        Activity

        Hide
        Mike Reiche added a comment - - edited

        Same problem here! I lost hours of time and decided that must be a documentation bug.

        To answer my previous question by mysql: Just register a second autoloader.
        spl_autoload_register(array('Doctrine_Core', 'autoload'));
        spl_autoload_register(array('Doctrine_Core', 'modelsAutoload'));

        Show
        Mike Reiche added a comment - - edited Same problem here! I lost hours of time and decided that must be a documentation bug. To answer my previous question by mysql: Just register a second autoloader. spl_autoload_register(array('Doctrine_Core', 'autoload')); spl_autoload_register(array('Doctrine_Core', 'modelsAutoload'));
        Hide
        Ramin added a comment -

        On the same notes, I was following the tutorials on how to integrate with CodeIgniter and the defining models tutorial. In both cases, I would constantly get the following exception:

        PHP Fatal error: Class 'Base<MyClass>' ...

        The only way around was to add:

        spl_autoload_register(array('Doctrine', 'modelsAutoload'));

        Show
        Ramin added a comment - On the same notes, I was following the tutorials on how to integrate with CodeIgniter and the defining models tutorial. In both cases, I would constantly get the following exception: PHP Fatal error: Class 'Base<MyClass>' ... The only way around was to add: spl_autoload_register(array('Doctrine', 'modelsAutoload'));

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Manfred Nindl
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: