Hi,
I have recently added phalcon via cpanel's EasyApache, and am working my way through the tutorials on the website.
Unfortunately I am having an issue with the very first tutorial (https://docs.phalcon.io/en/latest/reference/tutorial.html).
When I add
echo $this->tag->linkTo("signup", "Sign Up Here!");
to my index/index.phtml file I get an error relating to the Url class, rather than the expected signup link.
[02-May-2015 16:59:54 UTC] PHP Fatal error: Class 'Url' not found in /{path_to}/tutorial1/public/index.php on line 30
If I remove the tag from the phtml, then the error does not occur (suggesting the script autoloaded the Url class ok).
However, if I edit the index.php file, and use the full qualified path to the Url class (or the alternative defined when loading up the namespaces), then the error does not occur, and the tag also loads correctly.
e.g.
$url = new Phalcon\Mvc\Url();
or
$url = new UrlProvider();
instead of
$url = new Url();
This would suggest that when the Tag class is autoloaded, it is breaking the ability for the script to load the Url class. I assume this is why the namespace was modified in the first place??
The script also works if the "as UrlProvider" is removed from the use statement.
Is this just an error in the tutorial?