website/errors/parameter.internalClass.md
<?php declare(strict_types = 1);
namespace Vendor {
/** @internal */
class InternalType {}
}
namespace App {
function process(\Vendor\InternalType $param): void {}
}
A function or method parameter uses a class marked with the @internal tag from another namespace as its type declaration. Internal classes are implementation details of the library and are not part of its public API. They may change or be removed in future versions without notice. Using an internal class as a parameter type creates a dependency on an unstable API.
Replace the internal class with a public API type, such as an interface or a non-internal class:
namespace App {
- function process(\Vendor\InternalType $param): void {}
+ function process(\Vendor\PublicType $param): void {}
}