Skip to content

updates from casting #3

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

Merged
merged 2 commits into from
Jul 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,12 @@ services:
- docker

install:
# Update docker-engine using Ubuntu 'trusty' apt repo
- >
curl -sSL "https://get.docker.com/gpg" |
sudo -E apt-key add -
- >
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" |
sudo tee -a /etc/apt/sources.list
- sudo apt-get update
- >
sudo apt-get -o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" --assume-yes install docker-engine --allow-unauthenticated
- docker version

# Update docker-compose via pip
- sudo pip install docker-compose
- docker-compose version
- docker-compose up --build -d
- docker ps -a
- sed -i -e "s/php:cli/php:${TRAVIS_PHP_VERSION}-cli/g" Dockerfile
- cat Dockerfile
- docker-compose build

script:
- docker-compose up --exit-code-from php
4 changes: 2 additions & 2 deletions docker/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.1-cli
FROM php:cli

RUN pecl install xdebug

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

ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ services:
container_name: php
build:
context: .
dockerfile: docker/Dockerfile
dockerfile: Dockerfile
volumes:
- .:/code
working_dir: /code
command: docker/entrypoint.sh
command: bash -c "composer install --prefer-source --no-interaction && php ./vendor/bin/phpunit"
depends_on:
- mysql
- mongodb
Expand Down
3 changes: 0 additions & 3 deletions docker/entrypoint.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/Jenssegers/Mongodb/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
}

// Convert $casts
if ($this->isCastableToObjectId($column)) {
if (!($column instanceof \Closure) && $this->isCastableToObjectId($column)) {
if (is_array($params[2])) {
foreach ($params[2] as &$value) {
if (is_string($value)) {
Expand Down