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
composer autoloader bug #81
Comments
I need to test with composer, if I am honest I have never used it (haven't found the time yet :) however, shouldn't the configuration in the main.php handle the psr-0 for getting the mongodb component? |
yes, we can write something like 'import' => array(
'vendor.sammaye.mongoyii.EMongoClient',
), and it will be work, but |
What do you mean by OOP schema? The problem with changing this part is that the |
maybe use namesapces? |
The only problem with doing that is that it currently breaks everyones autoloading, such tactics would only work for people using composer, anyone else would have to completely rewrite their autoloading patterns around: http://www.yiiframework.com/doc/guide/1.1/en/extension.integration Namespaces are not that well supported in Yii1 and I am trying to leave them off to Yii2 for that reason |
ok. so, we will be wait for Yii-2 :) |
Indeed :) it is definitely there for Yii2, got a lot of good plans for Yii2 when they get out of public preview. To be honest I was thinking of trying to get a least the core of MongoYii placed in the core of Yii 2, I see they will be supporting NoSQL databases as standard now so if I rush in with something I might get it into the core. But anyway I am gonna close this task for the moment if that's ok? |
it would be wonderful if your extension would be included in the core Yii2 |
I think there's no need to use autoload from composer to use MongoYii extension. Just use This is part from my {
"require": {
"composer/installers": "~1.0",
"yiisoft/yii": "1.1.13",
"sammaye/mongoyii": "1.2.9"
},
"extra": {
"installer-paths": {
"protected/extensions/{$name}": ["sammaye/mongoyii"]
}
}
} I have Yii installed in standard vendor dir. If you're using only extensions through Composer, solution can be set {
"config": {
"vendor-dir": "protected/extensions"
}
} |
I am gonna add that to the docs :) |
Oh, wait, this is not true with next version ( So solution can be:
Sorry for misunderstanding. |
Ah yes, the Yii installer has been deprecated (http://www.yiiframework.com/wiki/473/how-to-use-the-official-yii-installer-for-composer-deprecated/); I was going to ask that but it seemed like that would work regardless for a min. I will amend it after I have finished proof reading |
Updated the documentation to reflect that, I will update all doc sources now |
if we use composer autoloader we have an error "include(EMongoClient.php): failed to open stream: No such file or directory". we have this errors beacause at EMongoModel on string 505 we have strange place:
I think we need to rewrite this place to avoid problem with psr-0
The text was updated successfully, but these errors were encountered: