Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
laravel-mongodb
Commits
84b8b706
Commit
84b8b706
authored
Feb 18, 2017
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compatiblity with 5.3
parent
5ba231a1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
2 deletions
+47
-2
README.md
README.md
+2
-1
phpunit.xml.dist
phpunit.xml.dist
+1
-1
MongoQueue.php
src/Jenssegers/Mongodb/Queue/MongoQueue.php
+24
-0
HasMany.php
src/Jenssegers/Mongodb/Relations/HasMany.php
+10
-0
HasOne.php
src/Jenssegers/Mongodb/Relations/HasOne.php
+10
-0
No files found.
README.md
View file @
84b8b706
...
@@ -39,7 +39,8 @@ composer require jenssegers/mongodb
...
@@ -39,7 +39,8 @@ composer require jenssegers/mongodb
5.
0.x | 2.1.x
5.
0.x | 2.1.x
5.
1.x | 2.2.x or 3.0.x
5.
1.x | 2.2.x or 3.0.x
5.
2.x | 2.3.x or 3.0.x
5.
2.x | 2.3.x or 3.0.x
5.
3.x | 3.1.x
5.
3.x | 3.1.x or 3.2.x
5.
4.x | 3.2.x
And add the service provider in
`config/app.php`
:
And add the service provider in
`config/app.php`
:
...
...
phpunit.xml.dist
View file @
84b8b706
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
convertNoticesToExceptions=
"true"
convertNoticesToExceptions=
"true"
convertWarningsToExceptions=
"true"
convertWarningsToExceptions=
"true"
processIsolation=
"false"
processIsolation=
"false"
stopOnFailure=
"
tru
e"
stopOnFailure=
"
fals
e"
syntaxCheck=
"false"
syntaxCheck=
"false"
verbose=
"true"
verbose=
"true"
>
>
...
...
src/Jenssegers/Mongodb/Queue/MongoQueue.php
View file @
84b8b706
...
@@ -2,10 +2,34 @@
...
@@ -2,10 +2,34 @@
use
Carbon\Carbon
;
use
Carbon\Carbon
;
use
Illuminate\Queue\DatabaseQueue
;
use
Illuminate\Queue\DatabaseQueue
;
use
Jenssegers\Mongodb\Connection
;
use
MongoDB\Operation\FindOneAndUpdate
;
use
MongoDB\Operation\FindOneAndUpdate
;
class
MongoQueue
extends
DatabaseQueue
class
MongoQueue
extends
DatabaseQueue
{
{
/**
* The expiration time of a job.
*
* @var int|null
*/
protected
$retryAfter
=
60
;
/**
* The connection name for the queue.
*
* @var string
*/
protected
$connectionName
;
/**
* @inheritdoc
*/
public
function
__construct
(
Connection
$database
,
$table
,
$default
=
'default'
,
$retryAfter
=
60
)
{
parent
::
__construct
(
$database
,
$table
,
$default
,
$retryAfter
);
$this
->
retryAfter
=
$retryAfter
;
}
/**
/**
* @inheritdoc
* @inheritdoc
*/
*/
...
...
src/Jenssegers/Mongodb/Relations/HasMany.php
View file @
84b8b706
...
@@ -15,6 +15,16 @@ class HasMany extends EloquentHasMany
...
@@ -15,6 +15,16 @@ class HasMany extends EloquentHasMany
return
$this
->
foreignKey
;
return
$this
->
foreignKey
;
}
}
/**
* Get the plain foreign key.
*
* @return string
*/
public
function
getPlainForeignKey
()
{
return
$this
->
getForeignKeyName
();
}
/**
/**
* Get the key for comparing against the parent key in "has" query.
* Get the key for comparing against the parent key in "has" query.
*
*
...
...
src/Jenssegers/Mongodb/Relations/HasOne.php
View file @
84b8b706
...
@@ -25,6 +25,16 @@ class HasOne extends EloquentHasOne
...
@@ -25,6 +25,16 @@ class HasOne extends EloquentHasOne
return
$this
->
getForeignKeyName
();
return
$this
->
getForeignKeyName
();
}
}
/**
* Get the plain foreign key.
*
* @return string
*/
public
function
getPlainForeignKey
()
{
return
$this
->
getForeignKeyName
();
}
/**
/**
* @inheritdoc
* @inheritdoc
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment