you might not understand me, but your plugin arbitrarily parses (requires) any file in that directory, that is not normal, since if the file that is 'required' is broken,
require is identical to include except upon failure it will also produce a fatal E_COMPILE_ERROR level error. In other words, it will halt the script whereas include only emits a warning (E_WARNING) which allows the script to continue.
so, do whatever you want, require all the files if that's what you want, but at least understand what kind of errors that can produce in specific cases :
the file is broken
the code in the file is broken
etc
that's why i suggested using include_once instead of require_once,
you can't really need a file you don't know how it's named
at best you might want to have it, so you include it, not require it,
@dovy and @kprovance do you fail to see why require_once(any file) is a bad idea ?
you literally have no idea what files could potentially get in that directory but you require them all....
you might not understand me, but your plugin arbitrarily parses (requires) any file in that directory, that is not normal, since if the file that is 'required' is broken,
require is identical to include except upon failure it will also produce a fatal E_COMPILE_ERROR level error. In other words, it will halt the script whereas include only emits a warning (E_WARNING) which allows the script to continue.
so, do whatever you want, require all the files if that's what you want, but at least understand what kind of errors that can produce in specific cases :
the file is broken the code in the file is broken etc
that's why i suggested using include_once instead of require_once, you can't really need a file you don't know how it's named at best you might want to have it, so you include it, not require it,
@dovy and @kprovance do you fail to see why require_once(any file) is a bad idea ? you literally have no idea what files could potentially get in that directory but you require them all....