Skip to content

Block Delimiter: add package contents #43648

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

Merged
merged 13 commits into from
May 28, 2025
Merged

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented May 27, 2025

Proposed changes:

Following #43645, this brings the contents of the package from its original class on WordPress.com.

In order to do that, I've also had to make a few changes:

  • I fixed some PHPCS warnings. See ca6f2ba
  • I removed typed properties. This package requires PHP 7.2, and typed properties were introduced in PHP 7.3. See f636bb5

I also added a first set of tests for this new class. See ed7ae1b

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

  • Internal reference: p7H4VZ-5l1-p2

Does this pull request change what data or activity we track or use?

  • No

Testing instructions:

Since the package is not yet required by our plugin, we cannot see it in action. For now, tests should be enough.

@jeherve jeherve self-assigned this May 27, 2025
@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] In Progress [Pri] Normal labels May 27, 2025
Copy link
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jeherve jeherve force-pushed the add/block-delimiter-contents branch from cf1e56b to 496620a Compare May 27, 2025 17:44
It is no longer used
Copy link

jp-launch-control bot commented May 27, 2025

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/block-delimiter/src/class-block-delimiter.php 225/253 (88.93%) -11.07% 28 💔

Full summary · PHP report

Coverage check overridden by I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. .

@jeherve jeherve requested a review from Copilot May 27, 2025 18:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR brings in the contents of the package from its original class on WordPress.com while addressing PHPCS warnings and PHP version compatibility. Key changes include removing the version-constants block from composer.json, addressing PHPCS warnings, and adding an initial changelog file for the new functionality.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
projects/packages/block-delimiter/composer.json Removed the "version-constants" field to support PHP 7.2 usage.
projects/packages/block-delimiter/changelog/add-block-delimiter-contents Added a changelog entry for the new package content integration.
Comments suppressed due to low confidence (1)

projects/packages/block-delimiter/composer.json:50

  • The removal of the 'version-constants' block might affect how the package version is automatically injected. Verify that consumers of the package will not be adversely impacted by this change in version management.
"textdomain": "jetpack-block-delimiter"

@github-actions github-actions bot added the Docs label May 28, 2025
@jeherve jeherve added the I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. label May 28, 2025
@jeherve jeherve merged commit 9830b75 into trunk May 28, 2025
65 checks passed
@jeherve jeherve deleted the add/block-delimiter-contents branch May 28, 2025 13:22
jeherve added a commit that referenced this pull request May 28, 2025
Following #43648, we can start using the new class to parse blocks.

Internal reference: p7H4VZ-5l1-p2
jeherve added a commit that referenced this pull request May 28, 2025
Following #43648, we can start using the new class to parse blocks.

Internal reference: p7H4VZ-5l1-p2
jeherve added a commit that referenced this pull request May 29, 2025
Since the class does not rely on WordPress, we can afford to be more permissive, and not necessarily stick to WordPress coding standards.

This reverts some of the changes made in #43648.
jeherve added a commit that referenced this pull request May 29, 2025
* Block delimiter: update class to be closer to original codebase

Since the class does not rely on WordPress, we can afford to be more permissive, and not necessarily stick to WordPress coding standards.

This reverts some of the changes made in #43648.

* Add changelog

* Update Phan baseline to avoid errors

* Update phpcs config to avoid warnings

* Ignore more rules to match original file

* Update readme to clarify coding standards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs [Focus] Performance I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [Package] Block Delimiter [Pri] Normal [Tests] Includes Tests [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants