Closed ltog closed 9 years ago
@ltog Lukas, you should never call it by yourself! Classmap autoloaders are a Framework mechanism used by the framework in case they are configured. At the moment this is only the case for some specialized modules https://github.com/linked-swissbib/vufind/blob/vfsb/linked/module/Swissbib/Module.php#L39 Because we started to work with linked-swissbib later, this module uses the StandardAutoloader - which is still the default loading mechanism of VuFind. Some time ago I added classmaps because they are much faster.
My recommendation: In the phase of development, you could ignore the mechanism (because using them makes it a little bit more complicated)
Is this explanation sufficient?
Günter
@guenterh: Never calling it myself, that's surely an advice I can remember... :-)
However, I already added the file to Git: https://github.com/linked-swissbib/vufind/blob/vfsb/linked/module/LinkedSwissbib/src/autoload_classmap.php and even added an entry in .gitignore to NOT ignore this file: https://github.com/linked-swissbib/vufind/blob/fd67e997149abb8a091afa91b419c8d16a1ae28d/.gitignore#L17
How should we proceed? Will the code run smoothly (i.e. without further steps after pulling) if we delete both the file and the .gitignore entry?
@ltog Yes delete it and the code should run without any ramifications - hopefully.... But only within the linked - swissbib module. Because for some other modules the Classmap autoloader is configured you shouldn't delete them otherwise you will be punished with an exception...
Another hint: classmap autoloader files are only used in production mode and not development https://github.com/linked-swissbib/vufind/blob/vfsb/linked/module/Swissbib/Module.php#L43 which means: because of the current setting: https://github.com/linked-swissbib/vufind/blob/vfsb/linked/local/httpd-swissbib.conf#L49 they are not used.
@guenterh : Ok, I will delete the file and the .gitignore entry...
Thanks for clearing things up.
@guenterh : Could you reiterate on the correct usage of
classmap_generator.php
?