Skip to content

Conversation

@galbus
Copy link
Contributor

@galbus galbus commented Jul 11, 2025

This pull request updates the BeyondWords WordPress plugin to version 6.0.0 and includes significant changes to improve code consistency and maintainability by making numerous PHP methods static. Additionally, it updates version references across various files to reflect the new release. Below is a summary of the most important changes:

Version Updates:

  • Updated the plugin version to 6.0.0 in package.json, readme.txt, and speechkit.php to reflect the new release. [1] [2] [3]

Code Refactoring (Static Methods):

  • Made the init and related methods static in multiple classes, including WPGraphQL, AddPlayer, BlockAttributes, DisplayPlayer, ErrorNotice, GenerateAudio, and Metabox, to improve code consistency. [1] [2] [3] [4] [5] F93ccd5cL32R32, [6]
  • Updated method calls within these classes to use self or __CLASS__ for static context where applicable. [1] [2] [3]

Documentation Updates:

  • Added @since 6.0.0 annotations to all newly static methods to document the changes clearly. [1] [2] [3] [4] [5]

Changelog:

  • Updated the changelog in readme.txt to include a new section for version 6.0.0, highlighting the enhancement of making PHP methods static.

@linear
Copy link

linear bot commented Jul 11, 2025

@galbus galbus self-assigned this Jul 11, 2025
@galbus galbus changed the base branch from main to s-7155-plugin-v600 July 11, 2025 12:56
@galbus galbus requested a review from Copilot July 11, 2025 13:48
Copy link
Contributor

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 upgrades the BeyondWords WordPress plugin to v6.0.0 by converting numerous instance methods into static methods for better consistency and maintainability, and updates version numbers across key metadata files.

  • Updated plugin version to 6.0.0 in metadata files
  • Refactored multiple classes to use static methods and updated all related calls
  • Added @since 6.0.0 annotations to document new static methods

Reviewed Changes

Copilot reviewed 90 out of 90 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/phpunit/Settings/Tabs/VoicesTabTest.php Switched from instance to static calls for Voices methods
tests/phpunit/Settings/Tabs/SummarizationTabTest.php Switched from instance to static calls for Summarization methods
tests/phpunit/Settings/Tabs/PronunciationsTabTest.php Switched from instance to static calls for Pronunciations methods
tests/phpunit/Settings/Tabs/PlayerTabTest.php Switched from instance to static calls for Player methods
tests/phpunit/Settings/Tabs/CredentialsTabTest.php Switched from instance to static calls for Credentials methods
tests/phpunit/Settings/SyncTest.php Switched from instance to static calls for Sync methods
tests/phpunit/Settings/SettingsTest.php Switched from instance to static calls for Settings methods
tests/phpunit/Settings/Fields/ProjectId/ProjectIdTest.php Switched from instance to static calls for ProjectId methods
tests/phpunit/Settings/Fields/PreselectGenerateAudio/PreselectGenerateAudioTest.php Switched from instance to static calls for PreselectGenerateAudio methods
tests/phpunit/Settings/Fields/PlayerUI/PlayerUITest.php Switched from instance to static calls for PlayerUI methods
tests/phpunit/Settings/Fields/PlayerStyle/PlayerStyleTest.php Switched from instance to static calls for PlayerStyle methods
tests/phpunit/Settings/Fields/IncludeExcerpt/IncludeExcerptTest.php Switched from instance to static calls for IncludeExcerpt methods
tests/phpunit/Settings/Fields/ApiKey/ApiKeyTest.php Switched from instance to static calls for ApiKey methods
src/Component/Settings/Fields/PreselectGenerateAudio/PreselectGenerateAudio.php Converted init, addSetting, render, enqueueScripts to static

@galbus galbus merged commit bbcccc2 into s-7155-plugin-v600 Jul 11, 2025
@galbus galbus deleted the s-7154-use-static-methods-throughout-to-simplify-magic-embed branch July 11, 2025 13:53
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.

2 participants