-
Notifications
You must be signed in to change notification settings - Fork 79
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
Bug: Extended Namespaces are preventing files from importing #231
Comments
Without an opinion on this issue: |
Then I cant use the namespace as it is outside my plugin. Anyway either line stops importing the file.
|
Note: still off-topic.
I honestly don't know what you mean. Sounds more like an autoloading issue. |
Anyway back on topic. If the class is like this then it imports fine. <?php
namespace MainNamespace;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Cart Cache for Cart REST API.
*
* This handles the cart data in cache before the totals are calculated.
*
* @since 3.1.0
*/
class ClassName { But if I have a class like so then it is not importing. <?php
namespace MainNamespace\SecondName;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Cart Cache for Cart REST API.
*
* This handles the cart data in cache before the totals are calculated.
*
* @since 3.1.0
*/
class ClassName { Any clue why? |
So after spending some more time on why it's not importing certain files in my plugin. I found out that it doesn't like any lines or even parameters in a function that are using a backslash. I believe I have narrowed it down to the dependency your using called Reflection which is what parses the contents of the files being imported. This parser plugin is currently using v3.0 Perhaps we could have it updated? If a new issue with examples is required please let me know. |
It's essentially #228 - basically all issues that pop up here now are bc of the ancient Reflection version used here. |
I'm not able to get any file that uses Namespaces extensively. A single Namespace is acceptable but longer Namespaces are ignored.
Any chance of getting this fixed or know of a workaround?
Example of a class using Namespaces that are ignored.
The text was updated successfully, but these errors were encountered: