1 | <?php namespace Arcanedev\Composer\Entities\PackageTraits; |
||
13 | trait DevTrait |
||
14 | { |
||
15 | /* ------------------------------------------------------------------------------------------------ |
||
16 | | Properties |
||
17 | | ------------------------------------------------------------------------------------------------ |
||
18 | */ |
||
19 | /** @var \Composer\Package\CompletePackage $package */ |
||
20 | protected $package; |
||
21 | |||
22 | /** @var string $path */ |
||
23 | protected $path; |
||
24 | |||
25 | /* ------------------------------------------------------------------------------------------------ |
||
26 | | Main Functions |
||
27 | | ------------------------------------------------------------------------------------------------ |
||
28 | */ |
||
29 | /** |
||
30 | * Merge just the dev portion into a RootPackageInterface. |
||
31 | * |
||
32 | * @param \Composer\Package\RootPackageInterface $root |
||
33 | * @param \Arcanedev\Composer\Entities\PluginState $state |
||
34 | */ |
||
35 | public function mergeDevInto(RootPackageInterface $root, PluginState $state) |
||
41 | |||
42 | /** |
||
43 | * Merge require-dev into RootPackage. |
||
44 | * |
||
45 | * @param \Composer\Package\RootPackageInterface $root |
||
46 | * @param \Arcanedev\Composer\Entities\PluginState $state |
||
47 | */ |
||
48 | abstract protected function mergeDevRequires(RootPackageInterface $root, PluginState $state); |
||
49 | |||
50 | /** |
||
51 | * Merge autoload-dev into a RootPackage. |
||
52 | * |
||
53 | * @param \Composer\Package\RootPackageInterface $root |
||
54 | */ |
||
55 | private function mergeDevAutoload(RootPackageInterface $root) |
||
64 | |||
65 | /** |
||
66 | * Update the root packages reference information. |
||
67 | * |
||
68 | * @param \Composer\Package\RootPackageInterface $root |
||
69 | */ |
||
70 | abstract protected function mergeReferences(RootPackageInterface $root); |
||
71 | |||
72 | /** |
||
73 | * Get a full featured Package from a RootPackageInterface. |
||
74 | * |
||
75 | * @param \Composer\Package\RootPackageInterface|\Composer\Package\RootPackage $root |
||
76 | * @param string $method |
||
77 | * |
||
78 | * @return \Composer\Package\RootPackageInterface|\Composer\Package\RootPackage |
||
79 | */ |
||
80 | abstract protected function unwrapIfNeeded( |
||
83 | } |
||
84 |