Page MenuHomePhabricator

PHP7 Fatal error: Cannot use 'Bool' as class name as it is reserved in extensions/Elastica/Elastica/lib/Elastica/Query/Bool.php on line 15
Closed, ResolvedPublic

Description

It looks like Bool become a reserved class name on PHP 7. Therefore it needs rename.........

Event Timeline

Zoglun raised the priority of this task from to Medium.
Zoglun updated the task description. (Show Details)
Zoglun added a project: Elasticsearch.
Zoglun subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Bool is deprecated now, you can use BoolQuery or BoolFilter if you have PHP7.
Bool will be removed in next releases.

If we've migrated any uses of the standalone bool class, we can hack remove it, but feels a bit icky.

First step is to make sure we've migrated any Bool to BoolQuery and BoolFilter

Then we update to version 3 when it's released

Seems Translate was the only usage of Query\Bool and Filter\Bool

However, we can't bump to Elastica 3.0.0 anyway, till we sort our PHP version requirements out.... As that requires PHP 5.4

Reedy lowered the priority of this task from Medium to Low.Dec 31 2015, 1:11 PM

@Zoglun Does the library not work because you have uses of Bool in your installed extensions? Or does it not work generally because the class still exists?

I guess percent of any "String, int, bool, float, etc." will cause Fatal error.

We need a bit more help to be able to fix things up :)

Feel free to just paste errors

There was a Null class too in Elastica. But nothing was using that

Reedy changed the task status from Open to Stalled.Jan 12 2016, 1:09 AM

Change 264191 had a related patch set uploaded (by MaxSem):
Fix PHP7 compatibility

https://gerrit.wikimedia.org/r/264191

Change 264191 merged by jenkins-bot:
Fix PHP7 compatibility

https://gerrit.wikimedia.org/r/264191

Change 264193 had a related patch set uploaded (by MaxSem):
Fix PHP7 compatibility

https://gerrit.wikimedia.org/r/264193

Change 264195 had a related patch set uploaded (by Reedy):
Fix PHP7 compatibility

https://gerrit.wikimedia.org/r/264195

Change 264193 merged by jenkins-bot:
Fix PHP7 compatibility

https://gerrit.wikimedia.org/r/264193

Change 264197 had a related patch set uploaded (by Reedy):
Fix PHP7 compatibility

https://gerrit.wikimedia.org/r/264197

Change 264197 merged by jenkins-bot:
Fix PHP7 compatibility

https://gerrit.wikimedia.org/r/264197

Change 264195 merged by jenkins-bot:
Fix PHP7 compatibility

https://gerrit.wikimedia.org/r/264195

MaxSem claimed this task.