-
Notifications
You must be signed in to change notification settings - Fork 50
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
Building on multiple PHP versions, and remove auth token #120
Conversation
Also brings the workflow more in line with the rest of Inpsyde projects.
We use Github Actions for CI.
It's not working because it uses deps which are incompatible with the project spec. Composer deps need to be installed, and the lockfile committed, but they cannot be installed because this project is not compatible. Bump to PHP 7.1 is strongly recommended.
Due to a series of factors, I stronly recommend using PHP 7.1 for this project. Not only will this fix many existing incompatibility issues, but will also make the project significantly more maintainable, and compatible with a wider range of libraries and tools that make maintainability much cheaper. |
Right now, the build is failing. This is because there isn't a Composer lockfile, so it tries to update on its own - which is not something that should happen in a plugin. And I cannot add the lockfile, because I cannot install deps: the project of PHP 7.0 (this was not previously declared) depends on PHP 7.1 libs. |
Nevertheless, this PR brings things like Docker to the mix, which will make installing deps on the correct version of PHP much easier. I will add Gulp instructions too, when the lib compatibility problem is resolved. For overall picture of improvements, see |
One important question - maybe for @websupporter - is: why not use PSR-4? Is the WP class file naming convention a hard requirement of this project? |
Hi @XedinUnknown! Thanks for the PR. A couple of comments:
|
Thanks for the quick response, and sorr for the delay! Here are my notes to your comments:
|
Hi @XedinUnknown!
I don't feel strongly about this and we can always exclude some of the rules from the WP standard if the benefit is worth it. Could you give some examples of how some classnames/directories would have to change?
Got it. We've only found 7 extensions on the marketplace that explicitly require PHP > 7.0. While this is something we're taking into account, it's not necessarily the only way to look at this matter. We're trying to obtain some stats from current users to decide.
We were seeing some errors with actions in this repo due to the repo being in a legacy plan, but it seems those were from the time the repo was private. I did a quick test and it is true that actions are available now that it is public. Thanks for working on this! |
Can now control WP and WC versions.
The new version requirement will allow newer versions of dependencies to be used, which will increase compatibility with other products. The lockfile ensures that the same deps will be installed everywhere, be it on another dev's machine, or on the CI server. This way we can actually test with the deps that are going to be shipped, instead of a random set.
Refactoring of modules themselves was not necessary, because they were already following the new standard.
PSR-4 is much more robust and predictable. But to do this, a source root dir must be specified for every module. This could be done in the root file, but this is not very modular. Instead, now every module declares its own source root by using the amazing Composer Merge Plugin. This approach allows each module to also declare its own dependencies. Together, these changes allow modules to be easily extractable to separate pacakges when the need arises, and in general improves modularity significantly.
The WP containers don't seem to be used anywhere. There were imports, but they are not actually used it seems.
Now will use config instead of CLI values for most things. Will also show sniff codes.
This could go around the fact that no single PHPUnit major version supports PHP 7.1 and 8.0 at the same time.
This is the newest release, and is the first one that is compatible with PHP 8. Other changes are BC-breaking, but very very minor.
It is not used if status code is 200.
Avoids failure when response is `null`. https://github.com/XedinUnknown/woocommerce-paypal-payments/pull/1/checks?check_run_id=2745916372#step:7:15
This builds for me in XedinUnknown#1. |
# Conflicts: # modules/ppcp-wc-gateway/services.php
Already included after |
dhii\module-interface
#100.