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

Illuminate Support Arr class not found. #34292

Closed
loduis opened this issue Sep 11, 2020 · 10 comments
Closed

Illuminate Support Arr class not found. #34292

loduis opened this issue Sep 11, 2020 · 10 comments

Comments

@loduis
Copy link
Contributor

loduis commented Sep 11, 2020

I can't find this class in the framework in version 8
image
previus version exists
image

@driesvints
Copy link
Member

@jessarcher
Copy link
Member

I realise this is probably my issue, but I'm getting an error on composer install since this file was moved.

> Illuminate\Foundation\ComposerScripts::postAutoloadDump
Script Illuminate\Foundation\ComposerScripts::postAutoloadDump handling the post-autoload-dump event terminated with an exception
In ClassLoader.php line 444:
                                                                               
  include(/builds/<redacted>/<redacted>/vendor/composer/../laravel/framework/sr  
  c/Illuminate/Support/Arr.php): failed to open stream: No such file or direc  
  tory     
$ php --version
PHP 7.4.10 (cli) (built: Sep  3 2020 19:59:29) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
$ composer --version
Composer 1.10.13 2020-09-09 11:46:34

It's only failing in CI (i.e. a fresh build with no cache or anything). On my local machine it's fine. I'll post back if I figure it out.

@jessarcher
Copy link
Member

As is often the way, and as I suspected, the issue was mine, and I solved it moments after posting the above 😂

There was another cache at play - the CI runner cache on GitLab. After clearing that, it built fine.

Hopefully this helps someone else!

@LukeTowers
Copy link
Contributor

@driesvints is this class aliased anywhere? The SupportArr test still references the old path but I can't seem to find any aliasing that would support that.

@driesvints
Copy link
Member

Hey @LukeTowers, what do you mean with

The SupportArr test still references the old path

Can you point out where?

@LukeTowers
Copy link
Contributor

@driesvints
Copy link
Member

That seems okay to me?

@LukeTowers
Copy link
Contributor

@driesvints it's referencing lluminate\Support\Arr when the actual class is lluminate\Collections\Arr. If lluminate\Support\Arr is expected to work; my question is where is that connection between the non-existent lluminate\Support\Arr class and the actual lluminate\Collections\Arr class set up?

@driesvints
Copy link
Member

The Illuminate\Collections namespace doesn't exists?

I do see there's two usages of it that was introduced in this PR but the OP accidentally used it while it should have been Support. I'll send in a PR to fix that.

@LukeTowers
Copy link
Contributor

@driesvints ahh, I see! The collections stuff was split off into its own package but the namespace remained the same; that's the critical piece of information that I was missing. Specifically to answer my own question this line is what makes /src/Illuminate/Collections/Arr.php available as Illuminate\Support\Arr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants