Skip to content
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

Allowing ModelsManager get/setModelSource to be overrideable #13987

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-4.0.md
Expand Up @@ -20,6 +20,7 @@
- `Phalcon\Mvc\View\Simple::viewParams` is now always an array.
- `Phalcon\Mvc\View\Simple::render()` `params` property is now always an array.
- `Phalcon\Mvc\Model\CriteriaInterface::limit()` now takes `offset` as an integer. [#13977](https://github.com/phalcon/cphalcon/pull/13977)
- Changed `Phalcon\Mvc\Model\Manager::getModelSource()` to use `setModelSource()` internally instead of setting the source manually [#13987](https://github.com/phalcon/cphalcon/pull/13987)

## Fixed
- Fixed `Mvc\Collection::isInitialized()` now works as intended. [#13931](https://github.com/phalcon/cphalcon/pull/13931)
Expand Down
2 changes: 1 addition & 1 deletion phalcon/Mvc/Model/Manager.zep
Expand Up @@ -390,7 +390,7 @@ class Manager implements ManagerInterface, InjectionAwareInterface, EventsAwareI
let entityName = get_class_lower(model);

if !isset this->sources[entityName] {
let this->sources[entityName] = uncamelize(get_class_ns(model));
this->setModelSource(model, uncamelize(get_class_ns(model)));
}

return this->prefix . this->sources[entityName];
Expand Down