Skip to content

Commit

Permalink
Merge 7b59885 into 3d8449a
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Jan 4, 2021
2 parents 3d8449a + 7b59885 commit ca4e6c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -89,13 +89,15 @@ Coverage will be available in `coverage/index.html`.

The command to launch Behat tests is:

php -d memory_limit=-1 ./vendor/bin/behat --suite=default --stop-on-failure --format=progress
php -d memory_limit=-1 ./vendor/bin/behat --profile=default --stop-on-failure --format=progress

If you want to launch Behat tests for MongoDB, the command is:

APP_ENV=mongodb php -d memory_limit=-1 ./vendor/bin/behat --suite=mongodb --stop-on-failure --format=progress
MONGODB_URL=mongodb://localhost:27017 APP_ENV=mongodb php -d memory_limit=-1 ./vendor/bin/behat --profile=mongodb --stop-on-failure --format=progress

To get more details about an error, replace `--format=progress` by `-vvv`.
To get more details about an error, replace `--format=progress` by `-vvv`. You may run a mongo instance using docker:

docker run -p 27017:27017 mongo:latest

# License and Copyright Attribution

Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Doctrine/Common/Filter/SearchFilterTrait.php
Expand Up @@ -160,7 +160,7 @@ protected function normalizeValues(array $values, string $property): ?array
protected function hasValidValues(array $values, $type = null): bool
{
foreach ($values as $key => $value) {
if (self::DOCTRINE_INTEGER_TYPE === $type && null !== $value && false === filter_var($value, FILTER_VALIDATE_INT)) {
if (\in_array($type, (array) self::DOCTRINE_INTEGER_TYPE, true) && null !== $value && false === filter_var($value, FILTER_VALIDATE_INT)) {
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Doctrine/MongoDbOdm/Filter/SearchFilter.php
Expand Up @@ -41,7 +41,7 @@ final class SearchFilter extends AbstractFilter implements SearchFilterInterface
{
use SearchFilterTrait;

public const DOCTRINE_INTEGER_TYPE = MongoDbType::INTEGER;
public const DOCTRINE_INTEGER_TYPE = [MongoDbType::INTEGER, MongoDbType::INT];

public function __construct(ManagerRegistry $managerRegistry, IriConverterInterface $iriConverter, IdentifiersExtractorInterface $identifiersExtractor, PropertyAccessorInterface $propertyAccessor = null, LoggerInterface $logger = null, array $properties = null, NameConverterInterface $nameConverter = null)
{
Expand Down

0 comments on commit ca4e6c8

Please sign in to comment.