Skip to content
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

Added Version to WooCommerce 6.5's composer.json #32765

Merged
merged 1 commit into from Apr 25, 2022

Conversation

ObliviousHarmony
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

By default, Composer pulls the version of the current code from the branch name. In our case, since it has no idea what to call them, they are versioned as 1.0.0.0. When we run Core alongside the feature plugin, all of the PHP files included in it have a higher version. Our solution here is to add an explicit version to composer.json in order to tell Composer what to put instead of 1.0.0.0. The end result should be that Core's PHP class files are preferred and everything loads correctly.

Closes #32732.

How to test the changes in this Pull Request:

  1. Run composer install in plugins/woocommerce.
  2. Review plugins/woocommerce/vendor/composer/jetpack_autoload_classmap.php and verify that Core PHP files are 6.5.0.0.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file by running pnpm nx affected --target=changelog?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

In order for the Jetpack Autoloader to pull the
correct version, we must add one manually to
the `composer.json` file.
@ObliviousHarmony ObliviousHarmony added this to the 6.5.0 milestone Apr 25, 2022
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Apr 25, 2022
@claudiosanches claudiosanches merged commit 2c48dab into release/6.5 Apr 25, 2022
@claudiosanches claudiosanches deleted the release-6.5/fix-composer-version branch April 25, 2022 18:52
@github-actions
Copy link
Contributor

Hi @claudiosanches, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

@adrianduffell
Copy link
Contributor

@ObliviousHarmony @claudiosanches Do we need another PR to apply this to trunk too?

@ilyasfoo
Copy link
Contributor

Re-ping @ObliviousHarmony as I think we'd need to have this in trunk as well

@ObliviousHarmony
Copy link
Contributor Author

Sorry, yes, we do. We should set it to 6.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants