|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
Description: ------------ Hi. I am trying to add list of queries into some legacy system to see what is sent to solr server. I replaced all Client instances with my own instance. I am trying to change query method to inject some query statistics gathering. I think there is an issue with function declaration that prevents me from making it work. I tried various combinations of method declaration: \SolrParams $query \SolrParams &$query // this obviously does not work because it seeks for a class in current namespace SolrParams $query SolrParams &$query use \SolrParams as SolrParams; SolrParams $query SolrParams &$query Please fix function declaration. Test script: --------------- <?php namespace \Api\Solr; class Client extends \SolrClient { public function __construct($options){ $options['secure']=false; parent::__construct($options); } public function query(\SolrParams &$query){ return parent::query($query); } } Expected result: ---------------- Ability to change query method. Actual result: -------------- Declaration of \Api\Solr\Client::query() should be compatible with & SolrClient::query(SolrParams &$query)