Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility with service-manager>=2.7.5 and fixed css #10

Closed
wants to merge 2 commits into from
Closed

compatibility with service-manager>=2.7.5 and fixed css #10

wants to merge 2 commits into from

Conversation

bupy7
Copy link
Contributor

@bupy7 bupy7 commented Jul 13, 2016

No description provided.

@bupy7 bupy7 changed the title compatibility with service-manager>=2.7.5 compatibility with service-manager>=2.7.5 and fixed css Jul 13, 2016
@snapshotpl
Copy link
Owner

Why we need to inject locator into this controller?

@bupy7
Copy link
Contributor Author

bupy7 commented Jul 14, 2016

Someone would like to use some plugins that uses ServiceLocator of controller. After version the service-manager 2.7.5 it is impossible:

// Zend\Mvc\Controller\AbstractController.php

/**
 * Set serviceManager instance
 *
 * @param ServiceLocatorInterface $serviceLocator
 * @return void
 */
public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
{
    $this->serviceLocator = $serviceLocator;
}

/**
 * Retrieve serviceManager instance
 *
 * @return ServiceLocatorInterface
 */
public function getServiceLocator()
{
    trigger_error(sprintf(
        'You are retrieving the service locator from within the class %s. Please be aware that '
        . 'ServiceLocatorAwareInterface is deprecated and will be removed in version 3.0, along '
        . 'with the ServiceLocatorAwareInitializer. You will need to update your class to accept '
        . 'all dependencies at creation, either via constructor arguments or setters, and use '
        . 'a factory to perform the injections.',
        get_class($this)
    ), E_USER_DEPRECATED);

    return $this->serviceLocator;
}

@snapshotpl
Copy link
Owner

But this controller doesn't use any plugin.

@bupy7
Copy link
Contributor Author

bupy7 commented Jul 14, 2016

I mean global plugins for all controllers. Earlier it was possible.

@snapshotpl snapshotpl closed this Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants