| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  * Precise Similar Topics | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  * @copyright (c) 2013 Matt Friedman | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  * @license GNU General Public License, version 2 (GPL-2.0) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  | namespace vse\similartopics\migrations; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  | class release_1_3_0_fulltext extends \phpbb\db\migration\migration | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  | 	public function effectively_installed() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  | 	{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  | 		return !isset($this->config['similar_topics_fulltext']); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  | 	} | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 19 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 20 |  |  | 	public static function depends_on() | 
            
                                                                        
                            
            
                                    
            
            
                | 21 |  |  | 	{ | 
            
                                                                        
                            
            
                                    
            
            
                | 22 |  |  | 		return array('\vse\similartopics\migrations\release_1_3_0_data'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  | 	public function revert_data() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  | 	{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  | 		return array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  | 			// Revert the storage engine back to the original setting if it was stored | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  | 			array('if', array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  | 				!empty($this->config['similar_topics_fulltext']), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  | 				array('custom', array(array($this, 'revert_fulltext_changes'))), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  | 			)), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  | 			// Remove the config holding the original storage engine setting if it exists | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  | 			array('if', array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  | 				isset($this->config['similar_topics_fulltext']), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  | 				array('config.remove', array('similar_topics_fulltext')), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  | 			)), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  | 		); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  | 	} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  | 	/** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  | 	 * Drop the FULLTEXT index on phpbb_topics.topic_title | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  | 	 * Convert phpbb_topics back to the original storage engine | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  | 	 */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  | 	public function revert_fulltext_changes() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  | 	{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  | 		$fulltext = new \vse\similartopics\core\fulltext_support($this->db); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  | 		// Drop the FULLTEXT index | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  | 		if ($fulltext->is_index('topic_title')) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  | 		{ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  | 			$sql = 'ALTER TABLE ' . TOPICS_TABLE . ' DROP INDEX topic_title'; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  | 			$this->db->sql_query($sql); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  | 		} | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  | 		// Revert the storage engine back to its original setting | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  | 		$sql = 'ALTER TABLE ' . TOPICS_TABLE . ' ENGINE = ' . $this->db->sql_escape(strtoupper($this->config['similar_topics_fulltext'])); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  | 		$this->db->sql_query($sql); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  | 	} | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 61 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 62 |  |  |  | 
            
                        
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths