-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Printing empty namespace #147
Comments
I just updated from 4.0.5 to 4.1.2 and couldn't find any reference to this new "feature" in the release notes. /shrug |
This isn't a new feature, it's how it's worked since the beginning. |
This works in 4.0.5 without the leading slashes, but fails catastrophically in 4.1.2 $cNamespace = new PhpNamespace('GCWorld\\ORM\\Generated');
$cClass = new ClassType('ExampleClass', $cNamespace);
$cNamespace->addUse('GCWorld\\ORM\\Abstracts\\DirectSingle', 'dbc');
$cNamespace->addUse('GCWorld\\ORM\\Interfaces\\GeneratedInterafce','dbi');
$cClass->setExtends('dbc');
$cClass->addImplement('dbi');
$cPrinter = new PsrPrinter();
$contents = '<?php'.PHP_EOL;
$contents .= $cPrinter->printNamespace($cNamespace);
$contents .= $cPrinter->printClass($cClass);
// Write contents to file Seems there was a backwards incompatible change somewhere in there. |
Well, that's a different code. I'll fix the behavior, for now you can use |
Version: 4.1.2
Bug Description
Implementing interfaces by alias results in those aliases being addressed as root.
Steps To Reproduce
results in
Expected Behavior
The backslashes in extends and implements shouldn't exist.
Possible Solution
The text was updated successfully, but these errors were encountered: