In CMS or any known php systems the following practice is followed:
In a "main php" file a constant is declared for example in moodle is defined such as MOODLE_INTERNAL
and in order to use the database the docs suggest the following (as seen in this piece of documentation):
defined('MOODLE_INTERNAL') || die();
// Rest of code here
As far as I understand this practice is used to check whether the php file is executed "in system".
Whilst frameworks that use PSR-4 autoloading such as symfony, there's not a such requirement and not even is documented as well. Thus I have this burning question:
Why in PSR-4 autoload here's not a such requirement to check whether the php file is executed "in system"?