-
Notifications
You must be signed in to change notification settings - Fork 23
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
upkeep/163: Fix fatal error on PHP 5.6 #166
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sidsector9 Thank you for the PR.
PR adds composer dependency to the plugin but it seems we have ignored the vendor
folder in .distignore file. It may result in vendor folder missing in the release zip. Could you please help to check it once?
Also, we have to add steps for composer package installation in our GH action workflows. especially in deploy workflow. Could you please help with it?
Thank you.
eafce4f
to
f5d13d4
Compare
simple-page-ordering.php
Outdated
<?php | ||
} | ||
); | ||
if ( ! is_readable( __DIR__ . '/vendor/autoload.php' ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the event further composer dependencies are added at a later date includingthis here may cause problems if the new dependencies require > PHP 5.6
Would it be possible to do one of the following:
- only require the compatibility checker in the vendor path
- install the compatibility checker outside of
vendor
and require it from the custom location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterwilsoncc I've taken the approach to move the library from vendor
to 10up-lib
directory and also loaded the SPO main class after the validation is completed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @Sidsector9. Code LGTM! and it tests well (Didn't throw any fatal error on 5.6 now).
In release build zip I have noticed some .md files in 10up-lib folder but it doesn't seems a blocker here. So, we are good to go here.
Thank you.
Thanks for testing @iamdharmesh |
Description of the Change
This PR does the following:
Simple_Page_Ordering
to a separate file.class-simple-page-ordering.php
only when platform validation passes.Closes #163
How to test the Change
Please follow steps from the issue.
Changelog Entry
Credits
Props @peterwilsoncc @Sidsector9
Checklist: