[Db] Generated DialectClass referring to a raw PHP class won't be found #13867
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
In raising this pull request, I confirm the following (please check boxes):
Dialect Class outside of Zephir won't load because of missing CamelCase #12686 exists, but closed and messed up (indeed it was myself on another github account years ago)
Description
On Instantiating a Db-Instance, the DialectClass is generated by Zephir if not given as a property. The generated Class is always lowercase which does only work for internal zephir classes, but not for PHP-Classes for example the Oracle adapter given by the incubator.
This won't work...
... because the dialectClass Property is not given and phalcon tries to guess it on its own.
As zephir works case insensitive the generated class
phalcon\db\dialect\oracle
won't be found, because it's not inside Phalcon since 3.0, but available via incubator onlyResult
Fatal error: Class 'phalcon\db\dialect\oracle' not found in ....
Workaround
If the dialectClass is given as property, then it works
Closes
phalcon/incubator#663
More Info: phalcon/incubator#663 (comment)