Issues (3641)

ServiceProvider/SubRequestServiceProvider.php (1 issue)

1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace Spryker\Zed\Application\Communication\Plugin\ServiceProvider;
9
10
use Silex\Application;
11
use Silex\ServiceProviderInterface;
12
use Spryker\Zed\Application\Business\Model\Request\SubRequestHandler;
13
use Spryker\Zed\Kernel\Communication\AbstractPlugin;
14
15
/**
16
 * @deprecated Use {@link \Spryker\Zed\Http\Communication\Plugin\Application\HttpApplicationPlugin} instead.
17
 *
18
 * @method \Spryker\Zed\Application\Business\ApplicationFacadeInterface getFacade()
19
 * @method \Spryker\Zed\Application\Communication\ApplicationCommunicationFactory getFactory()
20
 * @method \Spryker\Zed\Application\ApplicationConfig getConfig()
21
 */
22
class SubRequestServiceProvider extends AbstractPlugin implements ServiceProviderInterface
23
{
24
    /**
25
     * @param \Silex\Application $app
26
     *
27
     * @return void
28
     */
29
    public function register(Application $app)
30
    {
31
        $app['sub_request'] = $app->share(function () use ($app) {
32
            return new SubRequestHandler($app);
0 ignored issues
show
Deprecated Code introduced by
The class Spryker\Zed\Application\...quest\SubRequestHandler has been deprecated: Use {@link \Spryker\Zed\Http\Communication\SubRequest\SubRequestHandler} instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

32
            return /** @scrutinizer ignore-deprecated */ new SubRequestHandler($app);
Loading history...
33
        });
34
    }
35
36
    /**
37
     * @param \Silex\Application $app
38
     *
39
     * @return void
40
     */
41
    public function boot(Application $app)
42
    {
43
    }
44
}
45