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 created this task.Dec 31 2015, 1:38 AM
Zoglun raised the priority of this task from to Normal.
Zoglun updated the task description. (Show Details)
Zoglun added a project: Elasticsearch.
Zoglun added a subscriber: Zoglun.
Restricted Application added a project: Discovery. · View Herald TranscriptDec 31 2015, 1:38 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Deskana moved this task from Uncategorised to Technical on the CirrusSearch board.Dec 31 2015, 4:00 AM
Reedy added a subscriber: Reedy.Dec 31 2015, 12:56 PM

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

Reedy added a comment.Dec 31 2015, 1:11 PM

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 Normal to Low.Dec 31 2015, 1:11 PM
Reedy added a comment.Dec 31 2015, 4:50 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?

Zoglun added a comment.EditedJan 1 2016, 12:25 AM

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

Reedy added a comment.Jan 1 2016, 2:32 AM

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 added a subscriber: MaxSem.Jan 14 2016, 11:08 PM

Are we done here?

MaxSem closed this task as Resolved.Jan 19 2016, 6:31 PM
MaxSem claimed this task.
Danny_B moved this task from Unsorted to PHP 7 on the [DO NOT USE] NewPHP board.Jul 3 2016, 12:27 AM
Restricted Application added a project: Discovery-Search. · View Herald TranscriptJul 3 2016, 12:27 AM