Skip to content

Commit

Permalink
Drop case sensitve name checking because it breaks class_alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Vektah committed Jul 1, 2015
1 parent 10aa5f5 commit d3b9fa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/main/bugfree/AutoloaderResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ public function __construct(Config $config)
$this->config = $config;
}

private function classExistsCaseSensitive($class)
{
if ($class[0] == '\\') {
$class = substr($class, 1);
}
return class_exists($class) && in_array($class, get_declared_classes());
}

/**
* Determines if a given string can resolve correctly.
*
Expand All @@ -36,7 +28,7 @@ private function classExistsCaseSensitive($class)
public function isValid($name)
{
$name = implode('\\', array_filter(explode('\\', $name), 'strlen'));
if ($this->classExistsCaseSensitive($name) || interface_exists($name) || trait_exists($name)) {
if (class_exists($name) || interface_exists($name) || trait_exists($name)) {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/bugfree/Bugfree.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
class Bugfree
{
const VERSION = '0.3.9';
const VERSION = '0.4.1';

/** @var Resolver */
private $resolver;
Expand Down

0 comments on commit d3b9fa2

Please sign in to comment.