1 | <?php |
||
2 | /** |
||
3 | * Twig Bundle Installer |
||
4 | * |
||
5 | * @link https://nystudio107.com/ |
||
6 | * @copyright Copyright (c) 2020 nystudio107 |
||
7 | */ |
||
8 | |||
9 | namespace nystudio107\composer; |
||
10 | |||
11 | use Composer\Composer; |
||
12 | use Composer\Installer\BinaryInstaller; |
||
13 | use Composer\Installer\LibraryInstaller as BaseLibraryInstaller; |
||
14 | |||
15 | use Composer\IO\IOInterface; |
||
16 | use Composer\Util\Filesystem; |
||
17 | |||
18 | /** |
||
19 | * Class Installer |
||
20 | * |
||
21 | * Installer is the Composer Installer that handles packages of the type: twig-bundle |
||
22 | * |
||
23 | * @author nystudio107 |
||
24 | * @package bundle-installer |
||
25 | * @since 1.0.0 |
||
26 | */ |
||
27 | class Installer extends BaseLibraryInstaller |
||
28 | { |
||
29 | // Constants |
||
30 | // ========================================================================= |
||
31 | |||
32 | const TEMPLATES_VENDOR_DIR = './templates/vendor'; |
||
33 | const TWIG_BUNDLE_PACKAGE_TYPE = 'twig-bundle'; |
||
34 | |||
35 | // Public Methods |
||
36 | // ========================================================================= |
||
37 | |||
38 | /** |
||
39 | * Initializes library installer. |
||
40 | * |
||
41 | * @param IOInterface $io |
||
0 ignored issues
–
show
|
|||
42 | * @param Composer $composer |
||
0 ignored issues
–
show
The type
Composer\Composer 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 ![]() |
|||
43 | * @param string $type |
||
44 | * @param Filesystem $filesystem |
||
0 ignored issues
–
show
The type
Composer\Util\Filesystem 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 ![]() |
|||
45 | * @param BinaryInstaller $binaryInstaller |
||
0 ignored issues
–
show
The type
Composer\Installer\BinaryInstaller 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 ![]() |
|||
46 | */ |
||
47 | public function __construct(IOInterface $io, Composer $composer, $type = self::TWIG_BUNDLE_PACKAGE_TYPE, Filesystem $filesystem = null, BinaryInstaller $binaryInstaller = null) |
||
48 | { |
||
49 | parent::__construct($io, $composer, $type, $filesystem, $binaryInstaller); |
||
50 | $this->vendorDir = rtrim(self::TEMPLATES_VENDOR_DIR, '/'); |
||
0 ignored issues
–
show
|
|||
51 | $this->type = self::TWIG_BUNDLE_PACKAGE_TYPE; |
||
0 ignored issues
–
show
|
|||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | public function supports($packageType) |
||
58 | { |
||
59 | return $packageType === self::TWIG_BUNDLE_PACKAGE_TYPE; |
||
60 | } |
||
61 | } |
||
62 |
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