search
HomeBackend DevelopmentPHP TutorialContributing to PHP: How to Contribute to PHP's Manual

This two-part series explores how to contribute to the PHP project, focusing on documentation in part one. We'll cover account requests and post-approval steps.

Contributing to PHP: How to Contribute to PHP's Manual

Key Points:

  • Contributing to PHP's documentation enhances the language and boosts your PHP expertise. It can also lead to a php.net account, influencing the language's direction.
  • The documentation uses DocBook XML; familiarity is helpful but not mandatory.
  • Beginners can use the online editor for simple patches. Reviewing style guidelines beforehand is advisable.
  • Frequent contributors or those needing extensive edits should set up the docs locally and request a php.net account. This involves creating a directory, cloning the docs, and configuring SVN keywords.
  • Contributions include bug fixes, translations, expanding existing content, documenting undocumented features, and general improvements.

Why Contribute?

PHP, being open-source, thrives on community involvement. Increased participation benefits everyone. Whether it's improving documentation, fixing bugs, or adding features, every contribution counts. Active participation deepens your PHP knowledge and allows you to request a php.net account, shaping the language's future.

Understanding PHP's Documentation

The documentation is in DocBook XML. Prior knowledge isn't strictly necessary; the XML syntax is easily learned.

The directory structure is:

Contributing to PHP: How to Contribute to PHP's Manual

doc-base contains tools for converting XML documentation. en holds the English documentation (other languages use their two-letter codes). reference contains extension-specific directories (functions for procedural extensions, class-named folders for object-oriented ones). Each extension folder includes book.xml (landing page) and versions.xml (versioning info).

The documentation is currently SVN-based (though migrating to Git). Local setup requires SVN familiarity.

First-Time Contributors

Begin by using the online documentation editor. This allows OAuth login and submission of simple patches. Consistent account use simplifies tracking contributions for future php.net account applications.

Familiarize yourself with style guidelines before submitting patches.

Example: Resolving Bug #71716

This bug reports an incorrectly namespaced MongoDB Client class in a sample. After verification, use the online editor to correct the namespace.

Video Embed: https://www.php.cn/link/14aa36297925d3c82891d74fa28d7df1 (Replace with actual embed code if needed)

Local Setup

The online editor is limited; for more substantial contributions, set up the docs locally and request a php.net account.

  1. Create a phpdocs directory.
  2. Clone the docs using SVN: svn checkout https://svn.php.net/repository/phpdoc/modules/doc-en
  3. Clone PhD (rendering tool): git clone http://git.php.net/repository/phd.git
  4. Clone the php.net website: git clone http://git.php.net/repository/web/php.git web-php; remove web-php/manual/en and create a symbolic link to the rendered docs.
  5. Configure SVN Keywords in ~/.subversion/config: *.xml = svn:eol-style=native;svn:keywords=Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
  6. (Optional) Create a ref file with commands for validation, building, and viewing docs locally.

Docs Workflow (Local)

After setup, update repositories (svn up and git pull). Edit the relevant XML file, validate using php ~/phpdocs/doc-en/doc-base/configure.php, build with PhD, and start the local server. Commit changes using SVN (svn ci -m "Resolve doc bug #..."), referencing the bug number. Close the bug report from the "Developer" tab after changes propagate.

Requesting a php.net Account

After local setup, request a php.net account with docs karma. While no strict prerequisites exist, demonstrating active contribution is key. Submit the account request form and email phpdoc@lists.php.net explaining your intentions, wiki username, and past contributions.

Documentation Tasks

Beyond bug fixes:

  • Translations
  • Expanding partially documented material
  • Documenting undocumented features
  • General improvements

General Tips

  • Follow style guidelines.
  • Check related aspects when fixing bugs.
  • Write concisely.
  • Separate example code from output.
  • Ensure correct page order.
  • Remove PHP 4 references.
  • Properly version new files.
  • Consult the docs FAQ or php-docs mailing list for assistance.

Conclusion

This part covered two workflows: online editor and local setup. Part two will cover contributing to PHP's core.

FAQs (moved to the end for better flow)

  • Contributing process: Create an account, edit/create content, translate, follow guidelines.
  • Importance of contribution: Improves documentation quality, keeps it up-to-date, fosters community.
  • Ensuring acceptance: Follow guidelines, ensure accuracy and clarity, get feedback.
  • Non-native English speakers: Contributions are welcome; translation is a valuable contribution.
  • Common mistakes: Not following guidelines, inaccurate/unclear info, lack of proofreading, unnecessary changes.
  • Getting help: Use online forums, discussion groups, documentation guidelines.
  • Anonymous contribution: Possible, but an account is encouraged.
  • Contribution frequency: Varies based on availability and interest.
  • Compensation: Generally volunteer work.
  • Reporting mistakes: Correct them if a contributor, otherwise report to the community.

Remember to replace the placeholder image URLs with the actual image URLs. I've preserved the image formatting and kept the images in their original positions as requested.

The above is the detailed content of Contributing to PHP: How to Contribute to PHP's Manual. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Working with Flash Session Data in LaravelWorking with Flash Session Data in LaravelMar 12, 2025 pm 05:08 PM

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

cURL in PHP: How to Use the PHP cURL Extension in REST APIscURL in PHP: How to Use the PHP cURL Extension in REST APIsMar 14, 2025 am 11:42 AM

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Simplified HTTP Response Mocking in Laravel TestsSimplified HTTP Response Mocking in Laravel TestsMar 12, 2025 pm 05:09 PM

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

12 Best PHP Chat Scripts on CodeCanyon12 Best PHP Chat Scripts on CodeCanyonMar 13, 2025 pm 12:08 PM

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

Explain the concept of late static binding in PHP.Explain the concept of late static binding in PHP.Mar 21, 2025 pm 01:33 PM

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

PHP Logging: Best Practices for PHP Log AnalysisPHP Logging: Best Practices for PHP Log AnalysisMar 10, 2025 pm 02:32 PM

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

HTTP Method Verification in LaravelHTTP Method Verification in LaravelMar 05, 2025 pm 04:14 PM

Laravel simplifies HTTP verb handling in incoming requests, streamlining diverse operation management within your applications. The method() and isMethod() methods efficiently identify and validate request types. This feature is crucial for building

Discover File Downloads in Laravel with Storage::downloadDiscover File Downloads in Laravel with Storage::downloadMar 06, 2025 am 02:22 AM

The Storage::download method of the Laravel framework provides a concise API for safely handling file downloads while managing abstractions of file storage. Here is an example of using Storage::download() in the example controller:

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft