Skip to content

Commit cc6dd6c

Browse files
committed
Revert MongoId::isValid() and use L5.1
1 parent 4cdb4fb commit cc6dd6c

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jenssegers/mongodb",
3-
"description": "A MongoDB based Eloquent model and Query builder for Laravel 4",
3+
"description": "A MongoDB based Eloquent model and Query builder for Laravel",
44
"keywords": ["laravel","eloquent","mongodb","mongo","database","model"],
55
"homepage": "https://github.com/jenssegers/laravel-mongodb",
66
"authors": [
@@ -11,14 +11,14 @@
1111
],
1212
"license" : "MIT",
1313
"require": {
14-
"illuminate/support": "^5.1",
15-
"illuminate/container": "^5.1",
16-
"illuminate/database": "^5.1",
17-
"illuminate/events": "^5.1"
14+
"illuminate/support": "~5.1.0",
15+
"illuminate/container": "~5.1.0",
16+
"illuminate/database": "~5.1.0",
17+
"illuminate/events": "~5.1.0"
1818
},
1919
"require-dev": {
2020
"phpunit/phpunit": "^4.0|^5.0",
21-
"orchestra/testbench": "^3.1",
21+
"orchestra/testbench": "~3.1.0",
2222
"mockery/mockery": "^0.9",
2323
"satooshi/php-coveralls": "^0.6"
2424
},

src/Jenssegers/Mongodb/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ protected function performUpdate($query, array $options = [])
790790
*/
791791
public function convertKey($id)
792792
{
793-
if (MongoId::isValid($id))
793+
if (is_string($id) and strlen($id) === 24 and ctype_xdigit($id))
794794
{
795795
return new MongoId($id);
796796
}

test.php

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)