From 2ee82b3e1cbf0bfadbdb67a91e2d875ec4ea1038 Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Thu, 29 Oct 2026 17:24:32 +0000 Subject: [PATCH] Point CONTRIBUTING.md at /contributing and retire the mobile docs page CONTRIBUTING.md now just links to nativephp.com/contributing, like every other repo's does. The mobile v4 docs had their own contributing page, which the new page replaces. It's gone, and its URL, plus the unversioned one, 301s to /contributing. Co-Authored-By: Claude Opus 5.5 --- CONTRIBUTING.md | 27 ++---- .../mobile/4/getting-started/contributing.md | 83 ------------------- routes/web.php | 4 + .../ContributingAndSecurityPagesTest.php | 24 ++++++ 4 files changed, 36 insertions(+), 102 deletions(-) delete mode 100644 resources/views/docs/mobile/4/getting-started/contributing.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc8a1a847..355d59105 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,22 +1,11 @@ -Thank you for contributing! +# Contributing -## Getting Started +Thanks for helping out with NativePHP! -Be sure to fork and clone the repo: `gh repo clone NativePHP/nativephp.com` +Everything you need to know about contributing, from opening a pull request +to our Code of Conduct, is at +[nativephp.com/contributing](https://nativephp.com/contributing). -Make a branch for what change you want to contribute and open a pull request to the upstream main branch. - -## Torchlight - -The documentation uses [torchlight.dev](torchlight.dev) for syntax highlighting. - -Without a token, you will run into an error on pages like "/docs/desktop/1/getting-started/introduction". - -To get set up: - -1. Create an account and then make a new API token [here](https://torchlight.dev/account/api-tokens). -2. Then set the API token in the .env. - -``` -TORCHLIGHT_TOKEN= -``` +Please don't report security vulnerabilities in public issues. Follow the +security policy at [nativephp.com/security](https://nativephp.com/security) +instead. diff --git a/resources/views/docs/mobile/4/getting-started/contributing.md b/resources/views/docs/mobile/4/getting-started/contributing.md deleted file mode 100644 index 2a1f3e447..000000000 --- a/resources/views/docs/mobile/4/getting-started/contributing.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Contributing -order: 700 ---- - -## Contributing - -We welcome contributions to NativePHP for Mobile! Whether it's bug fixes, new features, documentation improvements, or bug reports, every contribution helps make the project better. - -### How to Contribute - -1. **Fork the repository** on GitHub. -2. **Clone your fork** locally: - ```bash - git clone git@github.com:your-username/mobile-air.git - cd mobile-air - ``` -3. **Create a new branch** for your feature or fix: - ```bash - git checkout -b feature/my-new-feature - ``` -4. **Make your changes** and ensure all tests pass. -5. **Commit your changes** with a clear, descriptive commit message. -6. **Push your branch** to your fork: - ```bash - git push origin feature/my-new-feature - ``` -7. **Open a Pull Request** against the `main` branch of the NativePHP Mobile repository. - -### Pull Request Guidelines - -- Keep your changes focused. If you have multiple unrelated changes, please submit them as separate pull requests. -- Write clear, descriptive commit messages. -- Include tests for any new functionality. -- Ensure all existing tests pass before submitting. -- Update documentation if your changes affect the public API. - -### Reporting Bugs - -If you discover a bug, please [open an issue](https://github.com/NativePHP/mobile-air/issues) on GitHub. Include as much detail as possible: - -- A clear, descriptive title. -- Steps to reproduce the issue. -- Expected behavior vs. actual behavior. -- Your environment details (OS, PHP version, Laravel version, etc.). - -### Security Vulnerabilities - -If you discover a security vulnerability, please **do not** open a public issue. Instead, please send an email to [support@nativephp.com](mailto:support@nativephp.com). All security vulnerabilities will be promptly addressed. - -## Code of Conduct - -The NativePHP community is dedicated to providing a welcoming and inclusive experience for everyone. We expect all participants to adhere to the following standards: - -### Our Pledge - -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. - -### Our Standards - -Examples of behavior that contributes to a positive environment: - -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members - -Examples of unacceptable behavior: - -- The use of sexualized language or imagery, and sexual attention or advances of any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information without explicit permission -- Other conduct which could reasonably be considered inappropriate in a professional setting - -### Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project team at [support@nativephp.com](mailto:support@nativephp.com). All complaints will be reviewed and investigated promptly and fairly. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. diff --git a/routes/web.php b/routes/web.php index dc254c9ce..f3e296e45 100644 --- a/routes/web.php +++ b/routes/web.php @@ -111,6 +111,10 @@ Route::redirect('docs/mobile/4/edge-components/screen', '/docs/mobile/4/edge-components/layout', 301); Route::redirect('docs/mobile/4/edge-components/card', '/docs/mobile/4/edge-components/layout', 301); +// The mobile docs' contributing guide moved to the site-wide contributing page. +Route::redirect('docs/mobile/4/getting-started/contributing', '/contributing', 301); +Route::redirect('docs/mobile/getting-started/contributing', '/contributing', 301); + // Webhook routes (must be outside web middleware for CSRF bypass) Route::post('opencollective/contribution', [OpenCollectiveWebhookController::class, 'handle'])->name('opencollective.webhook'); diff --git a/tests/Feature/ContributingAndSecurityPagesTest.php b/tests/Feature/ContributingAndSecurityPagesTest.php index 1ea0de1a6..9e62e9579 100644 --- a/tests/Feature/ContributingAndSecurityPagesTest.php +++ b/tests/Feature/ContributingAndSecurityPagesTest.php @@ -127,6 +127,30 @@ public function the_security_page_sends_private_services_to_support_and_third_pa ], false); } + #[Test] + public function the_old_mobile_docs_contributing_page_redirects_permanently_to_the_contributing_page(): void + { + $this + ->get('/docs/mobile/4/getting-started/contributing') + ->assertMovedPermanently() + ->assertRedirect('/contributing'); + } + + #[Test] + public function the_unversioned_mobile_docs_contributing_link_redirects_straight_to_the_contributing_page(): void + { + $this + ->get('/docs/mobile/getting-started/contributing') + ->assertMovedPermanently() + ->assertRedirect('/contributing'); + } + + #[Test] + public function the_mobile_docs_no_longer_have_their_own_contributing_page(): void + { + $this->assertFileDoesNotExist(resource_path('views/docs/mobile/4/getting-started/contributing.md')); + } + #[Test] public function the_footer_links_to_the_contributing_and_security_pages(): void {