Thank you for your interest in contributing! This guide explains how to set up a development environment, run the tests, and submit changes.
WordPressPCL/
├── src/
│ └── WordPressPCL/ # Library source code
├── tests/
│ ├── WordPressPCL.Tests.Selfhosted/ # Integration tests against a local Docker WordPress
│ └── WordPressPCL.Tests.Hosted/ # Smoke tests against a live WordPress instance
├── docs/
│ ├── v3/ # Reference docs for version 3.x
│ ├── v2/ # Reference docs for version 2.x
│ └── v1/ # Reference docs for version 1.x
├── dev/ # Docker Compose setup for local WordPress
├── WordPressPCL.sln
├── Directory.Build.props
├── Directory.Packages.props
├── CHANGELOG.md
└── mkdocs.yml
- .NET 10 SDK
- Docker and Docker Compose (for self-hosted integration tests)
dotnet restore WordPressPCL.sln --disable-parallel
dotnet build WordPressPCL.sln -c Release --no-restoreThe self-hosted tests spin up a local WordPress instance via Docker Compose and run the full test suite against it.
# Start the test environment
cd dev
docker compose up -d
# Wait for WordPress to be ready (the container creates .wp-tests-ready when done)
# Then run the tests from the repository root
cd ..
dotnet test tests/WordPressPCL.Tests.Selfhosted/WordPressPCL.Tests.Selfhosted.csproj \
-s tests/WordPressPCL.Tests.Selfhosted/jwtauth.runsettings \
-l "console;verbosity=detailed"For full setup instructions, including plugin requirements and run-settings options, see dev/install.md.
The hosted tests run against a live WordPress site. They depend on specific content and credentials and may fail for environment reasons unrelated to your change. They are mainly used in CI and are not required for local development.
Please follow the Microsoft C# coding guidelines. Nullable reference types are enabled solution-wide — do not suppress nullable warnings without a clear justification.
- Open an issue first. Describe the feature or bug so we can discuss whether it is in scope and avoid duplicate work.
- Fork the repository and create a branch from
main. - Make your changes. Add or update tests to cover any new or modified behaviour.
- Run the build and self-hosted tests to verify nothing is broken.
- Open a pull request against
main. Reference the related issue in the description.
Please open an issue with a clear description, the version of WordPressPCL you are using, and a minimal reproduction.
This project follows the Contributor Covenant Code of Conduct. By participating you agree to abide by its terms.