forumone / wp-cfm

Manage and deploy WordPress configuration changes
http://wordpress.org/plugins/wp-cfm/
195 stars 38 forks source link

fix(PHP): Fixes PHP related deprecation notices & build bugs #146

Closed timnolte closed 11 months ago

timnolte commented 12 months ago

All Submissions:

Changes proposed in this Pull Request:

How to test the changes in this Pull Request:

  1. Checkout the PR.
  2. Generate a build of the plugin. npm ci && npm run build
  3. Generate a release of the plugin. npm run release
  4. Copy the files in the dist directory to a WordPress installation.
  5. Attempt to load WP-CFM bundles from the WP-CLI. wp config pull all
  6. From the WordPress Dashboard ensure that creating bundles, saving bundles, pull/push bundles all function without errors or notices in the debug logs.

Other information:

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

  • Fixes FILTER_SANITIZE_STRING deprecation notices using polyfill function.
  • Fixes trim deprecation notices using latest Symfony/YAML package & null check patch.
timnolte commented 11 months ago

@jgleisner & @tropicandid after some discussion with the Symfony devs with the issue I opened I was able to fix the trim() deprecation notice issue by adding in an appropriate check in the WP-CFM code without patching the package. Other than perhaps an outstanding issue with the new Devcontainer/Codespaces local development environment this should be good to go. I tested out the trim() issue using a version of the build on the WSWC site which was where I was seeing the issue being reported.