Skip to content

Commit db517c0

Browse files
committed
🐛 Fix classmap retrieval for root package
1 parent b4a43d4 commit db517c0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- Interop\Container\ContainerInterface => Psr\Container\ContainerInterface
2+
13
Mouf 2: Dependency injection... on steroids
24
===========================================
35
[![Latest Unstable Version](https://poser.pugx.org/mouf/mouf/v/unstable.png)](https://packagist.org/packages/mouf/mouf) [![Total Downloads](https://poser.pugx.org/mouf/mouf/downloads.png)](https://packagist.org/packages/mouf/mouf) [![License](https://poser.pugx.org/mouf/mouf/license.png)](https://packagist.org/packages/mouf/mouf) [![Build Status](https://travis-ci.org/thecodingmachine/mouf.svg?branch=master)](https://travis-ci.org/thecodingmachine/mouf)

composer.phar

16.8 KB
Binary file not shown.

src/Mouf/Composer/ComposerService.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ public function __construct($selfEdit = false, $outputBufferedJs = false) {
5353
* Returns the classmap array.
5454
* This map associates the name of the classes and the PHP file they are declared in.
5555
*
56-
* @param string $mode Mode can be "NO_FILTER", "ROOT_PACKAGE" or "VENDOR"
56+
* @param string $mode Mode can have only those 3 values:
57+
* "ROOT_PACKAGE": only classes from the root package are returned
58+
* "VENDOR": only classes from (dev-)dependencies packages are returned
59+
* "NO_FILTER": all classes are returned
5760
* @return array<string, string>
5861
*/
5962
public function getClassMap($mode = 'NO_FILTER') {
@@ -209,7 +212,7 @@ public function getComposer() {
209212
} else {
210213
$this->io = new BufferIO();
211214
}
212-
$this->composer = Factory::create($this->io, ['vendor-dir' => __DIR__ . '/../../../vendor'], true);
215+
$this->composer = Factory::create($this->io, null, true);
213216
}
214217
return $this->composer;
215218
}

0 commit comments

Comments
 (0)