Skip to content

Class defaultTokenProvider does not exist - #11649

Closed
JaroSu wants to merge 3 commits into
nextcloud:masterfrom
JaroSu:master
Closed

Class defaultTokenProvider does not exist#11649
JaroSu wants to merge 3 commits into
nextcloud:masterfrom
JaroSu:master

Conversation

@JaroSu

Copy link
Copy Markdown

Fix for:
PHP Fatal error: Uncaught OCP\AppFramework\QueryException: Could not resolve defaultTokenProvider! Class defaultTokenProvider does not exist

Fix for:
PHP Fatal error: Uncaught OCP\AppFramework\QueryException: Could not resolve defaultTokenProvider! Class defaultTokenProvider does not exist
@JaroSuJaroSu changed the title Update SimpleContainer.phpClass defaultTokenProvider does not existOct 6, 2018
@kesselb

kesselb commented Oct 6, 2018

Copy link
Copy Markdown
Contributor

Thank you for your contribution 👍 Here are some people reporting the same problem #11225 (but most of them had issues with their database connection). With the latest version (nc13/nc14) there should be a better error message (#11316). I'm just wondering but does your nextcloud still works when you apply these changes? 🤔

@JaroSu

Copy link
Copy Markdown
Author

It's work perfect.

@kesselb

kesselb commented Oct 6, 2018

Copy link
Copy Markdown
Contributor

Do you have any idea why the test suite is failing? https://drone.nextcloud.com/nextcloud/server/11166 Can you still reproduce the issue (when you revert your pr?). Maybe #11316 would help to find the reason for this error.

@JaroSu

Copy link
Copy Markdown
Author

I think it will fix all errors with defaultTokenProvider, which starts with a lowercase letter. This is name of property. Class name (type) is DefaultTokenProvider. Class defaultTokenProvider does not exist and it's true.
I no idea why tests fails.

@kesselb

Copy link
Copy Markdown
Contributor

Test-Suite works for me when getType() => getType()->getName(). Is error fixed for you with this as well?

@kesselbkesselb added the 3. to review Waiting for reviews label Oct 7, 2018
@kesselbkesselb added this to the Nextcloud 15 milestone Oct 7, 2018
@kesselbkesselb added the bug label Oct 7, 2018
@JaroSu

Copy link
Copy Markdown
Author

Yes.
This should by getType()->getName() or getType()->__toString(). reflectiontype
My mistake.

Maybe ReflectionNamedType not ReflectionType
@ChristophWurst

Copy link
Copy Markdown
Member

Class name (type) is DefaultTokenProvider

As far as I can tell, it's either queried with lower case (constructor parameter name) or its fully-qualified class name which is prefixed by the namespace.

@rullzer

Copy link
Copy Markdown
Member

Could I ask you to open an issue with what you are trying to fix here.
The code is actually doing what is should. If the DI is not working that is then probably because something is not injected at the right place.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@JaroSu@kesselb@ChristophWurst@rullzer@nickvergessen