Hi,

There is no autoloading for functions. However sometimes it would be convenient 
to be able to ensure that a PHP userland compat function is defined in case the 
given extension is missing. For example ext/mbstring could be useful, yet its 
annoying to have to check for it and thereby penalize those users who do have 
the extension loaded:
https://github.com/FriendsOfSymfony/UserBundle/commit/e827fdb340ef2efd06e042d767f715fbd874ab67

Now in theory I could just attach this file in my Extension of the mbstring 
extension missing to some core service and hope that the service is always 
loaded (since the mbstring functions are used in the User Entity/Document which 
arent managed by the DIC I cannot attach it there). This way there would not be 
a need for this check at run time anymore. Obviously this would be more than a 
bit hacky. Not sure if this is a general enough use case to even matter but 
might be nice to have a place for loading such stuff.

Also it seems like the file directive in the DIC only supports strings and not 
arrays of strings to be able to load multiple files, which might be a handy 
feature for the above use case.

regards,
Lukas Kahwe Smith
[email protected]



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to