-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update libs with wpcs 3 changes [beta] #373
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Depth parameter shouldn't be set to 0.
…s vs source items
dingo-d
force-pushed
the
feature/update-wpcs
branch
from
September 22, 2023 14:03
52797bc
to
95ec563
Compare
Added anonymous classes instead.
dingo-d
force-pushed
the
feature/update-wpcs
branch
from
September 22, 2023 14:41
f13abdb
to
f5d044c
Compare
8.3 allow failure for non-released version of PHP.
Should prevent failures on PHPUnit <9 where assertObjectHasProperty isn't defined.
This will still be an issue on composer installs with lowest dependencies where dynamic properties isn't allowed/fixed in mockery.
In real life cases, the sourceItem array will contain list of items in the folder, and the folder as a value, so we need to check that as well. This should probably come up in tests, unless the dataset is not correctly set to mimick how the real life projects are behaving. This needs investigation.
I have created a new branch where we will test and update everything for PHP8, tnx for this major fixes |
iruzevic
added a commit
that referenced
this pull request
Nov 6, 2023
* Update libs with wpcs 3 changes [beta] (#373) * Update composer dependencies * Update phpcs config * Remove unused ignored error * Fix deprecation notice Depth parameter shouldn't be set to 0. * Fix the tests failures because of inability to check the list of items vs source items * Remove extra space from init blocks command * Update readme * Fix phpcs violation * Fix deprecations with using traits directly Added anonymous classes instead. * Add mocks for the failing tests * Fix test deprecations * Update the gh action workflow * Workflow fix * Workflow update 8.3 allow failure for non-released version of PHP. * Minor formatting fix on helpers * Replace assertions with expectations API Should prevent failures on PHPUnit <9 where assertObjectHasProperty isn't defined. * Prevent the dynamic properties deprecation notices in tests This will still be an issue on composer installs with lowest dependencies where dynamic properties isn't allowed/fixed in mockery. * Minor grammar typo fix in a test * Update workflow to allow failures on lowest composer dependencies * Update moveItem method * Improve type description in moveItem method * Improve the moveItems method In real life cases, the sourceItem array will contain list of items in the folder, and the folder as a value, so we need to check that as well. This should probably come up in tests, unless the dataset is not correctly set to mimick how the real life projects are behaving. This needs investigation. * changing the commands registration order * addings fixes for php8 * Update composer.json Co-authored-by: Denis Žoljom <dingo-d@users.noreply.github.com> * updating tests * updating tests * updating tests * updating tests * updating tests * removing 'Old' function in blocks * changing config version and name definition * removing storybook * fixing missing frontend libs private dir * fixing wrong block dependeny output * fixing command examples * adding new command for changing version name * fixing import command * adding better copy for missing attribute * adding is used method to every enqueu hook * Update src/Misc/VersionCli.php Co-authored-by: Ivan Ramljak <22823970+piqusy@users.noreply.github.com> * adding is used method to every enqueu hook * adding PR fixes --------- Co-authored-by: Denis Žoljom <dingo-d@users.noreply.github.com> Co-authored-by: Ivan Ramljak <22823970+piqusy@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR will:
WP_Filesystem_*
methods are just wrappers with filters added (which is not desired)assertObjectHasAttribute
withassertObjectHasProperty
in PHPUnit 9 (we could just create a custom assertion, but expectations are cleaner and don't suffer from this issue)composer update --prefer-lowest --prefer-stable
, and that is due to Mockery mocks. On newer versions this issue is fixed, but on older versions, it's not, and any on-the-fly property creation will cause this deprecation, which will fail on PHP9 (all deprecations will become fatal errors then).Note that some tests do fail but those are allowed failures, and shouldn't matter as it's unlikely people would install the lowest stable packages anyhow.
Regarding the deprecation notices, I can, if you agree, just remove the
lowest
condition when installing the packages from the integrate.yml (would make the CI checks faster as well, as we would be removing extra checks).Please review the code and test this code before tagging the v7 beta.
CC: @iruzevic @goranalkovic-infinum
EDIT:
I've realized that the boilerplate will have to be updated with the beta release as well, as the coding standards would block installation (they are still on 1.6, which is locked to 7.4).
Closes #315