1 | <?php |
||
20 | final class VersionsCheck |
||
21 | { |
||
22 | /** |
||
23 | * @var OutdatedPackage[] |
||
24 | */ |
||
25 | private $outdatedPackages = array(); |
||
26 | |||
27 | /** |
||
28 | * @var VersionConstraint|null |
||
29 | */ |
||
30 | private $oldComparator = null; |
||
31 | |||
32 | /** |
||
33 | * @param ArrayRepository $distRepository |
||
34 | * @param WritableRepositoryInterface $localRepository |
||
35 | * @param RootPackageInterface $rootPackage |
||
36 | */ |
||
37 | public function checkPackages(ArrayRepository $distRepository, WritableRepositoryInterface $localRepository, RootPackageInterface $rootPackage) |
||
71 | |||
72 | /** |
||
73 | * @param bool $showDepends |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | public function getOutput($showDepends = true) |
||
89 | |||
90 | /** |
||
91 | * Version comparator bridge to handle BC with old composer versions. |
||
92 | * |
||
93 | * This method is public only for PHP 5.3 BC and SHOULD NOT be used. |
||
94 | * Deprecate it and remove it on next major when PHP 5.3 support will be droped. |
||
95 | * |
||
96 | * @param string $version1 |
||
97 | * @param string $operator |
||
98 | * @param string $version2 |
||
99 | * |
||
100 | * @return bool |
||
101 | */ |
||
102 | public function versionCompare($version1, $operator, $version2) |
||
112 | |||
113 | /** |
||
114 | * @param WritableRepositoryInterface $localRepository |
||
115 | * @param PackageInterface $needle |
||
116 | * |
||
117 | * @return Link[] |
||
118 | */ |
||
119 | private function getPackageDepends(WritableRepositoryInterface $localRepository, PackageInterface $needle) |
||
120 | { |
||
121 | $depends = array(); |
||
122 | |||
123 | foreach ($localRepository->getPackages() as $package) { |
||
124 | // Skip root package |
||
125 | if ($package instanceof RootPackageInterface) { |
||
126 | continue; |
||
127 | } |
||
128 | |||
129 | foreach ($package->getRequires() as $link) { |
||
130 | if ($link->getTarget() === $needle->getName() && !in_array($link, $depends, true)) { |
||
131 | $depends[] = $link; |
||
132 | } |
||
133 | } |
||
134 | } |
||
135 | |||
136 | return $depends; |
||
137 | } |
||
138 | |||
139 | /** |
||
140 | * @param array $output |
||
141 | * @param bool $showDepends |
||
142 | */ |
||
143 | private function createNotUpToDateOutput(array &$output, $showDepends = true) |
||
174 | } |
||
175 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.