Update overall setup of the module#3
Merged
remyperona merged 12 commits intodevelopfrom Nov 27, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the module setup by updating PHP and WordPress version requirements, reorganizing the project structure, and improving code quality tooling. The changes prepare the library for modern PHP development standards.
Key changes:
- Bumps minimum PHP version from 7.0 to 7.4 and WordPress from 5.3 to 6.6
- Reorganizes source code into
inc/directory with updated autoloading - Modernizes test infrastructure with proper PHPUnit configuration and test case naming conventions
- Updates development dependencies and CI workflows
Reviewed changes
Copilot reviewed 44 out of 57 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| phpstan.neon.dist | Increased PHPStan level to 5, updated paths to scan inc/ and Tests/, added WordPress stub files |
| phpcs.xml.dist | Updated scan paths to inc/ and Tests/, removed several rule exclusions, updated PHP/WP version requirements |
| composer.json | Updated PHP requirement to 7.4+, modernized dev dependencies, restructured autoloading to use inc/ directory |
| inc/*.php | Renamed parameter $default to $default_value for clarity, added void return types, fixed spacing |
| Tests/Unit/*.php | Added strict types, renamed test classes to PascalCase convention, added PHPDoc type hints, removed extra blank lines |
| Tests/Integration/*.php | Added strict types, renamed test classes to PascalCase convention, added PHPDoc type hints, fixed method names |
| Tests/Fixtures/*.php | Aligned array formatting for consistency |
| .github/workflows/*.yml | Replaced legacy workflow files with modern reusable workflows for PHPUnit, PHPStan, and PHPCS |
Comments suppressed due to low confidence (2)
Tests/Integration/SiteOptions/DeleteTest.php:19
- Corrected spelling of 'testShoulDeleteOption' to 'testShouldDeleteOption'.
inc/OptionArray.php:1 - [nitpick] The spacing in the PHPDoc is inconsistent. Line 60 has two spaces between
@param mixedand$value, while line 61 has only one space between@param mixedand$default_value. These should be consistently aligned.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR modernizes the module setup by updating PHP and WordPress version requirements, reorganizing the project structure, and improving code quality tooling. The changes prepare the library for modern PHP development standards.
Key changes:
inc/directory with updated autoloading