Clarification ServiceLocator vs. ServiceManager deprecated

Just a clarification: It is ServiceLocator that is going to be deprecated, not ServiceManager, is that correct?
So in my factory, this will still be ok (not an anti-pattern), right?

public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
    /** @var ServiceManager $sm */
    $sm = $container;  // let's call it what it is

    /** @var SomeModel $model */ 
    $model = $sm->get(SomeModel::class);
     
   return new MyModel($model);
}

Hello @dickdono,

do you have source about ServiceLocator depreciation? (Thank you).

Why not the simple way …

public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
   return new $requestedName($container->get(SomeModel::class));
}

The “service locator injection” was removed with version 3, which was implemented via Laminas\ServiceManager\ServiceLocatorAwareInterface.

This is the right way but a different design pattern: Factory method pattern - Wikipedia