Skip to content

Commit 6ec5bf5

Browse files
authored
updates from casting (#3)
* pulled changes from upstream * fixed closures in where failing
1 parent a261a3e commit 6ec5bf5

File tree

5 files changed

+8
-23
lines changed

5 files changed

+8
-23
lines changed

.travis.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,12 @@ services:
99
- docker
1010

1111
install:
12-
# Update docker-engine using Ubuntu 'trusty' apt repo
13-
- >
14-
curl -sSL "https://get.docker.com/gpg" |
15-
sudo -E apt-key add -
16-
- >
17-
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" |
18-
sudo tee -a /etc/apt/sources.list
19-
- sudo apt-get update
20-
- >
21-
sudo apt-get -o Dpkg::Options::="--force-confdef" \
22-
-o Dpkg::Options::="--force-confold" --assume-yes install docker-engine --allow-unauthenticated
2312
- docker version
24-
25-
# Update docker-compose via pip
2613
- sudo pip install docker-compose
2714
- docker-compose version
28-
- docker-compose up --build -d
29-
- docker ps -a
15+
- sed -i -e "s/php:cli/php:${TRAVIS_PHP_VERSION}-cli/g" Dockerfile
16+
- cat Dockerfile
17+
- docker-compose build
3018

3119
script:
3220
- docker-compose up --exit-code-from php

docker/Dockerfile renamed to Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.1-cli
1+
FROM php:cli
22

33
RUN pecl install xdebug
44

@@ -11,4 +11,4 @@ RUN curl -sS https://getcomposer.org/installer | php \
1111
&& mv composer.phar /usr/local/bin/ \
1212
&& ln -s /usr/local/bin/composer.phar /usr/local/bin/composer
1313

14-
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
14+
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ services:
66
container_name: php
77
build:
88
context: .
9-
dockerfile: docker/Dockerfile
9+
dockerfile: Dockerfile
1010
volumes:
1111
- .:/code
1212
working_dir: /code
13-
command: docker/entrypoint.sh
13+
command: bash -c "composer install --prefer-source --no-interaction && php ./vendor/bin/phpunit"
1414
depends_on:
1515
- mysql
1616
- mongodb

docker/entrypoint.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/Jenssegers/Mongodb/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
876876
}
877877

878878
// Convert $casts
879-
if ($this->isCastableToObjectId($column)) {
879+
if (!($column instanceof \Closure) && $this->isCastableToObjectId($column)) {
880880
if (is_array($params[2])) {
881881
foreach ($params[2] as &$value) {
882882
if (is_string($value)) {

0 commit comments

Comments
 (0)