How to use dash in namespace? I have installed a library using composer.json https://github.com/nuovo/spreadsheet-reader

Now in vendor I'm getting a folder structure like:



Now I want to use excel_reader2.php class inside my controller.

and I'm using it like:

use nuovo\spreadsheet-reader\php-excel-reader\excel_reader2;
use nuovo\spreadsheet-reader\SpreadsheetReader;


but it is giving me fatal error


  Parse error: syntax error, unexpected '-', expecting ',' or ';'


Is there any way to use folders containing '-' (dash) in their names?
If that package is doing it correctly, then it registered its classes with composer and it should just work.

If it doesn't use namespaces (which you could see by opening the file), then just write new ClassName and it should work.

That is assuming you installed the dependency correctly, it needs to be in your main vendor folder, not the one of a module or so.