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

Another update to Laravel-mongodb #153

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rmelet
Copy link

@rmelet rmelet commented May 14, 2024

Description

With this update we can use the latest laravel-mongodb, a MongoDB based Eloquent model and Query builder for Laravel (Moloquent)

Motivation and context

Previously this was not an official mongodb package. The package from Jenssegers was renamed to mongodb/laravel-mongodb because of a transfer of ownership to MongoDB, Inc.

If it fixes open issues #143 and #148

How has this been tested?

Run all Unit Tests to a local mongodb

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.

  • My pull request addresses exactly one patch/feature.
  • [x ] I have created a branch for this patch/feature.
  • [ x] Each individual commit in the pull request is meaningful.
  • I have added tests to cover my changes.
  • [x ] If my change requires a change to the documentation, I have updated it accordingly.

If you're unsure about any of these, don't hesitate to ask. We're here to help!

@rmelet
Copy link
Author

rmelet commented May 14, 2024

Locally I also could not run the tests because I had to run

pecl install mongodb

After updating the tests to use Monolog\Level instead of Monolog\Logger the tests run fine.
I think it also need to be installed in the scrutinizer image (docker?) but I am not familiar with it.
Could it have anything to do with php: pecl_extensions see: https://scrutinizer-ci.com/docs/configuration/build_reference

Please take a look at it.
Thank you very much.

@rmelet
Copy link
Author

rmelet commented May 14, 2024

I tried modifying the .scrutinizer.yml to add the mongodb extension.

Looks like it is working.

@ilejohn-official
Copy link

Please are you confident this PR branch can be used in a project now? @rmelet

@rmelet
Copy link
Author

rmelet commented May 24, 2024

Hi ilejohn-official,

I am going to try using it. The only things I changed are: the Update to laravel-mongodb 4.3, Using MongoDB\Laravel\Eloquent\Model instead of Jenssegers\Mongodb\Eloquent\Model, Using Monolog\Level instead of deprecated Monolog\Logger and one small change to make the tests run in the pull request.
Use it at your own risk.

@farmani
Copy link

farmani commented Oct 3, 2024

version 5 of mongodb laravel official package has been release and we need to upgrade to that version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants