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

Exclude helpers from Laravel 5.7 #4

Closed
zorca opened this issue Dec 17, 2018 · 5 comments
Closed

Exclude helpers from Laravel 5.7 #4

zorca opened this issue Dec 17, 2018 · 5 comments

Comments

@zorca
Copy link

zorca commented Dec 17, 2018

I tried to exclude the helper file from Laravel 5.7. I need it to run Laravel functionality on Wordpress.
My code:
"exclude-from-files": [ "laravel/framework/src/Illuminate/Foundation/helpers.php" ]
But it didn't work.
P. S. If it is easy, pls add the output of the package exception messages, if it is found.

@mcaskill
Copy link
Owner

Hi @zorca,

The following works on my end to exclude Illuminate's Foundation helpers:

"extra": {
    "exclude-from-files": [
        "laravel/framework/src/Illuminate/Foundation/helpers.php"
    ]
}

Can you verify that helpers file is not in the array found in: vendor/composer/autoload_files.php.

If the file is present, try regenerating your autoloader with:

composer dump-autoload

@zorca
Copy link
Author

zorca commented Dec 18, 2018

I think this is a problem with Windows.
#3

@zorca
Copy link
Author

zorca commented Dec 18, 2018

#5 Windows path fix

@nmeri17
Copy link

nmeri17 commented Apr 11, 2022

Hi @zorca,

The following works on my end to exclude Illuminate's Foundation helpers:

"extra": {
    "exclude-from-files": [
        "laravel/framework/src/Illuminate/Foundation/helpers.php"
    ]
}

Can you verify that helpers file is not in the array found in: vendor/composer/autoload_files.php.

If the file is present, try regenerating your autoloader with:

composer dump-autoload

You are my hero. Please state on the README that full path to file relative to vendor is what should be used (not its namespaced name or relative to the project itself). At least, that's what has worked for me on Windows

I also had to dump autoload to get it working. Thank you so much

@mcaskill
Copy link
Owner

Good point about confusion in the case of laravel/framework vs illuminate/support.
I'll update the README. Thanks.

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

3 participants