upskill-event-manager/wordpress-dev/vendor/yoast/phpunit-polyfills/CHANGELOG.md
bengizmo 37f7b426b6 feat: Implement auto page creation & fix login E2E tests
Implements automatic creation of required plugin pages (Community Login,
Trainer Registration, Trainer Dashboard) upon plugin activation. This
addresses E2E test failures caused by missing pages in the test
environment.

- Adds activation hook in `hvac-community-events.php` to call
  `hvac_ce_create_required_pages`.
- The callback function checks for existing pages by slug and creates
  them using `wp_insert_post` if missing. Includes debug logging.

Also fixes issues identified during E2E test debugging:
- Corrects fatal error in `includes/community/class-login-handler.php`
  by replacing undefined constant `HVAC_COMMUNITY_EVENTS_PATH` with
  `HVAC_CE_PLUGIN_DIR`.
- Updates `tests/e2e/tests/login.spec.ts` to use the correct selector
  `#wp-submit` for the login form submit button instead of
  `button[type="submit"]`.

Documentation updates:
- Adds `docs/automatic-page-creation-plan.md`.
- Updates `README.md` regarding automatic page creation.
- Updates Memory Bank files (`decisionLog.md`, `progress.md`,
  `activeContext.md`).

Note: Activation hook logging did not appear during WP-CLI activation,
requiring further investigation if page creation issues persist. E2E
test confirmation pending.
2025-03-28 17:18:21 -03:00

11 KiB

Change Log for Yoast PHPUnit Polyfills

All notable changes to this project will be documented in this file.

This projects adheres to Keep a CHANGELOG and uses Semantic Versioning.

Unreleased

Nothing yet.

1.1.4 - 2025-02-09

This is a maintenance release.

Changed

  • README: updated sub-section about PHPUnit version support with information about the PHPUnit Polyfills 4.x branch. PR #249
  • General housekeeping.

1.1.3 - 2025-01-08

This is a maintenance release.

Changed

  • README: fixed a few broken badges.
  • General housekeeping.

1.1.2 - 2024-09-07

This is a maintenance release.

Changed

  • README: updated sub-section about PHPUnit version support with information about the PHPUnit Polyfills 3.x branch. PR #188
  • General housekeeping.

1.1.1 - 2024-04-05

Added

  • Compatibility fix for running tests using a PHPUnit PHAR file for PHPUnit 8.5.38+ and PHPUnit 9.6.19+. PR #161.

Changed

  • General housekeeping.

1.1.0 - 2023-08-19

Added

  • Yoast\PHPUnitPolyfills\Polyfills\AssertObjectProperty trait to polyfill the Assert::assertObjectHasProperty() and Assert::assertObjectNotHasProperty() methods as backported from PHPUnit 10.1.0 to PHPUnit 9.6.11. PR #135.

Changed

  • General housekeeping.

1.0.5 - 2023-03-31

Fixed

  • A custom $message parameter passed to an assertion, will no longer overrule an emulated "assertion failed" message, but will be prefixed to it instead. PR #97 This applies to the following polyfills:
    • assertIsClosedResource()
    • assertIsNotClosedResource()
    • assertIsReadable()
    • assertNotIsReadable()
    • assertIsWritable()
    • assertNotIsWritable()
    • assertDirectoryExists()
    • assertDirectoryNotExists()
    • assertStringNotContainsString()
    • assertStringNotContainsStringIgnoringCase()

Changed

  • The develop branch has been removed. Development will now take place in the 1.x and 2.x branches.
  • README: links to the PHPUnit manual now point explicitly to the PHPUnit 9.x documentation. PR #94
  • README: new sub-section about PHPUnit version support. PR #99
  • README: various minor improvements. PRs #92, #93
  • General housekeeping.

1.0.4 - 2022-11-16

This is a maintenance release.

Changed

  • The Yoast\PHPUnitPolyfills\Autoload class is now final. PR #77.
  • README: clear up minor language confusion. Props Phil E. Taylor and fredericgboutin-yapla for pointing it out.
  • README: fix links which were broken due to an upstream branch rename. PR #80.
  • Verified PHP 8.2 compatibility.
  • General housekeeping.

1.0.3 - 2021-11-23

Changed

  • General housekeeping.

Fixed

  • The failure message thrown for the assertIsClosedResource() and assertIsNotClosedResource() assertions will now be more informative, most notably, when the value under test is a closed resource. PR #65, props Alain Schlesser for reporting.

1.0.2 - 2021-10-03

As of version 2.15.0 of the shivammathur/setup-php action for GitHub Actions, the PHPUnit Polyfills can be installed directly from this action using the tools key.

Added

  • README: FAQ section about installing and using the library via the shivammathur/setup-php action. PR #52

Changed

  • README: minor textual clarifications and improvements. PRs #52, #54, props Pierre Gordon.
  • General housekeeping.

Fixed

  • Autoloader: improved compatibility with packages which create a class_alias for the PHPUnit_Runner_Version or PHPUnit\Runner\Version class. PR #59

1.0.1 - 2021-08-09

Added

  • The Yoast\PHPUnitPolyfills\Autoload class now contains a VERSION constant. Issue #46, PR #47, props Pascal Birchler for the suggestion. This version constant can be used by (complex) test setups to verify that the PHPUnit Polyfills which will be loaded, comply with the version requirements for the test suite.

Changed

  • Minor documentation updates. #43

1.0.0 - 2021-06-21

Added

  • Yoast\PHPUnitPolyfills\Polyfills\AssertClosedResource trait to polyfill the Assert::assertIsClosedResource() and Assert::assertIsNotClosedResource() methods as introduced in PHPUnit 9.3.0. PR #27.
  • Yoast\PHPUnitPolyfills\Polyfills\AssertObjectEquals trait to polyfill the Assert::assertObjectEquals() method as introduced in PHPUnit 9.4.0. PR #38. The behaviour of the polyfill closely matches the PHPUnit native implementation, but is not 100% the same. Most notably, the polyfill will check the type of the returned value from the comparator method instead of enforcing a return type declaration for the comparator method.
  • Yoast\PHPUnitPolyfills\Polyfills\EqualToSpecializations trait to polyfill the Assert::equalToCanonicalizing(), Assert::equalToIgnoringCase() and Assert::equalToWithDelta() methods as introduced in PHPUnit 9.0.0. PR #28, props Marc Siegrist.
  • Polyfills for the PHP native Error and TypeError classes as introduced in PHP 7.0. PR #36.
  • README: FAQ section covering functionality removed from PHPUnit and usage with a Phar.

Changed

  • The minimum supported PHP version has been lowered to PHP 5.4 (was 5.5). PR #19.
  • XTestCase: the visibility of the setUpFixtures() and the tearDownFixtures() methods has been changed to protected (was public). Issue #10, PR #20, props Mark Baker for reporting.
  • README: re-ordered the sections and various other improvements.
  • Initial preparation for PHPUnit 10.0 compatibility.
  • General housekeeping.

Fixed

  • Issue #17 via PR #18 - AssertStringContainString: PHPUnit < 6.4.2 would throw a "mb_strpos(): empty delimiter" PHP warning when the $needle passed was an empty string. Props Gary Jones.

0.2.0 - 2020-11-25

Added

  • Yoast\PHPUnitPolyfills\TestListeners\TestListenerDefaultImplementation: a cross-version compatible base implementation for TestListeners using snake_case method names to replace the PHPUnit native method names.
  • Yoast\PHPUnitPolyfills\Helpers\AssertAttributeHelper trait containing a getProperty() and a getPropertyValue() method. This is a stop-gap solution for the removal of the PHPUnit assertAttribute*() methods in PHPUnit 9. It is strongly recommended to refactor your tests/classes in a way that protected and private properties no longer be tested directly as they should be considered an implementation detail. However, if for some reason the value of protected or private properties still needs to be tested, this helper can be used to get access to their value.
  • Yoast\PHPUnitPolyfills\Polyfills\AssertNumericType trait to polyfill the Assert::assertFinite(), Assert::assertInfinite() and Assert::assertNan() methods as introduced in PHPUnit 5.0.0.
  • Yoast\PHPUnitPolyfills\Polyfills\ExpectException trait to polyfill the TestCase::expectException(), TestCase::expectExceptionMessage(), TestCase::expectExceptionCode() and TestCase::expectExceptionMessageRegExp() methods, as introduced in PHPUnit 5.2.0 to replace the Testcase::setExpectedException() and the Testcase::setExpectedExceptionRegExp() method.
  • Yoast\PHPUnitPolyfills\Polyfills\AssertFileDirectory trait to polyfill the Assert::assertIsReadable(), Assert::assertIsWritable() methods and their file/directory based variations, as introduced in PHPUnit 5.6.0.
  • Yoast\PHPUnitPolyfills\TestCases\TestCase: support for the assertPreConditions() and assertPostConditions() methods.

Changed

  • The minimum supported PHP version has been lowered to PHP 5.5 (was 5.6).
  • The minimum supported PHPUnit version has been lowered to PHP 4.8.36 (was 5.7). Note: for PHPUnit 4, only version 4.8.36 is supported, for PHPUnit 5, only PHPUnit >= 5.7.21 is supported.
  • Readme: documentation improvements.

0.1.0 - 2020-10-26

Initial release.