diff --git a/.github/workflows/check-whitespace.yml b/.github/workflows/check-whitespace.yml deleted file mode 100644 index 91c5e6419562..000000000000 --- a/.github/workflows/check-whitespace.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: check-whitespace - -# Get the repository with all commits to ensure that we can analyze -# all of the commits contributed via the Pull Request. -# Process `git log --check` output to extract just the check errors. -# Exit with failure upon white-space issues. - -on: - pull_request: - types: [opened, synchronize] - -permissions: - contents: read - -jobs: - check-whitespace: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - run: | - git config --global user.name "check-whitespace" - git config --global user.email "check-whitespace@example.com" - - run: git checkout ${{github.event.pull_request.base.sha}} - - run: git merge --squash ${{github.event.pull_request.head.sha}} - - run: git commit -m "Squashed" - - run: git log --check HEAD^..HEAD diff --git a/.github/workflows/docbook-cs.yml b/.github/workflows/docbook-cs.yml new file mode 100644 index 000000000000..e98c3ae79b34 --- /dev/null +++ b/.github/workflows/docbook-cs.yml @@ -0,0 +1,94 @@ +# https://docs.github.com/en/actions + +name: "DocBook Lint" + +on: + push: + branches: + - "master" + pull_request: + branches: + - "master" + +permissions: + contents: "read" + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + docbook-cs: + name: "DocBook Style Check" + runs-on: "ubuntu-latest" + + strategy: + matrix: + language: + - "en" + + steps: + - name: "Checkout php/doc-${{ matrix.language }}" + uses: "actions/checkout@v6" + with: + ref: "${{ github.event.pull_request.head.sha }}" + path: "${{ matrix.language }}" + fetch-depth: 50 + + - name: "Checkout php/doc-base" + uses: "actions/checkout@v6" + with: + path: "doc-base" + repository: "php/doc-base" + + - name: "Fetch base branch with merge-base" + working-directory: "${{ matrix.language }}" + run: | + git fetch origin ${{ github.base_ref }} --depth=50 + # Deepen until we find the merge-base (handles long-lived PRs) + for i in 1 2 3 4 5; do + if git merge-base origin/${{ github.base_ref }} HEAD >/dev/null 2>&1; then + break + fi + git fetch --deepen=100 origin ${{ github.base_ref }} + done + + - name: "Setup PHP" + uses: "shivammathur/setup-php@v2" + with: + php-version: "8.5" + extensions: "dom, libxml, simplexml" + tools: composer:v2, cs2pr:^1.8 + + - name: "Build documentation" + run: | + php doc-base/configure.php \ + --disable-libxml-check \ + --enable-xml-details \ + --redirect-stderr-to-stdout \ + --with-lang=${{ matrix.language }} + + - name: "Install docbook-cs" + working-directory: "${{ matrix.language }}" + run: composer require jordikroon/docbook-cs:^1.1 + + - name: "Run docbook-cs with diff" + working-directory: "${{ matrix.language }}" + run: | + set -o pipefail + git diff origin/${{ github.base_ref }}...HEAD | vendor/bin/docbook-cs \ + --report=checkstyle \ + --diff \ + --no-colors > docbook-report.xml || true + + - name: "Upload report" + if: ${{ ! cancelled() }} + uses: "actions/upload-artifact@v7" + with: + name: "docbook-report" + path: "${{ matrix.language }}/docbook-report.xml" + + - name: "Annotate PR with violations" + if: ${{ ! cancelled() }} + working-directory: "${{ matrix.language }}" + run: cs2pr docbook-report.xml --colorize --prepend-filename diff --git a/docbookcs.xml b/docbookcs.xml new file mode 100644 index 000000000000..714c2a9f2a3f --- /dev/null +++ b/docbookcs.xml @@ -0,0 +1,38 @@ + + + + + en + doc-base + + + + + + + + + + + . + + + + contributors.ent + extensions.ent + language-defs.ent + language-snippets.ent + ../doc-base/entities/ + ../doc-base/temp/file-entities.ent + ../doc-base/temp/file-entities + + + + */wkhtmltox/bits/* + output/* + + + diff --git a/faq/com.xml b/faq/com.xml index 1acfa01097f1..994d5fab8116 100644 --- a/faq/com.xml +++ b/faq/com.xml @@ -1,24 +1,23 @@ - + PHP and COM PHP and COM - PHP can be used to access COM and DCOM objects on Win32 platforms. + This should be simpara - I have built a DLL to calculate something. Is there any way to run this DLL under PHP? + This also should be simpara - If this is a simple DLL there is no way yet to run it from PHP. If the DLL contains a COM - server you may be able to access it if it implements the IDispatch interface. + Also this should not be a ValueError. diff --git a/faq/databases.xml b/faq/databases.xml index ea36a71202df..b7cf01bb0b6d 100644 --- a/faq/databases.xml +++ b/faq/databases.xml @@ -5,17 +5,15 @@ Database issues - This section holds common questions about relation between - PHP and databases. Yes, PHP can access virtually any - database available today. + This file has been changed. - - I heard it's possible to access Microsoft SQL Server from PHP. How? - + + This also, but it's correct + diff --git a/faq/installation.xml b/faq/installation.xml index fc4d80ba2c7a..2be6954a5ba4 100644 --- a/faq/installation.xml +++ b/faq/installation.xml @@ -1,6 +1,6 @@ - + Installation Installation diff --git a/install/pecl.xml b/install/pecl.xml index caa04ed9b13c..e3e1806218fc 100644 --- a/install/pecl.xml +++ b/install/pecl.xml @@ -3,7 +3,7 @@ Installation of PECL extensions - + Introduction to PECL Installations &pecl.moving.to.pie; @@ -12,7 +12,7 @@ PEAR packaging system. This section of the manual is intended to demonstrate how to obtain and - install PECL extensions. + install PECL extensions. These instructions assume /path/to/php/src/dir/ is the