mirror of
https://github.com/danog/class-finder.git
synced 2024-11-30 04:29:03 +01:00
Add "Experimental" to the flag.
Hopefully people that don't need it won't use it.
This commit is contained in:
parent
999f912403
commit
baff32f2f5
@ -9,7 +9,7 @@ require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
use HaydenPierce\ClassFinder\ClassFinder;
|
||||
|
||||
ClassFinder::enableFilesSupport();
|
||||
ClassFinder::enableExperimentalFilesSupport();
|
||||
$classes = ClassFinder::getClassesInNamespace('Acme\Foo\Bar');
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
use HaydenPierce\ClassFinder\ClassFinder;
|
||||
|
||||
ClassFinder::enableFilesSupport();
|
||||
ClassFinder::enableExperimentalFilesSupport();
|
||||
$classes = ClassFinder::getClassesInNamespace('Acme\Foo\Bar');
|
||||
```
|
||||
|
||||
@ -31,7 +31,7 @@ that enabled it, you should remove it and see if you're part of the 99% that doe
|
||||
want to explicitly disable it:
|
||||
|
||||
```
|
||||
ClassFinder::disableFilesSupport();
|
||||
ClassFinder::disableExperimentalFilesSupport();
|
||||
$classes = ClassFinder::getClassesInNamespace('Acme\Foo\Bar');
|
||||
```
|
||||
|
||||
|
@ -81,12 +81,12 @@ class ClassFinder
|
||||
self::$config->setAppRoot($appRoot);
|
||||
}
|
||||
|
||||
public static function enableFilesSupport()
|
||||
public static function enableExperimentalFilesSupport()
|
||||
{
|
||||
self::$useFilesSupport = true;
|
||||
}
|
||||
|
||||
public static function disableFilesSupport()
|
||||
public static function disableExperimentalFilesSupport()
|
||||
{
|
||||
self::$useFilesSupport = false;
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace TestApp1\FilesClasses;
|
||||
|
||||
class OtherRedHerring {}
|
||||
|
@ -19,7 +19,7 @@ class FilesTest extends \PHPUnit_Framework_TestCase
|
||||
public function testClassFinder($namespace, $expected, $message)
|
||||
{
|
||||
try {
|
||||
ClassFinder::enableFilesSupport();
|
||||
ClassFinder::enableExperimentalFilesSupport();
|
||||
$classes = ClassFinder::getClassesInNamespace($namespace);
|
||||
} catch (\Exception $e) {
|
||||
$this->assertFalse(true, 'An exception occurred: ' . $e->getMessage());
|
||||
@ -61,7 +61,7 @@ class FilesTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFilesSupportRequiresEnabling()
|
||||
{
|
||||
ClassFinder::disableFilesSupport(); // Disabling FilesSupport should cause no files to be found.
|
||||
ClassFinder::disableExperimentalFilesSupport(); // Disabling FilesSupport should cause no files to be found.
|
||||
$classes = ClassFinder::getClassesInNamespace('TestApp1\FilesClasses');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user