1 | <?php |
||
2 | |||
3 | namespace DnViewSnapshots; |
||
4 | |||
5 | use Shopware\Components\Plugin; |
||
0 ignored issues
–
show
|
|||
6 | use Shopware\Components\Plugin\Context\UninstallContext; |
||
0 ignored issues
–
show
The type
Shopware\Components\Plug...ontext\UninstallContext was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
7 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
0 ignored issues
–
show
The type
Symfony\Component\Depend...ection\ContainerBuilder was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
8 | use Shopware\Components\Plugin\Context\ActivateContext; |
||
0 ignored issues
–
show
The type
Shopware\Components\Plugin\Context\ActivateContext was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
9 | use Shopware\Components\Plugin\Context\InstallContext; |
||
0 ignored issues
–
show
The type
Shopware\Components\Plugin\Context\InstallContext was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
10 | use Shopware\Components\Plugin\Context\UpdateContext; |
||
0 ignored issues
–
show
The type
Shopware\Components\Plugin\Context\UpdateContext was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
11 | |||
12 | /** |
||
13 | * Class DnViewSnapshots |
||
14 | * @package DnViewSnapshots |
||
15 | */ |
||
16 | class DnViewSnapshots extends Plugin |
||
17 | { |
||
18 | /** |
||
19 | * @param ContainerBuilder $container |
||
20 | */ |
||
21 | public function build(ContainerBuilder $container) |
||
22 | { |
||
23 | $container->setParameter('dn_view_snapshots.plugin_dir', $this->getPath()); |
||
24 | |||
25 | parent::build($container); |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @param InstallContext $context |
||
30 | */ |
||
31 | public function install(InstallContext $context) |
||
32 | { |
||
33 | $sql = file_get_contents($this->getPath() . '/Resources/sql/install.sql'); |
||
34 | |||
35 | $this->container->get('dbal_connection')->query($sql); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @param ActivateContext $context |
||
40 | */ |
||
41 | public function activate(ActivateContext $context) |
||
42 | { |
||
43 | $context->scheduleClearCache(InstallContext::CACHE_LIST_ALL); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @param UpdateContext $context |
||
48 | */ |
||
49 | public function update(UpdateContext $context) |
||
50 | { |
||
51 | $context->scheduleClearCache(InstallContext::CACHE_LIST_ALL); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @param UninstallContext $context |
||
56 | */ |
||
57 | public function uninstall(UninstallContext $context) |
||
58 | { |
||
59 | $sql = file_get_contents($this->getPath() . '/Resources/sql/uninstall.sql'); |
||
60 | |||
61 | $this->container->get('dbal_connection')->query($sql); |
||
62 | } |
||
63 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths