Skip to content

Conversation

@mukeshpanchal27
Copy link
Member

@mukeshpanchal27 mukeshpanchal27 commented May 12, 2023

Closes #136

How to test the Change

  1. Take the pull from the branch.
  2. Set phpVersion: 8.1 in your .wp-env.json file and restart environment.
  3. Update composer. Use composer update command.
  4. Go to Admin Panel > Tools > Plugin Check > Check plugin

Checklist:

@mukeshpanchal27 mukeshpanchal27 self-assigned this May 12, 2023
@mukeshpanchal27 mukeshpanchal27 marked this pull request as ready for review May 12, 2023 07:40
@mukeshpanchal27
Copy link
Member Author

PHPCS shows - The package "wp-coding-standards/wpcs" is pointing to a commit-ref, this is bad practice and can cause unforeseen issues. error because we use unstable version.

@swissspidy
Copy link
Member

The warning is coming from composer validate --strict specifically, not PHPCS. It's usually just a warning, but --strict makes it error.

The only way to resolve this is by not using --strict for the time being.

Aside, a note from the Composer docs about using explicit commit references:

This feature has severe technical limitations, as the composer.json metadata will still be read from the branch name you specify before the hash. You should therefore only use this as a temporary solution during development to remediate transient issues, until you can switch to tagged releases. The Composer team does not actively support this feature and will not accept bug reports related to it.

It's definitely a temporary solution in this case, so IMHO it should be fine to temporarily remove --strict as well.

@spacedmonkey
Copy link
Member

@mukeshpanchal27 The composer install is now failing in CI.

@mukeshpanchal27
Copy link
Member Author

@swissspidy, the CI still shows that warning and throws the error.

@swissspidy
Copy link
Member

The warning is expected to be there still. The step still fails now because of the additional The lock file is not up to date with the latest changes in composer.json error. That is new.

@mukeshpanchal27
Copy link
Member Author

Thanks, @spacedmonkey, for helping me correct the composer version issue.

@felixarntz felixarntz merged commit ce60ca8 into trunk May 12, 2023
@felixarntz felixarntz deleted the fix/136-exception-thrown-php81 branch May 12, 2023 16:59
@mukeshpanchal27 mukeshpanchal27 mentioned this pull request Aug 16, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exception thrown by I18nSniff in PHP 8.1

5 participants