@rinaz22

Почему phpMorphy не работает?

Всем привет! Делаю не большой поиск на сайте. Решил использовать phpMorphy. Скачал все файлы и словари(русский и английский). Запустил пример, который уже был, но ничего не находит. Ввел другое слово(яблоко), также ничего. + куча предупреждений о том, что какие-то классы устарели и т.п.
Использую php 7.3
Почему ничего не находит?
Список предупреждении

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_FilesBundle has a deprecated constructor in W:\domains\poisk\src\common.php on line 60

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy has a deprecated constructor in W:\domains\poisk\src\common.php on line 91

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Fsa has a deprecated constructor in W:\domains\poisk\src\fsa\fsa.php on line 90

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Fsa_Decorator has a deprecated constructor in W:\domains\poisk\src\fsa\fsa.php on line 248

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Fsa_WordsCollector has a deprecated constructor in W:\domains\poisk\src\fsa\fsa.php on line 265

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_GramInfo has a deprecated constructor in W:\domains\poisk\src\graminfo\graminfo.php on line 68

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_GramInfo_Decorator has a deprecated constructor in W:\domains\poisk\src\graminfo\graminfo.php on line 147

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Morphier_Base has a deprecated constructor in W:\domains\poisk\src\morphiers.php on line 34

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Morphier_Dict has a deprecated constructor in W:\domains\poisk\src\morphiers.php on line 164

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Morphier_DictBulk has a deprecated constructor in W:\domains\poisk\src\morphiers.php on line 228

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Morphier_PredictBySuffix has a deprecated constructor in W:\domains\poisk\src\morphiers.php on line 435

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Morphier_PredictByDatabse has a deprecated constructor in W:\domains\poisk\src\morphiers.php on line 540

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Morphier_Decorator has a deprecated constructor in W:\domains\poisk\src\morphiers.php on line 604

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Morphier_WithGramTab has a deprecated constructor in W:\domains\poisk\src\morphiers.php on line 622

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; phpMorphy_Storage has a deprecated constructor in W:\domains\poisk\src\storage.php on line 6
Testing single mode...

  • Вопрос задан
  • 380 просмотров
Решения вопроса 1
Adamos
@Adamos
phpMorphy нормально работает под современным пыхом за одним исключением: конструкторы классов названы по-старому, именем класса. Их нужно переименовать в __construct именно в тех строчках, в которых вам выдает ошибку. Десять минут на все исправления.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы