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
merged 1 commit into from Aug 15, 2018

Conversation

Projects
None yet
2 participants
@Mte90
Copy link
Contributor

Mte90 commented Aug 13, 2018

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

@julien731

This comment has been minimized.

Copy link
Owner

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.

@Mte90

This comment has been minimized.

Copy link
Contributor

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
Details

@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