Skip to content

Commit

Permalink
EZP-29984: Fix LIKE support for * as wildcard across engines, deprec…
Browse files Browse the repository at this point in the history
…ate % usage (ezsystems#2517)

Beyond just LIKE, this also fixes the following:
* Add LegacySE search Field Criteria support for RelationList FieldType
* Add LegacySE search Field Criteria support for Author FieldType
* Add LegacySE search Field Criteria support for RichText FieldType
* Handle 'Simple' field types when LIKE and int column as EQ, as int and LIKE does not mix well on SQL
  • Loading branch information
andrerom authored Feb 1, 2019
1 parent c16e85f commit 7129d21
Show file tree
Hide file tree
Showing 45 changed files with 296 additions and 468 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function getFieldName()
public function assertFieldDataLoadedCorrect(Field $field)
{
$this->assertInstanceOf(
'eZ\\Publish\\Core\\FieldType\\Author\\Value',
AuthorValue::class,
$field->value
);

Expand Down Expand Up @@ -219,7 +219,7 @@ public function getValidUpdateFieldData()
public function assertUpdatedFieldDataLoadedCorrect(Field $field)
{
$this->assertInstanceOf(
'eZ\\Publish\\Core\\FieldType\\Author\\Value',
AuthorValue::class,
$field->value
);

Expand Down Expand Up @@ -279,7 +279,7 @@ public function provideInvalidUpdateFieldData()
public function assertCopiedFieldDataLoadedCorrectly(Field $field)
{
$this->assertInstanceOf(
'eZ\\Publish\\Core\\FieldType\\Author\\Value',
AuthorValue::class,
$field->value
);

Expand Down Expand Up @@ -411,15 +411,6 @@ public function providerForTestIsNotEmptyValue()
);
}

protected function checkSearchEngineSupport()
{
if (ltrim(get_class($this->getSetupFactory()), '\\') === 'eZ\\Publish\\API\\Repository\\Tests\\SetupFactory\\Legacy') {
$this->markTestSkipped(
"'ezauthor' field type is not searchable with Legacy Search Engine"
);
}
}

protected function getValidSearchValueOne()
{
return array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ public function getTypeName()
return 'ezdatetime';
}

/**
* {@inheritdoc}
*/
protected function supportsLikeWildcard($value)
{
parent::supportsLikeWildcard($value);

return false;
}

/**
* Get expected settings schema.
*
Expand Down
10 changes: 10 additions & 0 deletions eZ/Publish/API/Repository/Tests/FieldType/DateIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ public function getTypeName()
return 'ezdate';
}

/**
* {@inheritdoc}
*/
protected function supportsLikeWildcard($value)
{
parent::supportsLikeWildcard($value);

return false;
}

/**
* Get expected settings schema.
*
Expand Down
193 changes: 0 additions & 193 deletions eZ/Publish/API/Repository/Tests/FieldType/FileBaseIntegrationTest.php

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ public function getTypeName()
return 'ezobjectrelation';
}

/**
* {@inheritdoc}
*/
protected function supportsLikeWildcard($value)
{
parent::supportsLikeWildcard($value);

return false;
}

/**
* @param \eZ\Publish\API\Repository\Values\Content\Content $content
*
Expand Down
Loading

0 comments on commit 7129d21

Please sign in to comment.