Skip to content
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 from ParentResolver when using it's functions #16

Closed
Spice-King opened this issue Aug 2, 2023 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@Spice-King
Copy link
Contributor

Describe the bug
ParentResolver assumes an alias for Arr exists, which if a project was created on an old enough version of Laravel (ours was on 5.5 over 6 years ago) might not be defined, or worse yet, pointed to something other than Illuminate\Support\Facades\Arr.

Yes, our config predates the use of Facade::defaultAliases(). Yes, I'm going to sit down and allocate time to update all the configs in this project I've inherited from my predecessor as they've been largely untouched, other than new custom additions and new package configs to it, in the past 6 years. No, despite me updating our configs, it should still be fixed here to avoid other people having issues if they alias Arr to something else. Yes, I do feel silly for finding this because of old configs.

What version does this affect?

  • Laravel Version: N/A? But 10.17.0 currently, originally started on 5.5.19
  • Package Version: 1.7.0, as far back as 1.1.0

To Reproduce
Steps to reproduce the behavior:

  1. Remove alias for Arr from the app.aliases config array.
  2. Define a breadcrumb that requires a parent resolver.
  3. Load view for route that requires that breadcrumb.

Expected behavior
No error.

Additional context

Bug added in b678d0e. Trivial PR inbound.

@Spice-King Spice-King added the bug Something isn't working label Aug 2, 2023
Spice-King added a commit to Spice-King/gretel that referenced this issue Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant