Skip to content

Commit

Permalink
Revert MongoId::isValid() and use L5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Feb 4, 2016
1 parent 4cdb4fb commit cc6dd6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions composer.json
@@ -1,6 +1,6 @@
{
"name": "jenssegers/mongodb",
"description": "A MongoDB based Eloquent model and Query builder for Laravel 4",
"description": "A MongoDB based Eloquent model and Query builder for Laravel",
"keywords": ["laravel","eloquent","mongodb","mongo","database","model"],
"homepage": "https://github.com/jenssegers/laravel-mongodb",
"authors": [
Expand All @@ -11,14 +11,14 @@
],
"license" : "MIT",
"require": {
"illuminate/support": "^5.1",
"illuminate/container": "^5.1",
"illuminate/database": "^5.1",
"illuminate/events": "^5.1"
"illuminate/support": "~5.1.0",
"illuminate/container": "~5.1.0",
"illuminate/database": "~5.1.0",
"illuminate/events": "~5.1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0|^5.0",
"orchestra/testbench": "^3.1",
"orchestra/testbench": "~3.1.0",
"mockery/mockery": "^0.9",
"satooshi/php-coveralls": "^0.6"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Jenssegers/Mongodb/Query/Builder.php
Expand Up @@ -790,7 +790,7 @@ protected function performUpdate($query, array $options = [])
*/
public function convertKey($id)
{
if (MongoId::isValid($id))
if (is_string($id) and strlen($id) === 24 and ctype_xdigit($id))
{
return new MongoId($id);
}
Expand Down
1 change: 0 additions & 1 deletion test.php

This file was deleted.

0 comments on commit cc6dd6c

Please sign in to comment.