Problem with namespaces - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Problem with namespaces (/showthread.php?tid=70348) |
Problem with namespaces - ayukawaa - 03-28-2018 Hi, I want to use the package DamerauLevenshtein, installed it through composer but its not working... need some help (i'm and old programmer not good with namespaces) In the same codeigniter project I have installed through composer phpoffice/phpexcel and its working ok I have in the config PHP Code: $config['composer_autoload'] = APPPATH.'vendor/autoload.php'; went to packagist, search for my package https://packagist.org/packages/oefenweb/damerau-levenshtein and then open command in application folder and install it Quote:composer require oefenweb/damerau-levenshtein after install, checked all files in place, its installed in Quote:application\vendor\oefenweb\damerau-levenshtein\src\DamerauLevenshtein.php its header is PHP Code: <?php in my controller I have PHP Code: <?php and i have when called an error exception PHP Code: Type: Error on the line: "$dl = new DamerauLevenshtein(..." I have tried with all posible combinations on top of the class , with and without the require of the autoload, change namespace... its all the same... Quote:require_once APPPATH."vendor/autoload.php'; so i'm stuck... always the same error. What am I doing wrong? PS: I really need this, the PHP levenstein function does not work for me because of the type of strings i will be testing. |