According to the php 7 migration manual (http://php.net/manual/en/migration70.incompatible.php), some names can't be used as class names anymore since php 7:

The following names cannot be used to name classes, interfaces or traits:

  • bool
  • int
  • float
  • string
  • NULL
  • TRUE
  • FALSE

We currently have a String Data type and that fails on php7, the facet api travis tests have discovered this: https://travis-ci.org/nickveenhof/facetapi/jobs/87654550.

This patch adds DataType to all the data types.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

borisson_ created an issue. See original summary.

borisson_’s picture

Issue summary: View changes
borisson_’s picture

Issue summary: View changes
drunken monkey’s picture

Status: Active » Needs work

Ah, darn, you're right of course! Seems we all forgot about that …
A bit more motivation to tackle #2552453: Fix test fails on Postgres, SQLite and PHP 7 sooner rather than later, I guess.

+++ b/src/Plugin/search_api/data_type/BooleanDataType.php
@@ -13,12 +13,12 @@ use Drupal\search_api\DataType\DataTypePluginBase;
  * @SearchApiDataType(
- *   id = "boolean",
+ *   id = "boolean_data_type",

I don't think that's necessary, though? I would like to avoid that change, if possible.

borisson_’s picture

Status: Needs work » Needs review
FileSize
3.26 KB
4.83 KB
drunken monkey’s picture

Status: Needs review » Fixed

Looks good now, thanks again!
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.