-
Notifications
You must be signed in to change notification settings - Fork 1
Documenation added #8
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
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Repository Guidelines | ||
|
|
||
| ## Project Structure & Module Organization | ||
| - `MslsSelect.php` bootstraps the plugin and stays the single PHP entry point. | ||
| - `js/mslsselect.js` (with the minified twin) powers the UI; update both when tweaking frontend behavior. | ||
| - `tests/` houses PHPUnit specs and Brain Monkey helpers; keep fixtures beside the tests that use them. | ||
| - `bin/` contains contributor utilities (`git-release.sh`, githooks); call these scripts instead of duplicating logic. | ||
| - `mslsselect/` and `mslsselect.zip` are release artifacts regenerated only through the build script. | ||
|
|
||
| ## Build, Test, and Development Commands | ||
| - `composer install` installs PHP tooling; rerun after dependency bumps or fresh clones. | ||
| - `composer test` executes the PHPUnit suite defined by `phpunit.xml`. | ||
| - `composer phpstan` runs static analysis; clear warnings before opening a PR. | ||
| - `composer coverage` writes HTML reports to `coverage/` (requires Xdebug). | ||
| - `composer githooks` copies the pre-commit hook into `.git/hooks/`. | ||
| - `composer build` invokes `bin/git-release.sh` and refreshes the distributable. | ||
|
|
||
| ## Coding Style & Naming Conventions | ||
| - Follow WordPress PHP style: tabs for indentation, PascalCase classes, `snake_case` functions prefixed with `mslsselect_`. | ||
| - Lint PHP via `vendor/bin/phpcs --standard=WordPress MslsSelect.php tests` before committing. | ||
| - Mirror the spacing and semicolon usage already present in `js/mslsselect.js` for JavaScript updates. | ||
|
|
||
| ## Testing Guidelines | ||
| - Name PHPUnit classes `*Test.php` and mirror the namespace or class they cover. | ||
| - Use Brain Monkey helpers for WordPress hooks instead of creating globals manually. | ||
| - Run `composer test` before pushing; prefer regression cases that assert rendered HTML or hook behavior. | ||
|
|
||
| ## Commit & Pull Request Guidelines | ||
| - Write concise, imperative commit subjects (`Add select placeholder`) and reference issues in the body (`Refs #123`) when relevant. | ||
| - Summarize scope, manual testing, and screenshots (for UI changes) in every PR. | ||
| - Confirm local parity with CI by running `composer install`, `composer phpstan`, and `composer test` prior to review. | ||
|
|
||
| ## Release & Packaging Notes | ||
| - Use `composer build` to regenerate `mslsselect/` and `mslsselect.zip`; avoid manual edits to packaged files. | ||
| - Before tagging, check the zip for `MslsSelect.php`, the JavaScript bundle, and required `vendor/` dependencies. |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.