The docs suggest to use internal Autoloader::register() #6557

Closed
opened 2026-01-22 15:34:57 +01:00 by admin · 1 comment
Owner

Originally created by @BenMorel on GitHub (Oct 21, 2020).

The docs on autoloading proxies suggest to use:

<?php
use Doctrine\Common\Proxy\Autoloader;

$proxyDir = "/path/to/proxies";
$proxyNamespace = "MyProxies";

Autoloader::register($proxyDir, $proxyNamespace);

Even though the Autoloader class is @internal:

namespace Doctrine\Common\Proxy;

/**
 * @internal
 */
class Autoloader
{

Is this a documentation issue in the ORM? Is there an alternative to using this internal class?
Or shouldn't the class be internal at all?

Originally created by @BenMorel on GitHub (Oct 21, 2020). The [docs on autoloading proxies](https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/reference/advanced-configuration.html#autoloading-proxies) suggest to use: ```php <?php use Doctrine\Common\Proxy\Autoloader; $proxyDir = "/path/to/proxies"; $proxyNamespace = "MyProxies"; Autoloader::register($proxyDir, $proxyNamespace); ``` Even though the `Autoloader` class is `@internal`: ``` namespace Doctrine\Common\Proxy; /** * @internal */ class Autoloader { ``` Is this a documentation issue in the ORM? Is there an alternative to using this internal class? Or shouldn't the class be internal at all?
admin closed this issue 2026-01-22 15:34:57 +01:00
Author
Owner

@stof commented on GitHub (Oct 23, 2020):

I don't think the class should be internal. It is meant to be used this way

@stof commented on GitHub (Oct 23, 2020): I don't think the class should be internal. It is meant to be used this way
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6557