-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class 'Arr' not found #3
Comments
// make Arr available in the global namespace
class_alias('Fuel\Common\Arr', 'Arr'); The correct solution is to have a DiC extension definition (like "getArrInstance') that can be attached to a class that needs |
Does that mean that I can do this in my package and use this package later with Fuel's DiC? You talked about extensibility, doesn't this break it? What about this? if( ! class_exists('Arr'))
{
// make Arr available in the global namespace
class_alias('Fuel\Common\Arr', 'Arr');
} |
Personally I feel this should not be the case. It should be possible to use as much of the common package without having to set up little bits and pieces like this. It should be possible to inject an instance of |
@stevewest The actual problem is that DataContainer uses |
Yes, I know that. What I propose is a solution to that. You should not have to alias a class to set up the data container like that. |
Which is what I wrote as "the correct solution" ;) |
First step to the correct solution: https://github.com/fuelphp/common/blob/master/src/Providers/FuelServiceProvider.php#L45 Arr Proxy uses an instance of Arr class resolved from the container. |
call_user_func_array() expects parameter 1 to be a valid callback, class 'Arr' not found
I get this message related to this line.
The text was updated successfully, but these errors were encountered: