You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a show stopper since we can still use DI\link() or use function DI\link and later link(), but this is confusing for users. Also PhpStorm will by default not offer to import the function as it recognizes PHP's built-in link() function…
I've never liked link() anyway so this could be a good reason to introduce an alternative in PHP-DI 5, such as get(). Of course DI\link() would continue to work and would be an alias to DI\get().
The text was updated successfully, but these errors were encountered:
mnapoli
changed the title
DI\link() shorten to link() conflicts with PHP's native link() function
DI\link() shorten to link() conflicts with PHP's native link() function -> replace with DI\get()
Mar 12, 2015
With PHP 5.6 we can import functions:
However
DI\link()
would be shortened tolink()
, which already exist in the root namespace as thelink()
function…This is not a show stopper since we can still use
DI\link()
oruse function DI\link
and laterlink()
, but this is confusing for users. Also PhpStorm will by default not offer to import the function as it recognizes PHP's built-inlink()
function…I've never liked
link()
anyway so this could be a good reason to introduce an alternative in PHP-DI 5, such asget()
. Of courseDI\link()
would continue to work and would be an alias toDI\get()
.The text was updated successfully, but these errors were encountered: