I'm having a problem in my project, and I'm not sure if it is because something I did or not. I used Phalcon\Loader to register a namespace - App.
$loader = new \Phalcon\Loader(); $namespaces = array() ; $namespaces["App"] = realpath(__DIR__ ."/../App/") ; $loader->registerNamespaces( $namespaces ) ; $loader->register();
Aftewards, i created classes under this namespace (following PSR-4 standards). For example :
- Class1. php (class Class1 with namespace App\Test1)
- Class1.php (class Class1 with namespace App\Test2)
It all works really nicely, but if I happen to use a namespace containing the registered one - for example:
- Class2.php (class Class2 with namespace App\TestingApp)
I get a fatal error of class not found. The loader doesn't seem to find the Class2 class when I use the fully qualified name (App\TestingApp\Class2).
Did someone else came across this type of problem?