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

Improve composer loading #11

merged 1 commit into from Aug 15, 2018


None yet
2 participants
Copy link

Mte90 commented Aug 13, 2018

removing wpinc now works better with composer and other stuff that use autoloading


This comment has been minimized.

Copy link

julien731 commented Aug 14, 2018

Thanks for the help @Mte90. Could you detail a bit what removing this check improves with Composer? And if we are to remove it, we'd need another way to ensure the file won't be loaded without WordPress around.


This comment has been minimized.

Copy link

Mte90 commented Aug 14, 2018

The problem is on composer with autoloading. If you add and you use other software in composer like codeception or grumphp they will load the autoloading of all the libraries.
Because of this tool they don't include wordpress so that constant doesn't exist and you get a crash of this tools because of this library.
The solution was to remove the check of the variable because is a class and there is anything else (different from dismissable notice handler that I patched in a different way). So with composer will handle the autoloading when the library is called and there is no check required for wordpress.

@julien731 julien731 merged commit 8df8fea into julien731:develop Aug 15, 2018

1 check passed

Scrutinizer 1 new issues

@julien731 julien731 added this to the 2.1.0 milestone Aug 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment