-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Silent error when type class is not found #667
Comments
Restler requires one class per file so that the autoloader is able to fetch them properly Otherwise, you need to load the dependency manually. Can you try both the options and see if it fixes the issue? Let's see how we can alert the user when the class is not found |
Just using the full name space was enough - I included both classes in the
example just for.... The sake of example :)
It's not related to namespace autoloading, it's just the fact that it
doesn't consider the current class's namespace, as the IDE usually does
when doing autocompletion. Thus, it should either grab the class namespace
or, at least, give up with a graceful error instead of a silent failure.
…On Mon, Aug 23, 2021, 10:43 Arul ***@***.***> wrote:
Restler requires one class per file so that the autoloader is able to
fetch them properly
Otherwise, you need to load the dependency manually.
Can you try both the options and see if it fixes the issue?
Let's see how we can alert the user when the class is not found
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#667 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEB6S23IROKZFUYW6Y4KF3T6JF7BANCNFSM5CRE5YQQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Can you test this with Restler 6? namespace parsing is rewritten for that. if it detects the relative namespace correctly we can see how we can backport it to Restler 5 |
This was actually a bit confusing since there's no docs page for v6 and I had a hard time with Composer trying to install the v6 branch... I went with I see a couple of things changed in the way the Explorer interprets API params, since it doesn't show the list of fields of a type anymore? Anyhow, the same issue still persists in the master branch. In there, |
I guess this is missing an
else
block?Sample code:
What seems to happen: inside
ItemEdit
the namespace forPriceEdit
is valid (so the IDE won't complain), but since Restler is executing code outside of it, it can't find that class and silently fails. It would need to sniff the parent namespace to gather the correct namespace for the code shown on the linked section? I guess, if sniffing is "too much" to make it natural, the easiest would be to just yell at the dev and say the given class type seems invalid and might need to be a FQN?The text was updated successfully, but these errors were encountered: