Fatal error Attempted to load class "MongoClient" from the global namespace
cimo23 opened this issue · comments
bug occur when we use the configuration without Id Service
class MongoClient not compatible with new PHP mongo class 'MongoDB\Client'
monolog:
handlers:
main:
type: mongo
mongo:
host: '127.0.0.1'
port: 27017
user: root
pass: '123456'
database: logsDb
collection: logsCollection
This seems to be incompatible with the newer mongodb extension, but I don't think changing the class name in the definition is enough to make it work. Unfortunately, I currently don't have a project I can try this on. Would you like to work on a PR for this?
I don't Understande work on PR
but i have make the test and changing the definition resolve the bug
If you have made the change and it solves the issue, than you are pretty much done with the pull request.
Github has a documentation on how create pull requests: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
I find it a bit hard to understand, so here is the short version according to me:
- Fork the symfony/monolog-bundle repository
You should have a repository called cimo23/monolog-bundle afterwards, that is basically a copy of the original - Clone your fork (cimo23/monolog-bundle)
- Switch into a new branch (e.g.
git switch -c issue_420_fix
) - Copy your changes into this repository, commit and push them
- In Github when you go to symfony/monolog-bundle you should see a notification, that you have a branch from which you can create a pull request
- Fill out the form and click the green button. That's it!
Afterwards people will review your PR and let you know if you need to make some more adjustments and once everything is ready one of the contributors will merge the pull request.