Issues

ZF-12067: Zend_Search_Lucene_Interface_MultiSearcher stored in wrong location

Issue Type: Bug Created: 2009-06-01T17:46:12.000+0000 Last Updated: 2012-06-02T00:05:18.000+0000 Status: Resolved Fix version(s): - 1.12.0 (27/Aug/12)

Reporter: Quentin Zervaas (qzervaas) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Search_Lucene

  • FixForZF1.12
  • zf-crteam-review

Related issues: Attachments: - ZF-12067.patch

Description

This class is located in ./Zend/Search/Lucene/MultiSearcher.php but should be in ./Zend/Search/Lucene/Interface/MultiSearcher.php

(Alternatively, the class should be renamed to Zend_Search_Lucene_MultiSearcher)

Comments

Posted by Nicolas Matheu (azriel49) on 2010-09-15T02:42:32.000+0000

Still not resolved, it is very annoying !!!

Posted by David Rogers (al_the_x) on 2011-06-09T16:10:27.000+0000

Really the class just needs to be renamed, as it's not an interface but a concrete implementation of Zend_Search_Lucene_Interface. Here's a patch:

<pre class="highlight">
diff --git Zend/Search/Lucene/MultiSearcher.php Zend/Search/Lucene/MultiSearcher.php
index b2cb033..021b422 100644
--- Zend/Search/Lucene/MultiSearcher.php
+++ Zend/Search/Lucene/MultiSearcher.php
@@ -31,7 +31,7 @@ require_once 'Zend/Search/Lucene/Interface.php';
  * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (<a href="http://www.zend.com">http://www.zend.com</a>)
  * @license    <a href="http://framework.zend.com/license/new-bsd">http://framework.zend.com/license/new-bsd</a>     New BSD License
  */
-class Zend_Search_Lucene_Interface_MultiSearcher implements Zend_Search_Lucene_Interface
+class Zend_Search_Lucene_MultiSearcher implements Zend_Search_Lucene_Interface
 {
     /**
      * List of indices for searching.

Posted by Adam Lundrigan (adamlundrigan) on 2012-05-12T02:54:33.000+0000

The suggested fix breaks backwards-compatibility because an end user may be directly require_once'ing Zend/Search/Lucene/MultiSearcher.php and expecting to get class Zend_Search_Lucene_Interface_MultiSearcher, which won't work any longer.

Attached patch implementing BC fix for this issue. However, we end up with two classes in a single file, which is technically against ZF coding standards. Is there a better way that i'm not thinking of?

Posted by Adam Lundrigan (adamlundrigan) on 2012-06-02T00:05:18.000+0000

Fixed in trunk (1.12.0): r24862

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts