You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by rs...@apache.org on 2026/04/06 15:39:29 UTC

(avro) branch revert-3716-branch-1.12 created (now fb529e424b)

This is an automated email from the ASF dual-hosted git repository.

rskraba pushed a change to branch revert-3716-branch-1.12
in repository https://gitbox.apache.org/repos/asf/avro.git


      at fb529e424b Revert "AVRO-4189: [Java] Use ClassUtils.forName() in FastReaderBuilder for c…"

This branch includes the following new commits:

     new fb529e424b Revert "AVRO-4189: [Java] Use ClassUtils.forName() in FastReaderBuilder for c…"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(avro) 01/01: Revert "AVRO-4189: [Java] Use ClassUtils.forName() in FastReaderBuilder for c…"

Posted by rs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rskraba pushed a commit to branch revert-3716-branch-1.12
in repository https://gitbox.apache.org/repos/asf/avro.git

commit fb529e424bbbfeadc41d9a844225fcfcb85b03c3
Author: Ryan Skraba <ry...@aiven.io>
AuthorDate: Mon Apr 6 17:39:19 2026 +0200

    Revert "AVRO-4189: [Java] Use ClassUtils.forName() in FastReaderBuilder for c…"
    
    This reverts commit 3adf73b622f74ab070848cc59c251efd2d4c8482.
---
 .github/workflows/codeql-csharp-analysis.yml       |   10 +-
 .github/workflows/codeql-java-analysis.yml         |    6 +-
 .github/workflows/codeql-js-analysis.yml           |    8 +-
 .github/workflows/codeql-py-analysis.yml           |    8 +-
 .github/workflows/deploy-docs.yml                  |   67 +-
 .github/workflows/java-publish-snapshot.yml        |    4 +-
 .github/workflows/labeler.yml                      |    3 +-
 .github/workflows/maven4.yml                       |    6 +-
 .github/workflows/rat.yml                          |    4 +-
 .github/workflows/spotless.yml                     |    4 +-
 .github/workflows/test-docker.yml                  |    2 +-
 .github/workflows/test-lang-c++.yml                |    2 +-
 .github/workflows/test-lang-c.yml                  |    8 +-
 .github/workflows/test-lang-csharp.yml             |   12 +-
 .github/workflows/test-lang-java.yml               |   12 +-
 .github/workflows/test-lang-js.yml                 |   14 +-
 .github/workflows/test-lang-perl.yml               |    6 +-
 .github/workflows/test-lang-php.yml                |   37 +-
 .github/workflows/test-lang-py.yml                 |   10 +-
 .github/workflows/test-lang-ruby.yml               |   10 +-
 LICENSE.txt                                        |  170 ++
 NOTICE.txt                                         |   30 +-
 composer.json                                      |   13 +-
 doc/assets/scss/_styles_project.scss               |   27 -
 .../++version++/Getting started (Java)/_index.md   |   14 +-
 .../docs/1.12.0/Getting started (Java)/_index.md   |    2 +-
 doc/content/en/docs/_index.md                      |    2 +-
 doc/package-lock.json                              |  916 ----------
 doc/package.json                                   |    4 +-
 lang/c++/CMakeLists.txt                            |   34 +-
 lang/c++/cmake/avro-cpp-config.cmake.in            |   10 +-
 lang/c++/cmake/avro-cpp.pc.in                      |   32 -
 lang/c++/impl/BinaryDecoder.cc                     |    4 +-
 .../c++/include/avro/buffer/detail/BufferDetail.hh |    7 +
 .../avro/buffer/detail/BufferDetailIterator.hh     |   18 +
 lang/c++/test/CodecTests.cc                        |   35 -
 lang/c++/test/buffertest.cc                        |   99 +-
 lang/c/CMakeLists.txt                              |    4 +-
 lang/c/src/codec.c                                 |    3 -
 lang/c/src/datafile.c                              |   12 -
 lang/c/src/encoding_binary.c                       |   12 -
 lang/c/src/value-json.c                            |   11 +-
 lang/c/tests/test_avro_data.c                      |    8 +-
 lang/csharp/common.props                           |    2 +-
 lang/csharp/src/apache/test/NuGetPackageTests.cs   |  156 --
 lang/csharp/versions.props                         |   22 +-
 .../java/org/apache/avro/file/DataFileStream.java  |    5 +-
 .../java/org/apache/avro/io/FastReaderBuilder.java |    5 +-
 .../org/apache/avro/TestDataFileCorruption.java    |    5 +-
 .../avro/io/TestFastReaderBuilderClassLoading.java |  120 --
 .../avro/util/TestClassSecurityValidator.java      |   23 -
 .../org/apache/avro/ipc/jetty/StaticServlet.java}  |   45 +-
 .../org/apache/avro/ipc/jetty/StatsServer.java     |   41 +-
 .../avro/ipc/stats/static/jquery-1.6.3.min.js      |    4 +
 .../avro/ipc/stats/static/jquery-3.7.1.min.js      |    2 -
 .../apache/avro/ipc/stats/templates/statsview.vm   |    2 +-
 lang/java/pom.xml                                  |   34 +-
 lang/js/lib/schemas.js                             |   21 +-
 lang/js/test/test_schemas.js                       |  161 --
 lang/php/.gitignore                                |    2 -
 lang/php/.php-cs-fixer.dist.php                    |  103 --
 lang/php/README.md                                 |    4 +-
 lang/php/build.sh                                  |   17 +-
 lang/php/examples/write_read.php                   |    6 +-
 lang/php/lib/Avro.php                              |   38 +-
 lang/php/lib/AvroDebug.php                         |   86 +-
 lang/php/lib/AvroException.php                     |    1 +
 lang/php/lib/AvroGMP.php                           |  117 +-
 lang/php/lib/AvroIO.php                            |   55 +-
 lang/php/lib/AvroNotImplementedException.php       |    1 +
 lang/php/lib/AvroUtil.php                          |   11 +-
 lang/php/lib/DataFile/AvroDataIO.php               |  110 +-
 lang/php/lib/DataFile/AvroDataIOException.php      |    1 +
 lang/php/lib/DataFile/AvroDataIOReader.php         |  265 ++-
 lang/php/lib/DataFile/AvroDataIOWriter.php         |  244 ++-
 lang/php/lib/Datum/AvroIOBinaryDecoder.php         |  203 ++-
 lang/php/lib/Datum/AvroIOBinaryEncoder.php         |  112 +-
 lang/php/lib/Datum/AvroIODatumReader.php           |  549 +++---
 lang/php/lib/Datum/AvroIODatumWriter.php           |  218 +--
 lang/php/lib/Datum/AvroIOSchemaMatchException.php  |   14 +-
 lang/php/lib/Datum/AvroIOTypeException.php         |    2 +
 lang/php/lib/Datum/Type/AvroDuration.php           |  111 --
 lang/php/lib/IO/AvroFile.php                       |   86 +-
 lang/php/lib/IO/AvroIOException.php                |    1 +
 lang/php/lib/IO/AvroStringIO.php                   |  176 +-
 lang/php/lib/Protocol/AvroProtocol.php             |   81 +-
 lang/php/lib/Protocol/AvroProtocolMessage.php      |   57 +-
 lang/php/lib/Schema/AvroAliasedSchema.php          |   32 -
 lang/php/lib/Schema/AvroArraySchema.php            |   44 +-
 lang/php/lib/Schema/AvroEnumSchema.php             |   33 +-
 lang/php/lib/Schema/AvroField.php                  |  229 +--
 lang/php/lib/Schema/AvroFixedSchema.php            |   91 +-
 lang/php/lib/Schema/AvroLogicalType.php            |  136 --
 lang/php/lib/Schema/AvroMapSchema.php              |   47 +-
 lang/php/lib/Schema/AvroName.php                   |  120 +-
 lang/php/lib/Schema/AvroNamedSchema.php            |   69 +-
 lang/php/lib/Schema/AvroNamedSchemata.php          |   94 +-
 lang/php/lib/Schema/AvroPrimitiveSchema.php        |   87 +-
 lang/php/lib/Schema/AvroRecordSchema.php           |  138 +-
 lang/php/lib/Schema/AvroSchema.php                 |  468 ++---
 lang/php/lib/Schema/AvroSchemaParseException.php   |    1 +
 lang/php/lib/Schema/AvroUnionSchema.php            |   60 +-
 lang/php/lib/autoload.php                          |   72 +-
 lang/php/phpstan-baseline.neon                     |  148 --
 lang/php/phpstan.neon                              |   25 -
 lang/php/phpunit.xml                               |   55 +-
 lang/php/test/DataFileTest.php                     |  266 ++-
 lang/php/test/DatumIOTest.php                      |  519 ++----
 lang/php/test/FloatIntEncodingTest.php             |  543 +++---
 lang/php/test/IODatumReaderTest.php                |  291 +--
 lang/php/test/InterOpTest.php                      |   41 +-
 lang/php/test/LongEncodingTest.php                 |  259 ++-
 lang/php/test/NameTest.php                         |   62 +-
 lang/php/test/ProtocolFileTest.php                 |  790 ++++----
 lang/php/test/SchemaTest.php                       | 1902 ++++++--------------
 lang/php/test/StringIOTest.php                     |   18 +-
 lang/php/test/generate_interop_data.php            |   15 +-
 lang/php/test/test_helper.php                      |   10 +-
 lang/py/avro/tether/tether_task.py                 |    2 +-
 pom.xml                                            |   24 +-
 share/docker/Dockerfile                            |    2 +-
 121 files changed, 3892 insertions(+), 7820 deletions(-)

diff --git a/.github/workflows/codeql-csharp-analysis.yml b/.github/workflows/codeql-csharp-analysis.yml
index fae5659a9c..d0d32893b5 100644
--- a/.github/workflows/codeql-csharp-analysis.yml
+++ b/.github/workflows/codeql-csharp-analysis.yml
@@ -53,7 +53,7 @@ jobs:
 
     steps:
     - name: Checkout repository
-      uses: actions/checkout@v6
+      uses: actions/checkout@v5
       with:
         # We must fetch at least the immediate parents so that if this is
         # a pull request then we can checkout the head.
@@ -61,7 +61,7 @@ jobs:
 
     # Install .NET SDKs
     - name: Install .NET SDKs
-      uses: actions/setup-dotnet@v5
+      uses: actions/setup-dotnet@v4
       with:
         dotnet-version: |
           6.0.x
@@ -70,7 +70,7 @@ jobs:
 
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
-      uses: github/codeql-action/init@v4
+      uses: github/codeql-action/init@v3
       with:
         languages: ${{ matrix.language }}
         # If you wish to specify custom queries, you can do so here or in a config file.
@@ -82,7 +82,7 @@ jobs:
     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
     # If this step fails, then you should remove it and run the build manually (see below)
     - name: Autobuild
-      uses: github/codeql-action/autobuild@v4
+      uses: github/codeql-action/autobuild@v3
 
     # ℹ️ Command-line programs to run using the OS shell.
     # 📚 https://git.io/JvXDl
@@ -92,4 +92,4 @@ jobs:
     #    uses a compiled language
 
     - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v4
+      uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/codeql-java-analysis.yml b/.github/workflows/codeql-java-analysis.yml
index be599d935d..17b1aafa40 100644
--- a/.github/workflows/codeql-java-analysis.yml
+++ b/.github/workflows/codeql-java-analysis.yml
@@ -53,7 +53,7 @@ jobs:
 
     steps:
     - name: Checkout repository
-      uses: actions/checkout@v6
+      uses: actions/checkout@v5
       with:
         # We must fetch at least the immediate parents so that if this is
         # a pull request then we can checkout the head.
@@ -61,7 +61,7 @@ jobs:
 
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
-      uses: github/codeql-action/init@v4
+      uses: github/codeql-action/init@v3
       with:
         languages: ${{ matrix.language }}
         # If you wish to specify custom queries, you can do so here or in a config file.
@@ -100,4 +100,4 @@ jobs:
       run: mvn clean test
 
     - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v4
+      uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/codeql-js-analysis.yml b/.github/workflows/codeql-js-analysis.yml
index 453b926b16..3288af0855 100644
--- a/.github/workflows/codeql-js-analysis.yml
+++ b/.github/workflows/codeql-js-analysis.yml
@@ -53,7 +53,7 @@ jobs:
 
     steps:
     - name: Checkout repository
-      uses: actions/checkout@v6
+      uses: actions/checkout@v5
       with:
         # We must fetch at least the immediate parents so that if this is
         # a pull request then we can checkout the head.
@@ -61,7 +61,7 @@ jobs:
 
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
-      uses: github/codeql-action/init@v4
+      uses: github/codeql-action/init@v3
       with:
         languages: ${{ matrix.language }}
         # If you wish to specify custom queries, you can do so here or in a config file.
@@ -73,7 +73,7 @@ jobs:
     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
     # If this step fails, then you should remove it and run the build manually (see below)
     - name: Autobuild
-      uses: github/codeql-action/autobuild@v4
+      uses: github/codeql-action/autobuild@v3
 
     # ℹ️ Command-line programs to run using the OS shell.
     # 📚 https://git.io/JvXDl
@@ -83,4 +83,4 @@ jobs:
     #    uses a compiled language
 
     - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v4
+      uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/codeql-py-analysis.yml b/.github/workflows/codeql-py-analysis.yml
index ea7567656a..81ebcc405d 100644
--- a/.github/workflows/codeql-py-analysis.yml
+++ b/.github/workflows/codeql-py-analysis.yml
@@ -53,7 +53,7 @@ jobs:
 
     steps:
     - name: Checkout repository
-      uses: actions/checkout@v6
+      uses: actions/checkout@v5
       with:
         # We must fetch at least the immediate parents so that if this is
         # a pull request then we can checkout the head.
@@ -61,7 +61,7 @@ jobs:
 
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
-      uses: github/codeql-action/init@v4
+      uses: github/codeql-action/init@v3
       with:
         languages: ${{ matrix.language }}
         # If you wish to specify custom queries, you can do so here or in a config file.
@@ -73,7 +73,7 @@ jobs:
     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
     # If this step fails, then you should remove it and run the build manually (see below)
     - name: Autobuild
-      uses: github/codeql-action/autobuild@v4
+      uses: github/codeql-action/autobuild@v3
 
     # ℹ️ Command-line programs to run using the OS shell.
     # 📚 https://git.io/JvXDl
@@ -83,4 +83,4 @@ jobs:
     #    uses a compiled language
 
     - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v4
+      uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
index 836fea9df6..d6d9c72237 100644
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -48,11 +48,11 @@ jobs:
       - name: Install Dart Sass
         run: sudo snap install dart-sass
       - name: Checkout
-        uses: actions/checkout@v6
+        uses: actions/checkout@v5
 
       - name: Install Node.js dependencies
         working-directory: doc/
-        run: npm ci
+        run: ls -lah && npm ci
       - name: Build with Hugo
         working-directory: doc/
         env:
@@ -65,7 +65,7 @@ jobs:
             --minify \
             --destination ${{ runner.temp }}/website \
             --baseURL "/"
-      - uses: actions/upload-artifact@v7
+      - uses: actions/upload-artifact@v4
         with:
           name: website
           path: ${{ runner.temp }}/website
@@ -75,7 +75,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v6
+        uses: actions/checkout@v5
 
       - name: Build C docs
         run: |
@@ -84,7 +84,7 @@ jobs:
           sudo apt-get install -q -y cmake liblzma-dev libsnappy-dev libjansson-dev zlib1g-dev pkg-config asciidoc source-highlight libsource-highlight-dev
           cd lang/c
           ./build.sh clean docs
-      - uses: actions/upload-artifact@v7
+      - uses: actions/upload-artifact@v4
         with:
           name: api-c
           path: build/c/docs
@@ -94,7 +94,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v6
+        uses: actions/checkout@v5
 
       - name: Build C++ docs
         run: |
@@ -103,7 +103,7 @@ jobs:
           sudo apt-get install -q -y gcc g++ libboost-all-dev cmake doxygen
           cd lang/c++
           ./build.sh clean doc
-      - uses: actions/upload-artifact@v7
+      - uses: actions/upload-artifact@v4
         with:
           name: api-c++
           path: lang/c++/doc/html
@@ -113,7 +113,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v6
+        uses: actions/checkout@v5
 
       - name: Build C# docs
         run: |
@@ -125,7 +125,7 @@ jobs:
           cd lang/csharp
           mkdir -p build/doc
           doxygen Avro.dox
-      - uses: actions/upload-artifact@v7
+      - uses: actions/upload-artifact@v4
         with:
           name: api-csharp
           path: lang/csharp/build/doc/html
@@ -135,16 +135,16 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v6
+        uses: actions/checkout@v5
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
           restore-keys: |
             ${{ runner.os }}-maven-
-
+      
       - name: 'Setup Maven'
         uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
         with:
@@ -164,7 +164,7 @@ jobs:
           set -x
           cd lang/java
           ./build.sh dist
-      - uses: actions/upload-artifact@v7
+      - uses: actions/upload-artifact@v4
         with:
           name: api-java
           path: lang/java/target/reports/apidocs
@@ -174,21 +174,21 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v6
+        uses: actions/checkout@v5
 
       - name: Setup Python
-        uses: actions/setup-python@v6
+        uses: actions/setup-python@v5
         with:
           python-version: 3.11
 
-      - name: Setup uv
-        uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867
+      - name: Install tox
+        run: python3 -m pip install tox
 
       - name: Build docs
         working-directory: lang/py
         run: ./build.sh doc
 
-      - uses: actions/upload-artifact@v7
+      - uses: actions/upload-artifact@v4
         with:
           name: api-python
           path: lang/py/docs/build/
@@ -198,12 +198,12 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v6
+        uses: actions/checkout@v5
         with:
           repository: 'apache/avro-rs'
 
       - name: Rust Toolchain
-        uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
+        uses: dtolnay/rust-toolchain@stable
         with:
           toolchain: stable
 
@@ -211,11 +211,11 @@ jobs:
         run: |
           set -x
           cargo doc --all-features
-      - uses: actions/upload-artifact@v7
+      - uses: actions/upload-artifact@v4
         with:
           name: api-rust
           path: target/doc
-
+        
 
   push-website:
     name: Push website
@@ -223,7 +223,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v6
+        uses: actions/checkout@v5
         with:
           fetch-depth: 0
 
@@ -231,46 +231,46 @@ jobs:
         run: |
           set -x
           sudo apt-get update -q
-          sudo apt-get install -q -y subversion
+          sudo apt-get install -q -y subversion  
 
       - name: Download website
-        uses: actions/download-artifact@v8
+        uses: actions/download-artifact@v5
         with:
           name: website
           path: ${{ runner.temp }}/website
 
       - name: Download api-c
-        uses: actions/download-artifact@v8
+        uses: actions/download-artifact@v5
         with:
           name: api-c
           path: api-c
 
       - name: Download api-c++
-        uses: actions/download-artifact@v8
+        uses: actions/download-artifact@v5
         with:
           name: api-c++
           path: api-c++
 
       - name: Download api-csharp
-        uses: actions/download-artifact@v8
+        uses: actions/download-artifact@v5
         with:
           name: api-csharp
           path: api-csharp
 
       - name: Download api-java
-        uses: actions/download-artifact@v8
+        uses: actions/download-artifact@v5
         with:
           name: api-java
           path: api-java
 
       - name: Download api-python
-        uses: actions/download-artifact@v8
+        uses: actions/download-artifact@v5
         with:
           name: api-python
           path: api-python
 
       - name: Download api-rust
-        uses: actions/download-artifact@v8
+        uses: actions/download-artifact@v5
         with:
           name: api-rust
           path: api-rust
@@ -288,7 +288,7 @@ jobs:
           mv api-java/* $WEBSITE_API/java/
           mv api-python/* $WEBSITE_API/py/
           mv api-rust/* $WEBSITE_API/rust/
-          rmdir api-c api-c++ api-csharp api-python api-rust api-java
+          rmdir api-c api-c++ api-csharp api-python api-rust api-java 
 
       - name: Checkout old docs versions from Subversion
         run: |
@@ -310,7 +310,7 @@ jobs:
 
           git rm -rf *
 
-          mv ${{ runner.temp }}/website/* .
+          mv ${{ runner.temp }}/website/* . 
           echo "publish:
                   whoami: asf-site
                 " > .asf.yaml
@@ -320,3 +320,4 @@ jobs:
           git switch asf-site
           git reset --hard asf-site-staging
           git push origin asf-site --force
+          
diff --git a/.github/workflows/java-publish-snapshot.yml b/.github/workflows/java-publish-snapshot.yml
index c20d218e19..37edc1af43 100644
--- a/.github/workflows/java-publish-snapshot.yml
+++ b/.github/workflows/java-publish-snapshot.yml
@@ -33,10 +33,10 @@ jobs:
   publish-snapshot:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 4288359194..53280443d2 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -26,6 +26,7 @@ jobs:
       pull-requests: write
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/labeler@v6
+    - uses: actions/labeler@v5
       with:
+        repo-token: "${{ secrets.GITHUB_TOKEN }}"
         sync-labels: true
diff --git a/.github/workflows/maven4.yml b/.github/workflows/maven4.yml
index f19c6dcd35..a02a141f33 100644
--- a/.github/workflows/maven4.yml
+++ b/.github/workflows/maven4.yml
@@ -32,10 +32,10 @@ jobs:
   maven4:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -43,7 +43,7 @@ jobs:
             ${{ runner.os }}-maven-
 
       - name: Cache Maven 4 Build Cache
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/build-cache
           key: ${{ runner.os }}-maven-build-cache-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/rat.yml b/.github/workflows/rat.yml
index b5f885ff4e..77081a8a41 100644
--- a/.github/workflows/rat.yml
+++ b/.github/workflows/rat.yml
@@ -29,10 +29,10 @@ jobs:
   rat:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/spotless.yml b/.github/workflows/spotless.yml
index 34c7656860..814903abbc 100644
--- a/.github/workflows/spotless.yml
+++ b/.github/workflows/spotless.yml
@@ -32,10 +32,10 @@ jobs:
   spotless:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml
index da7baedabb..347fa916e8 100644
--- a/.github/workflows/test-docker.yml
+++ b/.github/workflows/test-docker.yml
@@ -31,7 +31,7 @@ jobs:
   test:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Run Docker tests
         shell: bash
diff --git a/.github/workflows/test-lang-c++.yml b/.github/workflows/test-lang-c++.yml
index 88b1d4ab55..4936ab59e7 100644
--- a/.github/workflows/test-lang-c++.yml
+++ b/.github/workflows/test-lang-c++.yml
@@ -41,7 +41,7 @@ jobs:
           - ubuntu-latest
           - ubuntu-24.04-arm
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Install Dependencies
         run: sudo apt update && sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev libfmt-dev zlib1g-dev libzstd-dev cmake
diff --git a/.github/workflows/test-lang-c.yml b/.github/workflows/test-lang-c.yml
index 7bbbfcb11f..6e65c85766 100644
--- a/.github/workflows/test-lang-c.yml
+++ b/.github/workflows/test-lang-c.yml
@@ -41,7 +41,7 @@ jobs:
           - ubuntu-latest
           - ubuntu-24.04-arm
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Install Dependencies
         run: sudo apt-get update && sudo apt-get install -qqy libjansson-dev libsnappy-dev
@@ -61,7 +61,7 @@ jobs:
           pkg-config --libs avro-c
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -109,7 +109,7 @@ jobs:
           - ubuntu-latest
           - ubuntu-24.04-arm
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Install Dependencies
         run: |
@@ -121,7 +121,7 @@ jobs:
                                                             libzstd-dev
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/test-lang-csharp.yml b/.github/workflows/test-lang-csharp.yml
index 8ed0d4c22e..3a076c15c0 100644
--- a/.github/workflows/test-lang-csharp.yml
+++ b/.github/workflows/test-lang-csharp.yml
@@ -41,21 +41,21 @@ jobs:
           - ubuntu-latest
           - ubuntu-24.04-arm
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Add libzstd
         shell: bash
         run: sudo apt-get install -y libzstd-dev
 
       - name: Install .NET SDKs
-        uses: actions/setup-dotnet@v5
+        uses: actions/setup-dotnet@v4
         with:
           dotnet-version: |
             6.0.x
             7.0.x
             8.0.x
 
-      - uses: actions/cache@v5
+      - uses: actions/cache@v4
         with:
           path: ~/.nuget/packages
           key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -76,14 +76,14 @@ jobs:
           - ubuntu-latest
           - ubuntu-24.04-arm
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Add libzstd
         shell: bash
         run: sudo apt-get install -y libzstd-dev
 
       - name: Install .NET SDKs
-        uses: actions/setup-dotnet@v5
+        uses: actions/setup-dotnet@v4
         with:
           dotnet-version: |
             6.0.x
@@ -91,7 +91,7 @@ jobs:
             8.0.x
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/test-lang-java.yml b/.github/workflows/test-lang-java.yml
index 4fdb25947c..adf4e2b794 100644
--- a/.github/workflows/test-lang-java.yml
+++ b/.github/workflows/test-lang-java.yml
@@ -44,10 +44,10 @@ jobs:
           - ubuntu-24.04-arm
     steps:
       - name: 'Checkout sourcecode'
-        uses: actions/checkout@v6
+        uses: actions/checkout@v5
 
       - name: 'Cache Local Maven Repository'
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -92,10 +92,10 @@ jobs:
           - ubuntu-24.04-arm
 
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: 'Cache Local Maven Repository'
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -117,7 +117,7 @@ jobs:
           maven-version: 3.9.6
 
       - name: 'Setup Python for Generating Input Data'
-        uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
+        uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
         with:
           python-version: '3.12'
 
@@ -135,7 +135,7 @@ jobs:
           python3 -m pip install --break-system-packages python-snappy zstandard
 
       - name: 'Setup C# for Generating Interop Data'
-        uses: actions/setup-dotnet@v5
+        uses: actions/setup-dotnet@v4
         with:
           dotnet-version: |
             6.0.x
diff --git a/.github/workflows/test-lang-js.yml b/.github/workflows/test-lang-js.yml
index 69e6abe082..b173be4fb8 100644
--- a/.github/workflows/test-lang-js.yml
+++ b/.github/workflows/test-lang-js.yml
@@ -45,13 +45,13 @@ jobs:
           - 14
           - 16
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
       - name: Setup Node
-        uses: actions/setup-node@v6
+        uses: actions/setup-node@v4
         with:
           node-version: ${{ matrix.node }}
 
-      - uses: actions/cache@v5
+      - uses: actions/cache@v4
         with:
           path: ~/.npm
           key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -76,13 +76,13 @@ jobs:
           - 14
           - 16
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
       - name: Setup Node
-        uses: actions/setup-node@v6
+        uses: actions/setup-node@v4
         with:
           node-version: ${{ matrix.node }}
 
-      - uses: actions/cache@v5
+      - uses: actions/cache@v4
         with:
           path: ~/.npm
           key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -90,7 +90,7 @@ jobs:
             ${{ runner.os }}-node-
 
       - name: Setup Python for Generating Input Data
-        uses: actions/setup-python@v6
+        uses: actions/setup-python@v5
 
       - name: Apt Install Compression Libs Required by Python
         run: |
diff --git a/.github/workflows/test-lang-perl.yml b/.github/workflows/test-lang-perl.yml
index c41020cf91..96a042335f 100644
--- a/.github/workflows/test-lang-perl.yml
+++ b/.github/workflows/test-lang-perl.yml
@@ -43,7 +43,7 @@ jobs:
         perl:
           - '5.32'
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - uses: shogo82148/actions-setup-perl@v1
         with:
@@ -81,7 +81,7 @@ jobs:
         perl:
           - '5.32'
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - uses: shogo82148/actions-setup-perl@v1
         with:
@@ -106,7 +106,7 @@ jobs:
                                                        Try::Tiny
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/test-lang-php.yml b/.github/workflows/test-lang-php.yml
index 0bd44a3270..374223b6df 100644
--- a/.github/workflows/test-lang-php.yml
+++ b/.github/workflows/test-lang-php.yml
@@ -22,7 +22,6 @@ on:
     branches: [ main ]
     paths:
     - .github/workflows/test-lang-php.yml
-    - composer.json
     - lang/php/**
 
 defaults:
@@ -42,26 +41,24 @@ jobs:
           - ubuntu-latest
           - ubuntu-24.04-arm
         php:
-          - '8.1'
-          - '8.2'
-          - '8.3'
-          - '8.4'
-          - '8.5'
+          - '7.3'
+          - '7.4'
+          - '8.0'
 
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Setup PHP
         uses: shivammathur/setup-php@v2
         with:
           php-version: ${{ matrix.php }}
-          tools: composer:2.9.3
+          tools: composer:2.2.5
 
       - name: Get Composer Cache Directory
         id: composer-cache
         run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
 
-      - uses: actions/cache@v5
+      - uses: actions/cache@v4
         with:
           path: ${{ steps.composer-cache.outputs.dir }}
           key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -69,12 +66,8 @@ jobs:
             ${{ runner.os }}-composer-
 
       - name: Lint
-        if: matrix.php == '8.1'
         run: ./build.sh lint
 
-      - name: Static analysis
-        run: ./build.sh phpstan
-
       - name: Test
         run: ./build.sh test
 
@@ -86,23 +79,21 @@ jobs:
           - ubuntu-latest
           - ubuntu-24.04-arm
         php:
-          - '8.1'
-          - '8.2'
-          - '8.3'
-          - '8.4'
-          - '8.5'
+          - '7.3'
+          - '7.4'
+          - '8.0'
 
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Setup PHP
         uses: shivammathur/setup-php@v2
         with:
           php-version: ${{ matrix.php }}
-          tools: composer:2.9.3
+          tools: composer:2.2.5
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -136,7 +127,7 @@ jobs:
         working-directory: lang/java/avro
         run: mvn -B -P interop-data-generate generate-resources
 
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
         with:
           repository: kjdev/php-ext-zstd
           path: lang/php/php-ext-zstd
@@ -152,7 +143,7 @@ jobs:
           echo "extension=zstd.so" | sudo tee -a /etc/php/${{ matrix.php }}/cli/conf.d/10-zstd.ini
           php -m
 
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
         with:
           repository: kjdev/php-ext-snappy
           path: lang/php/php-ext-snappy
diff --git a/.github/workflows/test-lang-py.yml b/.github/workflows/test-lang-py.yml
index f1255744ce..717b75173b 100644
--- a/.github/workflows/test-lang-py.yml
+++ b/.github/workflows/test-lang-py.yml
@@ -51,10 +51,10 @@ jobs:
           - 'pypy-3.10'
 
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Setup Python
-        uses: actions/setup-python@v6
+        uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python }}
 
@@ -100,10 +100,10 @@ jobs:
           - 'pypy-3.10'
 
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - name: Setup Python
-        uses: actions/setup-python@v6
+        uses: actions/setup-python@v5
         with:
           python-version: ${{ matrix.python }}
 
@@ -122,7 +122,7 @@ jobs:
           python3 -m pip install python-snappy zstandard
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
diff --git a/.github/workflows/test-lang-ruby.yml b/.github/workflows/test-lang-ruby.yml
index 764511e139..2be066b983 100644
--- a/.github/workflows/test-lang-ruby.yml
+++ b/.github/workflows/test-lang-ruby.yml
@@ -47,7 +47,7 @@ jobs:
           - '3.2'
           - '3.3'
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - uses: ruby/setup-ruby@v1
         with:
@@ -56,7 +56,7 @@ jobs:
       - name: Install Dependencies
         run: sudo apt-get update && sudo apt-get install -qqy libsnappy-dev
 
-      - uses: actions/cache@v5
+      - uses: actions/cache@v4
         with:
           path: .gem
           key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
@@ -90,7 +90,7 @@ jobs:
           - '3.2'
           - '3.3'
     steps:
-      - uses: actions/checkout@v6
+      - uses: actions/checkout@v5
 
       - uses: ruby/setup-ruby@v1
         with:
@@ -99,7 +99,7 @@ jobs:
       - name: Install Dependencies
         run: sudo apt-get update && sudo apt-get install -qqy libsnappy-dev
 
-      - uses: actions/cache@v5
+      - uses: actions/cache@v4
         with:
           path: .gem
           key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
@@ -110,7 +110,7 @@ jobs:
         run: bundle config path .gem
 
       - name: Cache Local Maven Repository
-        uses: actions/cache@v5
+        uses: actions/cache@v4
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
diff --git a/LICENSE.txt b/LICENSE.txt
index 99c377d4aa..42761f6f81 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -201,6 +201,37 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
+----------------------------------------------------------------------
+License for the Jansson C JSON parser used in the C implementation:
+
+Copyright (c) 2009-2011 Petri Lehtinen <pe...@digip.org>
+
+Some files include an additional copyright notice:
+* lang/c/jansson/src/pack_unpack.c
+  Copyright (c) 2011 Graeme Smecher <gr...@mail.mcgill.ca>
+* lang/c/jansson/test/suites/api/test_unpack.c
+  Copyright (c) 2011 Graeme Smecher <gr...@mail.mcgill.ca>
+* lang/c/jansson/src/memory.c
+  Copyright (c) 2011 Basile Starynkevitch  <ba...@starynkevitch.net>
+
+| Permission is hereby granted, free of charge, to any person obtaining a copy
+| of this software and associated documentation files (the "Software"), to deal
+| in the Software without restriction, including without limitation the rights
+| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+| copies of the Software, and to permit persons to whom the Software is
+| furnished to do so, subject to the following conditions:
+|
+| The above copyright notice and this permission notice shall be included in
+| all copies or substantial portions of the Software.
+|
+| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+| THE SOFTWARE.
+
 ----------------------------------------------------------------------
 License for msinttypes.h and msstdint.h used in the C implementation:
 Source from:
@@ -264,6 +295,145 @@ Copyright (C) 2006 Toni Ronkko
 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 | OTHER DEALINGS IN THE SOFTWARE.
 
+----------------------------------------------------------------------
+License for NUnit binary included with the C# implementation:
+File: nunit.framework.dll
+
+| NUnit License
+|
+| Copyright © 2002-2015 Charlie Poole
+| Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
+| Copyright © 2000-2002 Philip A. Craig
+|
+| This software is provided 'as-is', without any express or implied warranty. In
+| no event will the authors be held liable for any damages arising from the use
+| of this software.
+|
+| Permission is granted to anyone to use this software for any purpose, including
+| commercial applications, and to alter it and redistribute it freely, subject to
+| the following restrictions:
+|
+| The origin of this software must not be misrepresented; you must not claim that
+| you wrote the original software. If you use this software in a product, an
+| acknowledgment (see the following) in the product documentation is required. 
+|
+| Portions Copyright © 2002-2012 Charlie Poole or Copyright © 2002-2004 James W.
+| Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002 Philip A.
+| Craig 
+|
+| Altered source versions must be plainly marked as such, and must not be
+| misrepresented as being the original software. 
+|
+| This notice may not be removed or altered from any source distribution.
+| License Note
+|
+| This license is based on the open source zlib/libpng license. The idea was to
+| keep the license as simple as possible to encourage use of NUnit in free and
+| commercial applications and libraries, but to keep the source code together and
+| to give credit to the NUnit contributors for their efforts. While this license
+| allows shipping NUnit in source and binary form, if shipping a NUnit variant is
+| the sole purpose of your product, please let us know.
+
+----------------------------------------------------------------------
+License for the Json.NET binary included with the C# implementation:
+File: Newtonsoft.Json.dll
+
+Copyright (c) 2007 James Newton-King
+
+| Permission is hereby granted, free of charge, to any person obtaining
+| a copy of this software and associated documentation files (the
+| "Software"), to deal in the Software without restriction, including
+| without limitation the rights to use, copy, modify, merge, publish,
+| distribute, sublicense, and/or sell copies of the Software, and to
+| permit persons to whom the Software is furnished to do so, subject to
+| the following conditions:
+|
+| The above copyright notice and this permission notice shall be
+| included in all copies or substantial portions of the Software.
+|
+| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----------------------------------------------------------------------
+License for the Castle Core binary included with the C# implementation:
+File: Castle.Core.dll
+
+Copyright (c) 2004-2015 Castle Project
+
+License: Apache License version 2.0 (see above)
+URL: https://opensource.org/licenses/Apache-2.0
+
+----------------------------------------------------------------------
+License for the log4net binary included with the C# implementation:
+File: log4net.dll
+
+Copyright 2004-2015 The Apache Software Foundation.
+
+License: Apache License version 2.0 (see above)
+
+----------------------------------------------------------------------
+License for the m4 macros used by the C++ implementation:
+
+Files:
+* lang/c++/m4/m4_ax_boost_system.m4
+  Copyright (c) 2008 Thomas Porschberg <th...@randspringer.de>
+  Copyright (c) 2008 Michael Tindal
+  Copyright (c) 2008 Daniel Casimiro <da...@gmail.com>
+* lang/c++/m4/m4_ax_boost_asio.m4
+  Copyright (c) 2008 Thomas Porschberg <th...@randspringer.de>
+  Copyright (c) 2008 Pete Greenwell <pe...@mu.org>
+* lang/c++/m4/m4_ax_boost_filesystem.m4
+  Copyright (c) 2009 Thomas Porschberg <th...@randspringer.de>
+  Copyright (c) 2009 Michael Tindal
+  Copyright (c) 2009 Roman Rybalko <li...@romanr.info>
+* lang/c++/m4/m4_ax_boost_thread.m4
+  Copyright (c) 2009 Thomas Porschberg <th...@randspringer.de>
+  Copyright (c) 2009 Michael Tindal
+* lang/c++/m4/m4_ax_boost_regex.m4
+  Copyright (c) 2008 Thomas Porschberg <th...@randspringer.de>
+  Copyright (c) 2008 Michael Tindal
+* lang/c++/m4/m4_ax_boost_base.m4
+  Copyright (c) 2008 Thomas Porschberg <th...@randspringer.de>
+
+License text:
+| Copying and distribution of this file, with or without modification, are
+| permitted in any medium without royalty provided the copyright notice
+| and this notice are preserved. This file is offered as-is, without any
+| warranty.
+
+----------------------------------------------------------------------
+License for the AVRO_BOOT_NO_TRAIT code in the C++ implementation:
+File: lang/c++/api/Boost.hh
+
+| Boost Software License - Version 1.0 - August 17th, 2003
+|
+| Permission is hereby granted, free of charge, to any person or organization
+| obtaining a copy of the software and accompanying documentation covered by
+| this license (the "Software") to use, reproduce, display, distribute,
+| execute, and transmit the Software, and to prepare derivative works of the
+| Software, and to permit third-parties to whom the Software is furnished to
+| do so, all subject to the following:
+|
+| The copyright notices in the Software and this entire statement, including
+| the above license grant, this restriction and the following disclaimer,
+| must be included in all copies of the Software, in whole or in part, and
+| all derivative works of the Software, unless such copies or derivative
+| works are solely in the form of machine-executable object code generated by
+| a source language processor.
+|
+| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+| FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+| SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+| FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+| ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+| DEALINGS IN THE SOFTWARE.
+
 ----------------------------------------------------------------------
 License for jquery.tipsy.js, tipsy.js, and tipsy.css used by the Java IPC implementation:
 
diff --git a/NOTICE.txt b/NOTICE.txt
index cd9dd5de0d..41fa8b76b6 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,9 +1,37 @@
 Apache Avro
-Copyright 2010-2025 The Apache Software Foundation
+Copyright 2010-2019 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (https://www.apache.org/).
 
+NUnit license acknowledgement:
+
+| Portions Copyright © 2002-2012 Charlie Poole or Copyright © 2002-2004 James
+| W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002
+| Philip A. Craig 
+
+Based upon the representations of upstream licensors, it is understood that
+portions of the mapreduce API included in the Java implementation are licensed
+from various contributors under one or more contributor license agreements to
+Odiago, Inc. and were then contributed by Odiago to Apache Avro, which has now
+made them available under the Apache 2.0 license. The original file header text
+is:
+
+| Licensed to Odiago, Inc. under one or more contributor license
+| agreements.  See the NOTICE file distributed with this work for
+| additional information regarding copyright ownership.  Odiago, Inc.
+| licenses this file to you under the Apache License, Version 2.0
+| (the "License"); you may not use this file except in compliance
+| with the License.  You may obtain a copy of the License at
+|
+|     https://www.apache.org/licenses/LICENSE-2.0
+|
+| Unless required by applicable law or agreed to in writing, software
+| distributed under the License is distributed on an "AS IS" BASIS,
+| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+| implied.  See the License for the specific language governing
+| permissions and limitations under the License.
+
 The Odiago NOTICE at the time of the contribution:
 
 | This product includes software developed by Odiago, Inc.
diff --git a/composer.json b/composer.json
index 5a32cad340..adcd2180fc 100644
--- a/composer.json
+++ b/composer.json
@@ -23,21 +23,20 @@
     "issues": "https://issues.apache.org/jira/browse/AVRO"
   },
   "require": {
-    "php": "^8.1"
+    "php": "^7.1 || ^8.0"
   },
   "deps": [
-    "vendor/phpunit/phpunit"
+    "vendor/phpunit/phpunit",
+    "vendor/squizlabs/php_codesniffer"
   ],
   "require-dev": {
-    "phpunit/phpunit": "^10.5",
+    "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+    "squizlabs/php_codesniffer": "3.*",
     "php-mock/php-mock-phpunit": "^2.10",
     "ext-json": "*",
     "ext-xml": "*",
     "ext-curl": "*",
-    "ext-pcntl": "*",
-    "rector/rector": "^2.2",
-    "friendsofphp/php-cs-fixer": "^3.89",
-    "phpstan/phpstan": "^2.1"
+    "ext-pcntl": "*"
   },
   "autoload": {
     "psr-4": {
diff --git a/doc/assets/scss/_styles_project.scss b/doc/assets/scss/_styles_project.scss
index ec1ca5926d..b69a1eb167 100644
--- a/doc/assets/scss/_styles_project.scss
+++ b/doc/assets/scss/_styles_project.scss
@@ -33,30 +33,3 @@
 .navbar-brand {
   font-family: "PT Mono", monospace;
 }
-
-@media (max-width: 992px) {
-
-  footer .row {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-  }
-
-  footer .row > div {
-    width: 100%;
-    max-width: 100%;
-    text-align: center;
-    margin-bottom: 1.25rem;
-  }
-
-  footer ul.list-inline {
-    display: flex;
-    justify-content: center;
-    flex-wrap: wrap;
-  }
-
-  footer ul.list-inline li {
-    margin: 0.4rem;
-  }
-}
-
diff --git a/doc/content/en/docs/++version++/Getting started (Java)/_index.md b/doc/content/en/docs/++version++/Getting started (Java)/_index.md
index 44aeae4767..c2470518ba 100644
--- a/doc/content/en/docs/++version++/Getting started (Java)/_index.md	
+++ b/doc/content/en/docs/++version++/Getting started (Java)/_index.md	
@@ -1,6 +1,6 @@
 ---
 categories: []
-tags: ["java"]
+tags: ["java"] 
 title: "Getting Started (Java)"
 linkTitle: "Getting Started (Java)"
 weight: 2
@@ -74,7 +74,7 @@ As well as the Avro Maven plugin (for performing code generation):
   </configuration>
 </plugin>
 ```
-
+      
 You may also build the required Avro jars from source. Building Avro is beyond the scope of this guide; see the Build Documentation page in the wiki for more information.
 
 ## Defining a schema
@@ -92,7 +92,7 @@ Avro schemas are defined using JSON or IDL (the latter requires an extra depende
  ]
 }
 ```
-
+      
 This schema defines a record representing a hypothetical user. (Note that a schema file can only contain a single schema definition.) At minimum, a record definition must include its type ("type": "record"), a name ("name": "User"), and fields, in this case name, favorite_number, and favorite_color. We also define a namespace ("namespace": "example.avro"), which together with the name attribute defines the "full name" of the schema (example.avro.User in this case).
 
 Fields are defined via an array of objects, each of which defines a name and type (other attributes are optional, see the record specification for more details). The type attribute of a field is another schema object, which can be either a primitive or complex type. For example, the name field of our User schema is the primitive type string, whereas the favorite_number and favorite_color fields are both unions, represented by JSON arrays. unions are a complex type that can be any of the  [...]
@@ -174,7 +174,7 @@ user = dataFileReader.next(user);
 System.out.println(user);
 }
 ```
-
+        
 This snippet will output:
 
 ```json
@@ -200,10 +200,10 @@ In release 1.9.0, we introduced a new approach to generating code that speeds up
 
 $ mvn -q exec:java -Dexec.mainClass=example.SpecificMain \
     -Dorg.apache.avro.specific.use_custom_coders=true
-
+        
 Note that you do not have to recompile your Avro schema to have access to this feature. The feature is compiled and built into your code, and you turn it on and off at runtime using the feature flag. As a result, you can turn it on during testing, for example, and then off in production. Or you can turn it on in production, and quickly turn it off if something breaks.
 
-We encourage the Avro community to exercise this new feature early to help build confidence. (For those paying on demand for compute resources in the cloud, it can lead to meaningful cost savings.) As confidence builds, we will turn this feature on by default, and eventually eliminate the feature flag (and the old code).
+We encourage the Avro community to exercise this new feature early to help build confidence. (For those paying one-demand for compute resources in the cloud, it can lead to meaningful cost savings.) As confidence builds, we will turn this feature on by default, and eventually eliminate the feature flag (and the old code).
 
 ## Serializing and deserializing without code generation
 Data in Avro is always stored with its corresponding schema, meaning we can always read a serialized item regardless of whether we know the schema ahead of time. This allows us to perform serialization and deserialization without code generation.
@@ -277,7 +277,7 @@ This outputs:
 {"name": "Alyssa", "favorite_number": 256, "favorite_color": null}
 {"name": "Ben", "favorite_number": 7, "favorite_color": "red"}
 ```
-
+        
 Deserializing is very similar to serializing. We create a GenericDatumReader, analogous to the GenericDatumWriter we used in serialization, which converts in-memory serialized items into GenericRecords. We pass the DatumReader and the previously created File to a DataFileReader, analogous to the DataFileWriter, which reads both the schema used by the writer as well as the data from the file on disk. The data will be read using the writer's schema included in the file, and the reader's sc [...]
 
 Next, we use the DataFileReader to iterate through the serialized users and print the deserialized object to stdout. Note how we perform the iteration: we create a single GenericRecord object which we store the current deserialized user in, and pass this record object to every call of dataFileReader.next. This is a performance optimization that allows the DataFileReader to reuse the same record object rather than allocating a new GenericRecord for every iteration, which can be very expen [...]
diff --git a/doc/content/en/docs/1.12.0/Getting started (Java)/_index.md b/doc/content/en/docs/1.12.0/Getting started (Java)/_index.md
index adf77dd359..c402268539 100644
--- a/doc/content/en/docs/1.12.0/Getting started (Java)/_index.md	
+++ b/doc/content/en/docs/1.12.0/Getting started (Java)/_index.md	
@@ -201,7 +201,7 @@ $ mvn -q exec:java -Dexec.mainClass=example.SpecificMain \
         
 Note that you do not have to recompile your Avro schema to have access to this feature. The feature is compiled and built into your code, and you turn it on and off at runtime using the feature flag. As a result, you can turn it on during testing, for example, and then off in production. Or you can turn it on in production, and quickly turn it off if something breaks.
 
-We encourage the Avro community to exercise this new feature early to help build confidence. (For those paying on demand for compute resources in the cloud, it can lead to meaningful cost savings.) As confidence builds, we will turn this feature on by default, and eventually eliminate the feature flag (and the old code).
+We encourage the Avro community to exercise this new feature early to help build confidence. (For those paying one-demand for compute resources in the cloud, it can lead to meaningful cost savings.) As confidence builds, we will turn this feature on by default, and eventually eliminate the feature flag (and the old code).
 
 ## Serializing and deserializing without code generation
 Data in Avro is always stored with its corresponding schema, meaning we can always read a serialized item regardless of whether we know the schema ahead of time. This allows us to perform serialization and deserialization without code generation.
diff --git a/doc/content/en/docs/_index.md b/doc/content/en/docs/_index.md
index db24f656ee..ac7cba47bb 100755
--- a/doc/content/en/docs/_index.md
+++ b/doc/content/en/docs/_index.md
@@ -39,7 +39,7 @@ Avro provides:
 
 ## Schemas
 
-Avro relies on schemas. When Avro data is read, the schema used when writing it is always present. This permits each datum to be written with no per-value overhead, making serialization both fast and small. This also facilitates use with dynamic, scripting languages, since data, together with its schema, is fully self-describing.
+Avro relies on schemas. When Avro data is read, the schema used when writing it is always present. This permits each datum to be written with no per-value overheads, making serialization both fast and small. This also facilitates use with dynamic, scripting languages, since data, together with its schema, is fully self-describing.
 
 When Avro data is stored in a file, its schema is stored with it, so that files may be processed later by any program. If the program reading the data expects a different schema this can be easily resolved, since both schemas are present.
 
diff --git a/doc/package-lock.json b/doc/package-lock.json
deleted file mode 100644
index fe0beb6098..0000000000
--- a/doc/package-lock.json
+++ /dev/null
@@ -1,916 +0,0 @@
-{
-  "name": "doc",
-  "lockfileVersion": 3,
-  "requires": true,
-  "packages": {
-    "": {
-      "devDependencies": {
-        "autoprefixer": "^10.4.27",
-        "postcss": "^8.5.8",
-        "postcss-cli": "^11.0.1"
-      }
-    },
-    "node_modules/ansi-regex": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
-      "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/ansi-styles": {
-      "version": "4.3.0",
-      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-convert": "^2.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
-      }
-    },
-    "node_modules/anymatch": {
-      "version": "3.1.3",
-      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
-      "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "normalize-path": "^3.0.0",
-        "picomatch": "^2.0.4"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
-    "node_modules/autoprefixer": {
-      "version": "10.4.27",
-      "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.27.tgz",
-      "integrity": "sha512-NP9APE+tO+LuJGn7/9+cohklunJsXWiaWEfV3si4Gi/XHDwVNgkwr1J3RQYFIvPy76GmJ9/bW8vyoU1LcxwKHA==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/postcss/"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/autoprefixer"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "browserslist": "^4.28.1",
-        "caniuse-lite": "^1.0.30001774",
-        "fraction.js": "^5.3.4",
-        "picocolors": "^1.1.1",
-        "postcss-value-parser": "^4.2.0"
-      },
-      "bin": {
-        "autoprefixer": "bin/autoprefixer"
-      },
-      "engines": {
-        "node": "^10 || ^12 || >=14"
-      },
-      "peerDependencies": {
-        "postcss": "^8.1.0"
-      }
-    },
-    "node_modules/baseline-browser-mapping": {
-      "version": "2.9.11",
-      "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.11.tgz",
-      "integrity": "sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==",
-      "dev": true,
-      "license": "Apache-2.0",
-      "bin": {
-        "baseline-browser-mapping": "dist/cli.js"
-      }
-    },
-    "node_modules/binary-extensions": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
-      "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/braces": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
-      "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "fill-range": "^7.1.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/browserslist": {
-      "version": "4.28.1",
-      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz",
-      "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/browserslist"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/browserslist"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "baseline-browser-mapping": "^2.9.0",
-        "caniuse-lite": "^1.0.30001759",
-        "electron-to-chromium": "^1.5.263",
-        "node-releases": "^2.0.27",
-        "update-browserslist-db": "^1.2.0"
-      },
-      "bin": {
-        "browserslist": "cli.js"
-      },
-      "engines": {
-        "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
-      }
-    },
-    "node_modules/caniuse-lite": {
-      "version": "1.0.30001775",
-      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001775.tgz",
-      "integrity": "sha512-s3Qv7Lht9zbVKE9XoTyRG6wVDCKdtOFIjBGg3+Yhn6JaytuNKPIjBMTMIY1AnOH3seL5mvF+x33oGAyK3hVt3A==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/browserslist"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "CC-BY-4.0"
-    },
-    "node_modules/chokidar": {
-      "version": "3.6.0",
-      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
-      "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "anymatch": "~3.1.2",
-        "braces": "~3.0.2",
-        "glob-parent": "~5.1.2",
-        "is-binary-path": "~2.1.0",
-        "is-glob": "~4.0.1",
-        "normalize-path": "~3.0.0",
-        "readdirp": "~3.6.0"
-      },
-      "engines": {
-        "node": ">= 8.10.0"
-      },
-      "funding": {
-        "url": "https://paulmillr.com/funding/"
-      },
-      "optionalDependencies": {
-        "fsevents": "~2.3.2"
-      }
-    },
-    "node_modules/cliui": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
-      "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "string-width": "^4.2.0",
-        "strip-ansi": "^6.0.1",
-        "wrap-ansi": "^7.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/color-convert": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-name": "~1.1.4"
-      },
-      "engines": {
-        "node": ">=7.0.0"
-      }
-    },
-    "node_modules/color-name": {
-      "version": "1.1.4",
-      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
-      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/dependency-graph": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-1.0.0.tgz",
-      "integrity": "sha512-cW3gggJ28HZ/LExwxP2B++aiKxhJXMSIt9K48FOXQkm+vuG5gyatXnLsONRJdzO/7VfjDIiaOOa/bs4l464Lwg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/electron-to-chromium": {
-      "version": "1.5.267",
-      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz",
-      "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==",
-      "dev": true,
-      "license": "ISC"
-    },
-    "node_modules/emoji-regex": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
-      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/escalade": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
-      "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/fill-range": {
-      "version": "7.1.1",
-      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
-      "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "to-regex-range": "^5.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/fraction.js": {
-      "version": "5.3.4",
-      "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
-      "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": "*"
-      },
-      "funding": {
-        "type": "github",
-        "url": "https://github.com/sponsors/rawify"
-      }
-    },
-    "node_modules/fs-extra": {
-      "version": "11.3.2",
-      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz",
-      "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "graceful-fs": "^4.2.0",
-        "jsonfile": "^6.0.1",
-        "universalify": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=14.14"
-      }
-    },
-    "node_modules/fsevents": {
-      "version": "2.3.3",
-      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
-      "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
-      "dev": true,
-      "hasInstallScript": true,
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "darwin"
-      ],
-      "engines": {
-        "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
-      }
-    },
-    "node_modules/get-caller-file": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
-      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
-      "dev": true,
-      "license": "ISC",
-      "engines": {
-        "node": "6.* || 8.* || >= 10.*"
-      }
-    },
-    "node_modules/glob-parent": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
-      "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "is-glob": "^4.0.1"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/graceful-fs": {
-      "version": "4.2.11",
-      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
-      "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
-      "dev": true,
-      "license": "ISC"
-    },
-    "node_modules/is-binary-path": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
-      "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "binary-extensions": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/is-extglob": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
-      "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/is-fullwidth-code-point": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
-      "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/is-glob": {
-      "version": "4.0.3",
-      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
-      "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "is-extglob": "^2.1.1"
-      },
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/is-number": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
-      "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.12.0"
-      }
-    },
-    "node_modules/jsonfile": {
-      "version": "6.2.0",
-      "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",
-      "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "universalify": "^2.0.0"
-      },
-      "optionalDependencies": {
-        "graceful-fs": "^4.1.6"
-      }
-    },
-    "node_modules/lilconfig": {
-      "version": "3.1.3",
-      "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",
-      "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=14"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/antonk52"
-      }
-    },
-    "node_modules/nanoid": {
-      "version": "3.3.11",
-      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
-      "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "bin": {
-        "nanoid": "bin/nanoid.cjs"
-      },
-      "engines": {
-        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
-      }
-    },
-    "node_modules/node-releases": {
-      "version": "2.0.27",
-      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz",
-      "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/normalize-path": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
-      "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/picocolors": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
-      "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
-      "dev": true,
-      "license": "ISC"
-    },
-    "node_modules/picomatch": {
-      "version": "2.3.2",
-      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
-      "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8.6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/jonschlinkert"
-      }
-    },
-    "node_modules/pify": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
-      "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/postcss": {
-      "version": "8.5.8",
-      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz",
-      "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/postcss/"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/postcss"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "nanoid": "^3.3.11",
-        "picocolors": "^1.1.1",
-        "source-map-js": "^1.2.1"
-      },
-      "engines": {
-        "node": "^10 || ^12 || >=14"
-      }
-    },
-    "node_modules/postcss-cli": {
-      "version": "11.0.1",
-      "resolved": "https://registry.npmjs.org/postcss-cli/-/postcss-cli-11.0.1.tgz",
-      "integrity": "sha512-0UnkNPSayHKRe/tc2YGW6XnSqqOA9eqpiRMgRlV1S6HdGi16vwJBx7lviARzbV1HpQHqLLRH3o8vTcB0cLc+5g==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "chokidar": "^3.3.0",
-        "dependency-graph": "^1.0.0",
-        "fs-extra": "^11.0.0",
-        "picocolors": "^1.0.0",
-        "postcss-load-config": "^5.0.0",
-        "postcss-reporter": "^7.0.0",
-        "pretty-hrtime": "^1.0.3",
-        "read-cache": "^1.0.0",
-        "slash": "^5.0.0",
-        "tinyglobby": "^0.2.12",
-        "yargs": "^17.0.0"
-      },
-      "bin": {
-        "postcss": "index.js"
-      },
-      "engines": {
-        "node": ">=18"
-      },
-      "peerDependencies": {
-        "postcss": "^8.0.0"
-      }
-    },
-    "node_modules/postcss-load-config": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-5.1.0.tgz",
-      "integrity": "sha512-G5AJ+IX0aD0dygOE0yFZQ/huFFMSNneyfp0e3/bT05a8OfPC5FUoZRPfGijUdGOJNMewJiwzcHJXFafFzeKFVA==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/postcss/"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "lilconfig": "^3.1.1",
-        "yaml": "^2.4.2"
-      },
-      "engines": {
-        "node": ">= 18"
-      },
-      "peerDependencies": {
-        "jiti": ">=1.21.0",
-        "postcss": ">=8.0.9",
-        "tsx": "^4.8.1"
-      },
-      "peerDependenciesMeta": {
-        "jiti": {
-          "optional": true
-        },
-        "postcss": {
-          "optional": true
-        },
-        "tsx": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/postcss-reporter": {
-      "version": "7.1.0",
-      "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-7.1.0.tgz",
-      "integrity": "sha512-/eoEylGWyy6/DOiMP5lmFRdmDKThqgn7D6hP2dXKJI/0rJSO1ADFNngZfDzxL0YAxFvws+Rtpuji1YIHj4mySA==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/postcss/"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "picocolors": "^1.0.0",
-        "thenby": "^1.3.4"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "peerDependencies": {
-        "postcss": "^8.1.0"
-      }
-    },
-    "node_modules/postcss-value-parser": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
-      "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/pretty-hrtime": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
-      "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/read-cache": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
-      "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "pify": "^2.3.0"
-      }
-    },
-    "node_modules/readdirp": {
-      "version": "3.6.0",
-      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
-      "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "picomatch": "^2.2.1"
-      },
-      "engines": {
-        "node": ">=8.10.0"
-      }
-    },
-    "node_modules/require-directory": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
-      "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/slash": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz",
-      "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=14.16"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/source-map-js": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
-      "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
-      "dev": true,
-      "license": "BSD-3-Clause",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/string-width": {
-      "version": "4.2.3",
-      "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
-      "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "emoji-regex": "^8.0.0",
-        "is-fullwidth-code-point": "^3.0.0",
-        "strip-ansi": "^6.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/strip-ansi": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
-      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^5.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/thenby": {
-      "version": "1.3.4",
-      "resolved": "https://registry.npmjs.org/thenby/-/thenby-1.3.4.tgz",
-      "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==",
-      "dev": true,
-      "license": "Apache-2.0"
-    },
-    "node_modules/tinyglobby": {
-      "version": "0.2.15",
-      "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
-      "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "fdir": "^6.5.0",
-        "picomatch": "^4.0.3"
-      },
-      "engines": {
-        "node": ">=12.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/SuperchupuDev"
-      }
-    },
-    "node_modules/tinyglobby/node_modules/fdir": {
-      "version": "6.5.0",
-      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
-      "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=12.0.0"
-      },
-      "peerDependencies": {
-        "picomatch": "^3 || ^4"
-      },
-      "peerDependenciesMeta": {
-        "picomatch": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/tinyglobby/node_modules/picomatch": {
-      "version": "4.0.4",
-      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
-      "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/jonschlinkert"
-      }
-    },
-    "node_modules/to-regex-range": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
-      "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "is-number": "^7.0.0"
-      },
-      "engines": {
-        "node": ">=8.0"
-      }
-    },
-    "node_modules/universalify": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
-      "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 10.0.0"
-      }
-    },
-    "node_modules/update-browserslist-db": {
-      "version": "1.2.3",
-      "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
-      "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/browserslist"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/browserslist"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "escalade": "^3.2.0",
-        "picocolors": "^1.1.1"
-      },
-      "bin": {
-        "update-browserslist-db": "cli.js"
-      },
-      "peerDependencies": {
-        "browserslist": ">= 4.21.0"
-      }
-    },
-    "node_modules/wrap-ansi": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
-      "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^4.0.0",
-        "string-width": "^4.1.0",
-        "strip-ansi": "^6.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
-      }
-    },
-    "node_modules/y18n": {
-      "version": "5.0.8",
-      "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
-      "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
-      "dev": true,
-      "license": "ISC",
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/yaml": {
-      "version": "2.8.1",
-      "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz",
-      "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==",
-      "dev": true,
-      "license": "ISC",
-      "bin": {
-        "yaml": "bin.mjs"
-      },
-      "engines": {
-        "node": ">= 14.6"
-      }
-    },
-    "node_modules/yargs": {
-      "version": "17.7.2",
-      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
-      "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "cliui": "^8.0.1",
-        "escalade": "^3.1.1",
-        "get-caller-file": "^2.0.5",
-        "require-directory": "^2.1.1",
-        "string-width": "^4.2.3",
-        "y18n": "^5.0.5",
-        "yargs-parser": "^21.1.1"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/yargs-parser": {
-      "version": "21.1.1",
-      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
-      "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
-      "dev": true,
-      "license": "ISC",
-      "engines": {
-        "node": ">=12"
-      }
-    }
-  }
-}
diff --git a/doc/package.json b/doc/package.json
index 7de6984829..5da2cbee3a 100644
--- a/doc/package.json
+++ b/doc/package.json
@@ -1,7 +1,7 @@
 {
   "devDependencies": {
-    "autoprefixer": "^10.4.27",
-    "postcss": "^8.5.8",
+    "autoprefixer": "^10.4.21",
+    "postcss": "^8.5.6",
     "postcss-cli": "^11.0.1"
   }
 }
diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt
index 71fe832510..6800d330f3 100644
--- a/lang/c++/CMakeLists.txt
+++ b/lang/c++/CMakeLists.txt
@@ -16,7 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-cmake_minimum_required (VERSION 3.20)
+cmake_minimum_required (VERSION 3.12)
 
 set (CMAKE_LEGACY_CYGWIN_WIN32 0)
 
@@ -70,6 +70,7 @@ if (WIN32 AND NOT CYGWIN AND NOT MSYS)
     add_definitions (/EHa)
     add_definitions (
         -DNOMINMAX
+        -DBOOST_SYSTEM_DYN_LINK
         -DBOOST_ALL_NO_LIB)
 endif()
 
@@ -79,11 +80,12 @@ endif ()
 
 if (AVRO_BUILD_TESTS OR AVRO_USE_BOOST)
     # Boost 1.70 and above provide a BoostConfig.cmake package configuration file.
+    # It guarantees that Boost::system target exists if found.
     # See https://cmake.org/cmake/help/latest/policy/CMP0167.html
-    find_package (Boost 1.70 REQUIRED CONFIG)
+    find_package (Boost 1.70 REQUIRED CONFIG COMPONENTS system)
 endif ()
 
-find_package(fmt QUIET)
+find_package(fmt)
 if (NOT fmt_FOUND)
     include(FetchContent)
     FetchContent_Declare(
@@ -151,9 +153,11 @@ function (setup_avro_lib target lib_type)
       $<BUILD_INTERFACE:ZLIB::ZLIB>
       $<BUILD_INTERFACE:$<TARGET_NAME_IF_EXISTS:Snappy::snappy>>
       $<$<BOOL:${zstd_FOUND}>:$<BUILD_INTERFACE:$<TARGET_NAME_IF_EXISTS:${ZSTD_TARGET}>>>
+      $<BUILD_INTERFACE:$<TARGET_NAME_IF_EXISTS:Boost::system>>
       $<INSTALL_INTERFACE:ZLIB::ZLIB>
       $<INSTALL_INTERFACE:$<TARGET_NAME_IF_EXISTS:Snappy::snappy>>
       $<$<BOOL:${zstd_FOUND}>:$<INSTALL_INTERFACE:$<TARGET_NAME_IF_EXISTS:${ZSTD_TARGET}>>>
+      $<INSTALL_INTERFACE:$<TARGET_NAME_IF_EXISTS:Boost::system>>
     )
     target_include_directories (${target} PUBLIC
       $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
@@ -222,7 +226,7 @@ if (AVRO_BUILD_TESTS)
 
     macro (unittest name)
         add_executable (${name} test/${name}.cc)
-        target_link_libraries (${name} ${AVRO_LINK_LIB} ZLIB::ZLIB $<TARGET_NAME_IF_EXISTS:Snappy::snappy> $<$<BOOL:${zstd_FOUND}>:$<TARGET_NAME_IF_EXISTS:${ZSTD_TARGET}>>)
+        target_link_libraries (${name} ${AVRO_LINK_LIB} Boost::system ZLIB::ZLIB $<TARGET_NAME_IF_EXISTS:Snappy::snappy> $<$<BOOL:${zstd_FOUND}>:$<TARGET_NAME_IF_EXISTS:${ZSTD_TARGET}>>)
         add_test (NAME ${name} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
             COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name})
     endmacro (unittest)
@@ -254,7 +258,6 @@ if (AVRO_BUILD_TESTS)
 endif ()
 
 include (InstallRequiredSystemLibraries)
-include (GNUInstallDirs)
 
 set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}")
 
@@ -265,13 +268,13 @@ install (TARGETS ${AVRO_INSTALL_LIBS}
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-    INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+    INCLUDES DESTINATION include)
 
 if (AVRO_BUILD_EXECUTABLES)
     install (TARGETS avrogencpp EXPORT avrocpp_targets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 endif ()
 
-install (DIRECTORY include/avro DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+install (DIRECTORY include/avro DESTINATION include
     FILES_MATCHING PATTERN *.hh)
 
 if (NOT CMAKE_BUILD_TYPE)
@@ -290,28 +293,17 @@ write_basic_package_version_file(
 configure_package_config_file(
     "${CMAKE_CURRENT_SOURCE_DIR}/cmake/avro-cpp-config.cmake.in"
     "${CMAKE_CURRENT_BINARY_DIR}/avro-cpp-config.cmake"
-    INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/avro-cpp
+    INSTALL_DESTINATION lib/cmake/avro-cpp
 )
 
 install(EXPORT avrocpp_targets
     NAMESPACE avro-cpp::
-    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/avro-cpp
+    DESTINATION lib/cmake/avro-cpp
     FILE "avro-cpp-targets.cmake"
 )
 
 install(FILES
     "${CMAKE_CURRENT_BINARY_DIR}/avro-cpp-config.cmake"
     "${CMAKE_CURRENT_BINARY_DIR}/avro-cpp-config-version.cmake"
-    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/avro-cpp
-)
-
-cmake_path(APPEND pc_install_includedir "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
-cmake_path(APPEND pc_install_libdir "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}")
-configure_file(
-    "${CMAKE_CURRENT_SOURCE_DIR}/cmake/avro-cpp.pc.in"
-    "${CMAKE_CURRENT_BINARY_DIR}/avro-cpp.pc"
-    @ONLY
-)
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/avro-cpp.pc"
-        DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
+    DESTINATION lib/cmake/avro-cpp
 )
diff --git a/lang/c++/cmake/avro-cpp-config.cmake.in b/lang/c++/cmake/avro-cpp-config.cmake.in
index 5104843f3a..c943f33f8d 100644
--- a/lang/c++/cmake/avro-cpp-config.cmake.in
+++ b/lang/c++/cmake/avro-cpp-config.cmake.in
@@ -43,7 +43,7 @@ if(@Snappy_FOUND@)
     find_dependency(Snappy REQUIRED)
 endif()
 if(@Boost_FOUND@)
-    find_dependency(Boost 1.70 REQUIRED)
+    find_dependency(Boost 1.70 REQUIRED COMPONENTS system)
 endif()
 if(@zstd_FOUND@)
     find_dependency(zstd REQUIRED)
@@ -58,11 +58,7 @@ endif()
 
 include("${CMAKE_CURRENT_LIST_DIR}/avro-cpp-targets.cmake")
 
-if(@AVRO_BUILD_STATIC@)
-  add_library(avro-cpp::avrocpp_static ALIAS avro-cpp::avrocpp_s)
-endif()
-if(@AVRO_BUILD_SHARED@)
-  add_library(avro-cpp::avrocpp_shared ALIAS avro-cpp::avrocpp)
-endif()
+add_library(avro-cpp::avrocpp_static ALIAS avro-cpp::avrocpp_s)
+add_library(avro-cpp::avrocpp_shared ALIAS avro-cpp::avrocpp)
 
 check_required_components(avro-cpp)
diff --git a/lang/c++/cmake/avro-cpp.pc.in b/lang/c++/cmake/avro-cpp.pc.in
deleted file mode 100644
index e37d602f36..0000000000
--- a/lang/c++/cmake/avro-cpp.pc.in
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=${prefix}
-includedir=@pc_install_includedir@
-libdir=@pc_install_libdir@
-
-Name: avro-cpp
-Description: C++ library for parsing Avro data
-URL: https://avro.apache.org/
-License: Apache-2.0
-Version: @AVRO_VERSION@
-
-Cflags: -I${includedir}
-Libs: -L${libdir} -lavrocpp
-Requires: fmt
diff --git a/lang/c++/impl/BinaryDecoder.cc b/lang/c++/impl/BinaryDecoder.cc
index b334de7cf5..a970d60520 100644
--- a/lang/c++/impl/BinaryDecoder.cc
+++ b/lang/c++/impl/BinaryDecoder.cc
@@ -164,13 +164,13 @@ size_t BinaryDecoder::doDecodeItemCount() {
     auto result = doDecodeLong();
     if (result < 0) {
         doDecodeLong();
-        return static_cast<size_t>(-(result + 1)) + 1;
+        return static_cast<size_t>(-result);
     }
     return static_cast<size_t>(result);
 }
 
 size_t BinaryDecoder::arrayNext() {
-    return doDecodeItemCount();
+    return static_cast<size_t>(doDecodeLong());
 }
 
 size_t BinaryDecoder::skipArray() {
diff --git a/lang/c++/include/avro/buffer/detail/BufferDetail.hh b/lang/c++/include/avro/buffer/detail/BufferDetail.hh
index 5ef52a5fa8..56e86c8a22 100644
--- a/lang/c++/include/avro/buffer/detail/BufferDetail.hh
+++ b/lang/c++/include/avro/buffer/detail/BufferDetail.hh
@@ -19,6 +19,9 @@
 #ifndef avro_BufferDetail_hh__
 #define avro_BufferDetail_hh__
 
+#ifdef HAVE_BOOST_ASIO
+#include <boost/asio/buffer.hpp>
+#endif
 #include <cassert>
 #include <deque>
 #include <exception>
@@ -39,6 +42,10 @@ namespace detail {
 
 typedef char data_type;
 typedef size_t size_type;
+#ifdef HAVE_BOOST_ASIO
+typedef boost::asio::const_buffer ConstAsioBuffer;
+typedef boost::asio::mutable_buffer MutableAsioBuffer;
+#endif
 
 /// The size in bytes for blocks backing buffer chunks.
 const size_type kMinBlockSize = 4096;
diff --git a/lang/c++/include/avro/buffer/detail/BufferDetailIterator.hh b/lang/c++/include/avro/buffer/detail/BufferDetailIterator.hh
index d5efbe176c..44e35dd013 100644
--- a/lang/c++/include/avro/buffer/detail/BufferDetailIterator.hh
+++ b/lang/c++/include/avro/buffer/detail/BufferDetailIterator.hh
@@ -57,6 +57,15 @@ struct InputIteratorHelper {
         return iter_->dataSize();
     }
 
+    /// Conversion operator.   It doesn't check for null, because the only
+    /// the only time the chunk should be null is when it's the iterator
+    /// end(), which should never be dereferenced anyway.
+#ifdef HAVE_BOOST_ASIO
+    operator ConstAsioBuffer() const {
+        return ConstAsioBuffer(data(), size());
+    }
+#endif
+
     BufferImpl::ChunkList::const_iterator iter_; ///< the current iterator
 };
 
@@ -86,6 +95,15 @@ struct OutputIteratorHelper {
         return iter_->freeSize();
     }
 
+    /// Conversion operator.   It doesn't check for null, because the only
+    /// the only time the chunk should be null is when it's the iterator
+    /// end(), which should never be dereferenced anyway.
+#ifdef HAVE_BOOST_ASIO
+    operator MutableAsioBuffer() const {
+        return MutableAsioBuffer(data(), size());
+    }
+#endif
+
     BufferImpl::ChunkList::const_iterator iter_; ///< the current iterator
 };
 
diff --git a/lang/c++/test/CodecTests.cc b/lang/c++/test/CodecTests.cc
index 59aa023dbd..fb88877836 100644
--- a/lang/c++/test/CodecTests.cc
+++ b/lang/c++/test/CodecTests.cc
@@ -2100,40 +2100,6 @@ static void testJsonCodecReinit() {
     }
 }
 
-static void testArrayNegativeBlockCount() {
-    // Array of ints [10, 20, 30, 40, 50] encoded with a negative block count
-    // in the second block, which exercises arrayNext().
-    // Per the Avro spec, a negative count means: abs(count) items follow,
-    // preceded by a long byte-size of the block.
-    //
-    // Block 1: count=2, items: 10, 20              (read by arrayStart)
-    // Block 2: count=-3, bytesize=3, items: 30, 40, 50  (read by arrayNext)
-    // Terminal: count=0
-    const uint8_t data[] = {
-        0x04,                    // zigzag(2) = 4: block count = 2
-        0x14, 0x28,             // zigzag ints: 10, 20
-        0x05,                    // zigzag(-3) = 5: block count = -3
-        0x06,                    // zigzag(3) = 6: byte-size of block
-        0x3c, 0x50, 0x64,       // zigzag ints: 30, 40, 50
-        0x00                     // terminal
-    };
-
-    InputStreamPtr is = memoryInputStream(data, sizeof(data));
-    DecoderPtr d = binaryDecoder();
-    d->init(*is);
-
-    std::vector<int32_t> result;
-    for (size_t n = d->arrayStart(); n != 0; n = d->arrayNext()) {
-        for (size_t i = 0; i < n; ++i) {
-            result.push_back(d->decodeInt());
-        }
-    }
-
-    const std::vector<int32_t> expected = {10, 20, 30, 40, 50};
-    BOOST_CHECK_EQUAL_COLLECTIONS(result.begin(), result.end(),
-                                  expected.begin(), expected.end());
-}
-
 static void testByteCount() {
     OutputStreamPtr os1 = memoryOutputStream();
     EncoderPtr e1 = binaryEncoder();
@@ -2159,7 +2125,6 @@ init_unit_test_suite(int, char *[]) {
     ts->add(BOOST_PARAM_TEST_CASE(&avro::testJson, avro::jsonData,
                                   ENDOF(avro::jsonData)));
     ts->add(BOOST_TEST_CASE(avro::testJsonCodecReinit));
-    ts->add(BOOST_TEST_CASE(avro::testArrayNegativeBlockCount));
     ts->add(BOOST_TEST_CASE(avro::testByteCount));
 
     return ts;
diff --git a/lang/c++/test/buffertest.cc b/lang/c++/test/buffertest.cc
index 45634dab7e..23e0e806c2 100644
--- a/lang/c++/test/buffertest.cc
+++ b/lang/c++/test/buffertest.cc
@@ -20,6 +20,9 @@
 
 #include <boost/bind/bind.hpp>
 
+#ifdef HAVE_BOOST_ASIO
+#include <boost/asio.hpp>
+#endif
 #include "buffer/BufferPrint.hh"
 #include "buffer/BufferReader.hh"
 #include "buffer/BufferStream.hh"
@@ -604,46 +607,108 @@ void TestIterator() {
     }
 }
 
-// Historical context: Prior to AVRO-4178, InputBuffer and OutputBuffer iterators
-// had implicit conversion operators to boost::asio::const_buffer and
-// boost::asio::mutable_buffer (via ConstAsioBuffer and MutableAsioBuffer typedefs).
-// These conversions were removed to eliminate the Boost::system dependency.
-// This test demonstrates the recommended workaround: users should access the
-// public data() and size() member functions of the dereferenced iterator instead.
-// These functions provide the same underlying buffer pointer and size information
-// that the ASIO conversions provided, allowing integration with any I/O library.
+#ifdef HAVE_BOOST_ASIO
+void server(boost::barrier &b) {
+    using boost::asio::ip::tcp;
+    boost::asio::io_service io_service;
+    tcp::acceptor a(io_service, tcp::endpoint(tcp::v4(), 33333));
+    tcp::socket sock(io_service);
+    a.listen();
+
+    b.wait();
+
+    a.accept(sock);
+    avro::OutputBuffer buf(100);
+
+    size_t length = sock.receive(buf);
+    buf.wroteTo(length);
+    cout << "Server got " << length << " bytes\n";
+
+    InputBuffer rbuf(buf);
+
+    std::string res;
+
+    avro::InputBuffer::const_iterator iter = rbuf.begin();
+    while (iter != rbuf.end()) {
+        res.append(boost::asio::buffer_cast<const char *>(*iter), boost::asio::buffer_size(*iter));
+        cout << "Received Buffer size: " << boost::asio::buffer_size(*iter) << endl;
+        BOOST_CHECK_EQUAL(length, boost::asio::buffer_size(*iter));
+        cout << "Received Buffer: \"" << res << '"' << endl;
+        ++iter;
+    }
+
+    BOOST_CHECK_EQUAL(res, "hello world");
+}
+
 void TestAsioBuffer() {
+    using boost::asio::ip::tcp;
     BOOST_TEST_MESSAGE("TestAsioBuffer");
     {
+        boost::barrier b(2);
+
+        boost::thread t(boost::bind(server, boost::ref(b)));
+
+        b.wait();
+
+        // set up the thing
+        boost::asio::io_service io_service;
+
+        tcp::resolver resolver(io_service);
+        tcp::resolver::query query(tcp::v4(), "localhost", "33333");
+        tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
+        tcp::resolver::iterator end;
+
+        tcp::socket socket(io_service);
+        boost::system::error_code error = boost::asio::error::host_not_found;
+        while (error && endpoint_iterator != end) {
+            socket.close();
+            socket.connect(*endpoint_iterator++, error);
+        }
+        if (error) {
+            throw error;
+        }
+
         std::string hello = "hello ";
         std::string world = "world";
-
-        // Create a buffer with data
         avro::OutputBuffer buf;
         buf.writeTo(hello.c_str(), hello.size());
 
+        BOOST_CHECK_EQUAL(buf.size(), hello.size());
+
         avro::OutputBuffer buf2;
         buf2.writeTo(world.c_str(), world.size());
+        BOOST_CHECK_EQUAL(buf2.size(), world.size());
 
         buf.append(buf2);
         BOOST_CHECK_EQUAL(buf.size(), hello.size() + world.size());
 
-        // Convert to InputBuffer for reading
+        cout << "Distance " << std::distance(buf.begin(), buf.end()) << endl;
+        BOOST_CHECK_EQUAL(std::distance(buf.begin(), buf.end()), 1);
+
         const avro::InputBuffer rbuf(buf);
 
-        // Demonstrate the workaround: instead of relying on implicit ASIO conversions,
-        // users can access data() and size() directly from the dereferenced iterator.
-        std::string reconstructed;
         avro::InputBuffer::const_iterator iter = rbuf.begin();
         while (iter != rbuf.end()) {
-            reconstructed.append(iter->data(), iter->size());
+            std::string str(boost::asio::buffer_cast<const char *>(*iter), boost::asio::buffer_size(*iter));
+            cout << "Buffer size: " << boost::asio::buffer_size(*iter) << endl;
+            cout << "Buffer: \"" << str << '"' << endl;
             ++iter;
         }
 
-        BOOST_CHECK_EQUAL(reconstructed, "hello world");
-        BOOST_CHECK_EQUAL(reconstructed.size(), rbuf.size());
+        cout << "Buffer size " << rbuf.size() << endl;
+
+        std::size_t wrote = boost::asio::write(socket, rbuf);
+        cout << "Wrote " << wrote << endl;
+        BOOST_CHECK_EQUAL(wrote, rbuf.size());
+
+        t.join();
     }
 }
+#else
+void TestAsioBuffer() {
+    cout << "Skipping asio test\n";
+}
+#endif // HAVE_BOOST_ASIO
 
 void TestSplit() {
     BOOST_TEST_MESSAGE("TestSplit");
diff --git a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt
index 49e2a36bc8..123676b3d8 100644
--- a/lang/c/CMakeLists.txt
+++ b/lang/c/CMakeLists.txt
@@ -179,13 +179,13 @@ set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LZMA_LIBRARIES} ${SNAPPY_LIBRARIES})
 set(CODEC_PKG "${ZLIB_PKG} ${LZMA_PKG} ${SNAPPY_PKG}")
 
 # Jansson JSON library
-pkg_check_modules(JANSSON jansson>=2.7)
+pkg_check_modules(JANSSON jansson>=2.3)
 if (JANSSON_FOUND)
     set(JANSSON_PKG libjansson)
     include_directories(${JANSSON_INCLUDE_DIRS})
     link_directories(${JANSSON_LIBRARY_DIRS})
 else (JANSSON_FOUND)
-    message(FATAL_ERROR "libjansson >=2.7 not found")
+    message(FATAL_ERROR "libjansson >=2.3 not found")
 endif (JANSSON_FOUND)
 
 
diff --git a/lang/c/src/codec.c b/lang/c/src/codec.c
index 176fb21d65..613a914373 100644
--- a/lang/c/src/codec.c
+++ b/lang/c/src/codec.c
@@ -27,9 +27,6 @@
 #  elif defined(_WIN32)
 #    include <stdlib.h>
 #    define __bswap_32 _byteswap_ulong
-#  elif defined(__ANDROID__)
-#    include <byteswap.h>
-#    define __bswap_32 bswap_32
 #  else
 #    include <byteswap.h>
 #  endif
diff --git a/lang/c/src/datafile.c b/lang/c/src/datafile.c
index bbcf69493b..c9d4dfeb68 100644
--- a/lang/c/src/datafile.c
+++ b/lang/c/src/datafile.c
@@ -451,24 +451,12 @@ static int file_read_block_count(avro_file_reader_t r)
 		     "Cannot read file block count: ");
 	check_prefix(rval, enc->read_long(r->reader, &len),
 		     "Cannot read file block size: ");
-	if (len < 0) {
-		avro_set_error("Invalid block size: %" PRId64, len);
-		return EINVAL;
-	}
 
 	if (r->current_blockdata && len > r->current_blocklen) {
 		r->current_blockdata = (char *) avro_realloc(r->current_blockdata, r->current_blocklen, len);
-		if (!r->current_blockdata) {
-			avro_set_error("Cannot allocate block buffer");
-			return ENOMEM;
-		}
 		r->current_blocklen = len;
 	} else if (!r->current_blockdata) {
 		r->current_blockdata = (char *) avro_malloc(len);
-		if (!r->current_blockdata && len > 0) {
-			avro_set_error("Cannot allocate block buffer");
-			return ENOMEM;
-		}
 		r->current_blocklen = len;
 	}
 
diff --git a/lang/c/src/encoding_binary.c b/lang/c/src/encoding_binary.c
index 96dacea583..1fc5f0c9a7 100644
--- a/lang/c/src/encoding_binary.c
+++ b/lang/c/src/encoding_binary.c
@@ -127,10 +127,6 @@ static int read_bytes(avro_reader_t reader, char **bytes, int64_t * len)
 	int rval;
 	check_prefix(rval, read_long(reader, len),
 		     "Cannot read bytes length: ");
-	if (*len < 0) {
-		avro_set_error("Invalid bytes length: %" PRId64, *len);
-		return EINVAL;
-	}
 	*bytes = (char *) avro_malloc(*len + 1);
 	if (!*bytes) {
 		avro_set_error("Cannot allocate buffer for bytes value");
@@ -147,10 +143,6 @@ static int skip_bytes(avro_reader_t reader)
 	int rval;
 	check_prefix(rval, read_long(reader, &len),
 		     "Cannot read bytes length: ");
-	if (len < 0) {
-		avro_set_error("Invalid bytes length: %" PRId64, len);
-		return EINVAL;
-	}
 	AVRO_SKIP(reader, len);
 	return 0;
 }
@@ -183,10 +175,6 @@ static int read_string(avro_reader_t reader, char **s, int64_t *len)
 	int rval;
 	check_prefix(rval, read_long(reader, &str_len),
 		     "Cannot read string length: ");
-	if (str_len < 0) {
-		avro_set_error("Invalid string length: %" PRId64, str_len);
-		return EINVAL;
-	}
 	*len = str_len + 1;
 	*s = (char *) avro_malloc(*len);
 	if (!*s) {
diff --git a/lang/c/src/value-json.c b/lang/c/src/value-json.c
index 7927c14dd8..53c2b3d3e4 100644
--- a/lang/c/src/value-json.c
+++ b/lang/c/src/value-json.c
@@ -29,8 +29,7 @@
 #include "jansson.h"
 
 /*
- * Converts a binary buffer into a JSON UTF-8 string which is NOT
- * terminated with a null byte ('\0').
+ * Converts a binary buffer into a NUL-terminated JSON UTF-8 string.
  * Avro bytes and fixed values are encoded in JSON as a string, and JSON
  * strings must be in UTF-8.  For these Avro types, the JSON string is
  * restricted to the characters U+0000..U+00FF, which corresponds to the
@@ -52,7 +51,7 @@ encode_utf8_bytes(const void *src, size_t src_len,
 	// the range 0x80..0xff will take up two.
 	const uint8_t  *src8 = (const uint8_t *) src;
 
-	size_t  utf8_len = src_len;
+	size_t  utf8_len = src_len + 1;  // +1 for NUL terminator
 	size_t  i;
 	for (i = 0; i < src_len; i++) {
 		if (src8[i] & 0x80) {
@@ -77,6 +76,8 @@ encode_utf8_bytes(const void *src, size_t src_len,
 		}
 	}
 
+	*curr = '\0';
+
 	// And we're good.
 	*dest = dest8;
 	*dest_len = utf8_len;
@@ -126,7 +127,7 @@ avro_value_to_json_t(const avro_value_t *value)
 				return NULL;
 			}
 
-			json_t  *result = json_stringn_nocheck((const char *) encoded, encoded_size);
+			json_t  *result = json_string_nocheck((const char *) encoded);
 			avro_free(encoded, encoded_size);
 			if (result == NULL) {
 				avro_set_error("Cannot allocate JSON bytes");
@@ -241,7 +242,7 @@ avro_value_to_json_t(const avro_value_t *value)
 				return NULL;
 			}
 
-			json_t  *result = json_stringn_nocheck((const char *) encoded, encoded_size);
+			json_t  *result = json_string_nocheck((const char *) encoded);
 			avro_free(encoded, encoded_size);
 			if (result == NULL) {
 				avro_set_error("Cannot allocate JSON fixed");
diff --git a/lang/c/tests/test_avro_data.c b/lang/c/tests/test_avro_data.c
index 3a26c67e24..1da09e6db9 100644
--- a/lang/c/tests/test_avro_data.c
+++ b/lang/c/tests/test_avro_data.c
@@ -181,14 +181,14 @@ static int test_string(void)
 
 static int test_bytes(void)
 {
-	char bytes[] = { 0xDE, 0xAD, 0x00, 0xBE, 0xEF };
+	char bytes[] = { 0xDE, 0xAD, 0xBE, 0xEF };
 	avro_schema_t writer_schema = avro_schema_bytes();
 	avro_datum_t datum;
 	avro_datum_t expected_datum;
 
 	datum = avro_givebytes(bytes, sizeof(bytes), NULL);
 	write_read_check(writer_schema, datum, NULL, NULL, "bytes");
-	test_json(datum, "\"\\u00de\\u00ad\\u0000\\u00be\\u00ef\"");
+	test_json(datum, "\"\\u00de\\u00ad\\u00be\\u00ef\"");
 	avro_datum_decref(datum);
 	avro_schema_decref(writer_schema);
 
@@ -613,14 +613,14 @@ static int test_union(void)
 
 static int test_fixed(void)
 {
-	char bytes[] = { 0xD, 0xA, 0xD, 0xA, 0xB, 0x0, 0xB, 0xA };
+	char bytes[] = { 0xD, 0xA, 0xD, 0xA, 0xB, 0xA, 0xB, 0xA };
 	avro_schema_t schema = avro_schema_fixed("msg", sizeof(bytes));
 	avro_datum_t datum;
 	avro_datum_t expected_datum;
 
 	datum = avro_givefixed(schema, bytes, sizeof(bytes), NULL);
 	write_read_check(schema, datum, NULL, NULL, "fixed");
-	test_json(datum, "\"\\r\\n\\r\\n\\u000b\\u0000\\u000b\\n\"");
+	test_json(datum, "\"\\r\\n\\r\\n\\u000b\\n\\u000b\\n\"");
 	avro_datum_decref(datum);
 
 	datum = avro_givefixed(schema, NULL, sizeof(bytes), NULL);
diff --git a/lang/csharp/common.props b/lang/csharp/common.props
index f41617eadf..e12601f3d1 100644
--- a/lang/csharp/common.props
+++ b/lang/csharp/common.props
@@ -48,7 +48,7 @@
     <!-- Reference: https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#pack-target -->
     <Copyright>Copyright © 2019 The Apache Software Foundation.</Copyright>
     <PackageIcon>logo.png</PackageIcon>
-    <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
+    <PackageLicenseFile>LICENSE</PackageLicenseFile>
     <PackageReadmeFile>README.md</PackageReadmeFile>
     <PackageProjectUrl>https://avro.apache.org/</PackageProjectUrl>
     <PackageTags>Avro;Apache;Serialization;Binary;Json;Schema</PackageTags>
diff --git a/lang/csharp/src/apache/test/NuGetPackageTests.cs b/lang/csharp/src/apache/test/NuGetPackageTests.cs
deleted file mode 100644
index 493cede931..0000000000
--- a/lang/csharp/src/apache/test/NuGetPackageTests.cs
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.IO;
-using System.IO.Compression;
-using System.Linq;
-using System.Xml.Linq;
-using NUnit.Framework;
-
-namespace Avro.Test.Utils
-{
-    [TestFixture]
-    public class NuGetPackageTests
-    {
-        private static readonly string[] PackageIds = new[]
-        {
-            "Apache.Avro",
-            "Apache.Avro.Tools",
-            "Apache.Avro.File.Snappy",
-            "Apache.Avro.File.BZip2",
-            "Apache.Avro.File.XZ",
-            "Apache.Avro.File.Zstandard"
-        };
-
-        [TestCaseSource(nameof(PackageIds))]
-        public void PackageContainsSpdxLicenseExpression(string packageId)
-        {
-            var nupkgPath = FindPackageInBuildOutput(packageId);
-            if (nupkgPath == null)
-            {
-                Assert.Inconclusive($"Package {packageId} not found. Run 'dotnet pack --configuration Release' first.");
-                return;
-            }
-
-            var nuspecXml = ExtractNuspecFromPackage(nupkgPath);
-            
-            // Get the namespace from the root element
-            var ns = nuspecXml.Root?.Name.Namespace ?? XNamespace.None;
-            var licenseElement = nuspecXml.Root?.Element(ns + "metadata")?.Element(ns + "license");
-            
-            Assert.That(licenseElement, Is.Not.Null, 
-                $"Package {packageId} does not contain a license element");
-            
-            var licenseType = licenseElement?.Attribute("type")?.Value;
-            Assert.That(licenseType, Is.EqualTo("expression"), 
-                $"Package {packageId} license type should be 'expression', but was '{licenseType}'");
-            
-            var licenseValue = licenseElement?.Value;
-            Assert.That(licenseValue, Is.EqualTo("Apache-2.0"), 
-                $"Package {packageId} should have SPDX license expression 'Apache-2.0', but was '{licenseValue}'");
-        }
-
-        [TestCaseSource(nameof(PackageIds))]
-        public void PackageContainsLicenseFile(string packageId)
-        {
-            var nupkgPath = FindPackageInBuildOutput(packageId);
-            if (nupkgPath == null)
-            {
-                Assert.Inconclusive($"Package {packageId} not found. Run 'dotnet pack --configuration Release' first.");
-                return;
-            }
-
-            using (var archive = ZipFile.OpenRead(nupkgPath))
-            {
-                var licenseEntry = archive.Entries.FirstOrDefault(e => 
-                    e.FullName.Equals("LICENSE", StringComparison.OrdinalIgnoreCase));
-                
-                Assert.That(licenseEntry, Is.Not.Null, 
-                    $"Package {packageId} does not contain LICENSE file");
-                
-                Assert.That(licenseEntry.Length, Is.GreaterThan(0), 
-                    $"Package {packageId} LICENSE file is empty");
-            }
-        }
-
-        [TestCaseSource(nameof(PackageIds))]
-        public void PackageLicenseFileContainsApacheLicense(string packageId)
-        {
-            var nupkgPath = FindPackageInBuildOutput(packageId);
-            if (nupkgPath == null)
-            {
-                Assert.Inconclusive($"Package {packageId} not found. Run 'dotnet pack --configuration Release' first.");
-                return;
-            }
-
-            using (var archive = ZipFile.OpenRead(nupkgPath))
-            {
-                var licenseEntry = archive.Entries.FirstOrDefault(e => 
-                    e.FullName.Equals("LICENSE", StringComparison.OrdinalIgnoreCase));
-                
-                Assert.That(licenseEntry, Is.Not.Null);
-
-                using (var stream = licenseEntry.Open())
-                using (var reader = new StreamReader(stream))
-                {
-                    var content = reader.ReadToEnd();
-                    Assert.That(content, Does.Contain("Apache License"), 
-                        $"Package {packageId} LICENSE file does not contain Apache License text");
-                    Assert.That(content, Does.Contain("Version 2.0"), 
-                        $"Package {packageId} LICENSE file does not specify Version 2.0");
-                }
-            }
-        }
-
-        private string FindPackageInBuildOutput(string packageId)
-        {
-            // Find the lang/csharp root (4 levels up from test binary directory: bin/Release/net8.0 -> test -> apache -> src -> csharp)
-            var testDir = TestContext.CurrentContext.TestDirectory;
-            var csharpRoot = Path.GetFullPath(Path.Combine(testDir, "..", "..", "..", "..", ".."));
-            
-            // Search for the package in Release output directories
-            var pattern = $"{packageId}.*.nupkg";
-            var files = Directory.GetFiles(csharpRoot, pattern, SearchOption.AllDirectories)
-                .Where(f => f.Contains($"{Path.DirectorySeparatorChar}Release{Path.DirectorySeparatorChar}"))
-                .OrderByDescending(f => System.IO.File.GetLastWriteTime(f))
-                .ToArray();
-            
-            return files.Length > 0 ? files[0] : null;
-        }
-
-        private XDocument ExtractNuspecFromPackage(string nupkgPath)
-        {
-            using (var archive = ZipFile.OpenRead(nupkgPath))
-            {
-                var nuspecEntry = archive.Entries.FirstOrDefault(e => 
-                    e.FullName.EndsWith(".nuspec", StringComparison.OrdinalIgnoreCase));
-                
-                if (nuspecEntry == null)
-                {
-                    Assert.Fail($"No .nuspec file found in package: {nupkgPath}");
-                }
-
-                using (var stream = nuspecEntry.Open())
-                {
-                    return XDocument.Load(stream);
-                }
-            }
-        }
-    }
-}
diff --git a/lang/csharp/versions.props b/lang/csharp/versions.props
index cca47a76fe..a0c7d04ad9 100644
--- a/lang/csharp/versions.props
+++ b/lang/csharp/versions.props
@@ -27,7 +27,7 @@
   -->
   <PropertyGroup Label="Latest Package Versions">
     <NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
-    <SystemCodeDomVersion>10.0.5</SystemCodeDomVersion>
+    <SystemCodeDomVersion>8.0.0</SystemCodeDomVersion>
     <SystemReflectionVersion>4.3.0</SystemReflectionVersion>
     <SystemReflectionEmitILGenerationVersion>4.7.0</SystemReflectionEmitILGenerationVersion>
     <SystemReflectionEmitLightweightVersion>4.7.0</SystemReflectionEmitLightweightVersion>
@@ -50,7 +50,7 @@
   -->
   <PropertyGroup Label="Minimum Package Versions">
     <!-- Newtonsoft.Json prior to version 13.0.1 is vulnerable. See https://github.com/advisories/GHSA-5crp-9r3c-p9vr -->
-    <NewtonsoftJsonMinimumVersion>13.0.4</NewtonsoftJsonMinimumVersion>
+    <NewtonsoftJsonMinimumVersion>13.0.1</NewtonsoftJsonMinimumVersion>
   </PropertyGroup>
 
   <!--
@@ -58,19 +58,19 @@
 	Please sort the packages alphabetically
   -->
   <PropertyGroup Label="Build, Test, Code Analysis, Benchmark Package Versions">
-    <BenchmarkDotNetVersion>0.15.8</BenchmarkDotNetVersion>
-    <CoverletCollectorVersion>8.0.1</CoverletCollectorVersion>
-    <CoverletMSBuildVersion>8.0.1</CoverletMSBuildVersion>
-    <MicrosoftBuildFrameworkVersion>18.4.0</MicrosoftBuildFrameworkVersion>
-    <MicrosoftBuildUtilitiesCoreVersion>18.4.0</MicrosoftBuildUtilitiesCoreVersion>
+    <BenchmarkDotNetVersion>0.13.10</BenchmarkDotNetVersion>
+    <CoverletCollectorVersion>6.0.0</CoverletCollectorVersion>
+    <CoverletMSBuildVersion>6.0.0</CoverletMSBuildVersion>
+    <MicrosoftBuildFrameworkVersion>17.8.43</MicrosoftBuildFrameworkVersion>
+    <MicrosoftBuildUtilitiesCoreVersion>17.8.43</MicrosoftBuildUtilitiesCoreVersion>
     <MicrosoftCodeAnalysisVersion>4.7.0</MicrosoftCodeAnalysisVersion>
     <MicrosoftCodeAnalysisCSharpVersion>4.7.0</MicrosoftCodeAnalysisCSharpVersion>
     <MicrosoftCodeAnalysisCSharpCodeStyleVersion>4.7.0</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
-    <MicrosoftCodeAnalysisNetAnalyzersVersion>10.0.101</MicrosoftCodeAnalysisNetAnalyzersVersion>
-    <MicrosoftNETTestSdkVersion>17.13.0</MicrosoftNETTestSdkVersion>
+    <MicrosoftCodeAnalysisNetAnalyzersVersion>8.0.0</MicrosoftCodeAnalysisNetAnalyzersVersion>
+    <MicrosoftNETTestSdkVersion>17.8.0</MicrosoftNETTestSdkVersion>
     <NUnitVersion>3.14.0</NUnitVersion>
-    <NUnitConsoleRunnerVersion>3.22.0</NUnitConsoleRunnerVersion>
-    <NUnit3TestAdapterVersion>5.2.0</NUnit3TestAdapterVersion>
+    <NUnitConsoleRunnerVersion>3.16.3</NUnitConsoleRunnerVersion>
+    <NUnit3TestAdapterVersion>4.5.0</NUnit3TestAdapterVersion>
     <StyleCopAnalyzersVersion>1.1.118</StyleCopAnalyzersVersion>
   </PropertyGroup>
 </Project>
diff --git a/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java b/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java
index e2e79d8eae..2bb24b3fa1 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java
@@ -330,10 +330,7 @@ public class DataFileStream<D> implements Iterator<D>, Iterable<D>, Closeable {
     vin.readFixed(syncBuffer);
     availableBlock = false;
     if (!Arrays.equals(syncBuffer, header.sync))
-      throw new IOException("Invalid sync marker! The sync marker in the data block doesn't match the "
-          + "file header's sync marker. This likely indicates data corruption, truncated file, "
-          + "or incorrectly concatenated Avro files. Verify file integrity and ensure proper "
-          + "file transmission or creation.");
+      throw new IOException("Invalid sync!");
     return reuse;
   }
 
diff --git a/lang/java/avro/src/main/java/org/apache/avro/io/FastReaderBuilder.java b/lang/java/avro/src/main/java/org/apache/avro/io/FastReaderBuilder.java
index 7ff80e2a4f..dbd06f305e 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/io/FastReaderBuilder.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/io/FastReaderBuilder.java
@@ -52,7 +52,6 @@ import org.apache.avro.io.parsing.ResolvingGrammarGenerator;
 import org.apache.avro.reflect.ReflectionUtil;
 import org.apache.avro.specific.SpecificData;
 import org.apache.avro.specific.SpecificRecordBase;
-import org.apache.avro.util.ClassUtils;
 import org.apache.avro.util.Utf8;
 import org.apache.avro.util.WeakIdentityHashMap;
 import org.apache.avro.util.internal.Accessor;
@@ -447,8 +446,8 @@ public class FastReaderBuilder {
 
   private Optional<Class<?>> findClass(String clazz) {
     try {
-      return Optional.of(ClassUtils.forName(data.getClassLoader(), clazz));
-    } catch (ClassNotFoundException e) {
+      return Optional.of(data.getClassLoader().loadClass(clazz));
+    } catch (ReflectiveOperationException e) {
       return Optional.empty();
     }
   }
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TestDataFileCorruption.java b/lang/java/avro/src/test/java/org/apache/avro/TestDataFileCorruption.java
index 1a8d54f301..e4659488d1 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TestDataFileCorruption.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TestDataFileCorruption.java
@@ -87,10 +87,7 @@ public class TestDataFileCorruption {
       assertEquals("fig", r.next().toString());
       assertFalse(r.hasNext());
     } catch (AvroRuntimeException e) {
-      assertEquals("Invalid sync marker! The sync marker in the data block doesn't match the "
-          + "file header's sync marker. This likely indicates data corruption, truncated file, "
-          + "or incorrectly concatenated Avro files. Verify file integrity and ensure proper "
-          + "file transmission or creation.", e.getCause().getMessage());
+      assertEquals("Invalid sync!", e.getCause().getMessage());
     }
 
   }
diff --git a/lang/java/avro/src/test/java/org/apache/avro/io/TestFastReaderBuilderClassLoading.java b/lang/java/avro/src/test/java/org/apache/avro/io/TestFastReaderBuilderClassLoading.java
deleted file mode 100644
index 2feedaedaa..0000000000
--- a/lang/java/avro/src/test/java/org/apache/avro/io/TestFastReaderBuilderClassLoading.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.avro.io;
-
-import static org.junit.jupiter.api.Assertions.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.util.Collections;
-
-import org.apache.avro.Schema;
-import org.apache.avro.generic.GenericData;
-import org.apache.avro.generic.GenericDatumReader;
-import org.apache.avro.generic.GenericDatumWriter;
-import org.apache.avro.generic.GenericRecord;
-import org.apache.avro.generic.GenericRecordBuilder;
-import org.apache.avro.specific.SpecificData;
-import org.apache.avro.util.ClassSecurityValidator;
-import org.apache.avro.util.ClassSecurityValidator.ClassSecurityPredicate;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-/**
- * Tests that FastReaderBuilder.findClass() routes class loading through
- * ClassUtils.forName(), so that ClassSecurityValidator is applied consistently.
- */
-public class TestFastReaderBuilderClassLoading {
-
-  private static final String TEST_VALUE = "https://example.com";
-
-  private ClassSecurityPredicate originalValidator;
-
-  @BeforeEach
-  public void saveValidator() {
-    originalValidator = ClassSecurityValidator.getGlobal();
-  }
-
-  @AfterEach
-  public void restoreValidator() {
-    ClassSecurityValidator.setGlobal(originalValidator);
-  }
-
-  /**
-   * When the validator blocks a class referenced by java-class, FastReaderBuilder
-   * must propagate the SecurityException so the caller knows why the class was
-   * rejected.
-   */
-  @Test
-  void blockedClassThrowsSecurityException() {
-    // Block java.net.URI
-    ClassSecurityValidator.setGlobal(ClassSecurityValidator.composite(ClassSecurityValidator.DEFAULT_TRUSTED_CLASSES,
-        ClassSecurityValidator.builder().add("org.apache.avro.util.Utf8").build()));
-
-    assertThrows(SecurityException.class, () -> readWithJavaClass("java.net.URI"),
-        "Blocked class should cause a SecurityException to propagate");
-  }
-
-  /**
-   * When the validator trusts a class referenced by java-class, FastReaderBuilder
-   * should instantiate it normally.
-   */
-  @Test
-  void trustedClassIsInstantiated() {
-    ClassSecurityValidator.setGlobal(ClassSecurityValidator.composite(ClassSecurityValidator.DEFAULT_TRUSTED_CLASSES,
-        ClassSecurityValidator.builder().add("java.net.URI").add("org.apache.avro.util.Utf8").build()));
-
-    GenericRecord result = readWithJavaClass("java.net.URI");
-
-    assertInstanceOf(URI.class, result.get("value"));
-    assertEquals(URI.create(TEST_VALUE), result.get("value"));
-  }
-
-  /**
-   * Encode a string, then read it back through FastReaderBuilder with the given
-   * java-class.
-   */
-  private GenericRecord readWithJavaClass(String javaClass) {
-    try {
-      Schema stringSchema = Schema.create(Schema.Type.STRING);
-      stringSchema.addProp(SpecificData.CLASS_PROP, javaClass);
-      stringSchema.addProp(GenericData.STRING_PROP, GenericData.StringType.String.name());
-
-      Schema recordSchema = Schema.createRecord("TestRecord", null, "test", false);
-      recordSchema.setFields(Collections.singletonList(new Schema.Field("value", stringSchema, null, null)));
-
-      // Encode
-      GenericRecord record = new GenericRecordBuilder(recordSchema).set("value", TEST_VALUE).build();
-      ByteArrayOutputStream out = new ByteArrayOutputStream();
-      Encoder encoder = EncoderFactory.get().binaryEncoder(out, null);
-      new GenericDatumWriter<GenericRecord>(recordSchema).write(record, encoder);
-      encoder.flush();
-
-      // Decode with fast reader enabled
-      GenericData data = new GenericData();
-      data.setFastReaderEnabled(true);
-      GenericDatumReader<GenericRecord> reader = new GenericDatumReader<>(recordSchema, recordSchema, data);
-      return reader.read(null, DecoderFactory.get().binaryDecoder(new ByteArrayInputStream(out.toByteArray()), null));
-    } catch (IOException e) {
-      return fail("Unexpected IOException during encode/decode", e);
-    }
-  }
-}
diff --git a/lang/java/avro/src/test/java/org/apache/avro/util/TestClassSecurityValidator.java b/lang/java/avro/src/test/java/org/apache/avro/util/TestClassSecurityValidator.java
index e3b62b0112..4dc1a55c54 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/util/TestClassSecurityValidator.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/util/TestClassSecurityValidator.java
@@ -97,29 +97,6 @@ public class TestClassSecurityValidator {
     assertEquals("Not inner", e.getMessage());
   }
 
-  @Test
-  void testClassUtilsEnforcesValidator() {
-    ClassSecurityValidator.setGlobal(ClassSecurityValidator.builder().add("java.lang.String").build());
-
-    assertThrows(SecurityException.class, () -> ClassUtils.forName("java.net.URI"),
-        "ClassUtils.forName should reject classes not in the trusted set");
-
-    assertDoesNotThrow(() -> ClassUtils.forName("java.lang.String"),
-        "ClassUtils.forName should allow classes in the trusted set");
-  }
-
-  @Test
-  void testDirectLoadClassDoesNotUseValidator() throws ClassNotFoundException {
-    ClassSecurityValidator.setGlobal(ClassSecurityValidator.builder().add("java.lang.String").build());
-
-    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-    Class<?> loaded = cl.loadClass("java.net.URI");
-    assertNotNull(loaded, "Direct ClassLoader.loadClass() loads any class regardless of the validator");
-
-    assertThrows(SecurityException.class, () -> ClassUtils.forName("java.net.URI"),
-        "ClassUtils.forName correctly applies the validator");
-  }
-
   @Test
   void testBuildComplexPredicate() {
     ClassSecurityValidator.setGlobal(ClassSecurityValidator.composite(
diff --git a/lang/php/lib/Datum/AvroIOSchemaMatchException.php b/lang/java/ipc-jetty/src/main/java/org/apache/avro/ipc/jetty/StaticServlet.java
similarity index 50%
copy from lang/php/lib/Datum/AvroIOSchemaMatchException.php
copy to lang/java/ipc-jetty/src/main/java/org/apache/avro/ipc/jetty/StaticServlet.java
index 8706674bc3..2e28ba14eb 100644
--- a/lang/php/lib/Datum/AvroIOSchemaMatchException.php
+++ b/lang/java/ipc-jetty/src/main/java/org/apache/avro/ipc/jetty/StaticServlet.java
@@ -1,6 +1,4 @@
-<?php
-
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -18,31 +16,30 @@
  * limitations under the License.
  */
 
-declare(strict_types=1);
+package org.apache.avro.ipc.jetty;
 
-namespace Apache\Avro\Datum;
+import java.net.URL;
 
-use Apache\Avro\AvroException;
-use Apache\Avro\Schema\AvroSchema;
+import org.eclipse.jetty.servlet.DefaultServlet;
+import org.eclipse.jetty.util.resource.Resource;
 
 /**
- * Exceptions arising from incompatibility between
- * reader and writer schemas.
+ * Very simple servlet class capable of serving static files.
  */
-class AvroIOSchemaMatchException extends AvroException
-{
-    /**
-     * @param AvroSchema $writersSchema
-     * @param AvroSchema $readersSchema
-     */
-    public function __construct($writersSchema, $readersSchema)
-    {
-        parent::__construct(
-            sprintf(
-                "Writer's schema %s and Reader's schema %s do not match.",
-                $writersSchema,
-                $readersSchema
-            )
-        );
+public class StaticServlet extends DefaultServlet {
+  private static final long serialVersionUID = 1L;
+
+  @Override
+  public Resource getResource(String pathInContext) {
+    // Take only last slice of the URL as a filename, so we can adjust path.
+    // This also prevents mischief like '../../foo.css'
+    String[] parts = pathInContext.split("/");
+    String filename = parts[parts.length - 1];
+
+    URL resource = getClass().getClassLoader().getResource("org/apache/avro/ipc/stats/static/" + filename);
+    if (resource == null) {
+      return null;
     }
+    return Resource.newResource(resource);
+  }
 }
diff --git a/lang/java/ipc-jetty/src/main/java/org/apache/avro/ipc/jetty/StatsServer.java b/lang/java/ipc-jetty/src/main/java/org/apache/avro/ipc/jetty/StatsServer.java
index ea83dd1ac6..43e066190d 100644
--- a/lang/java/ipc-jetty/src/main/java/org/apache/avro/ipc/jetty/StatsServer.java
+++ b/lang/java/ipc-jetty/src/main/java/org/apache/avro/ipc/jetty/StatsServer.java
@@ -1,3 +1,7 @@
+package org.apache.avro.ipc.jetty;
+
+import org.apache.avro.ipc.stats.StatsPlugin;
+import org.apache.avro.ipc.stats.StatsServlet;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -15,19 +19,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-package org.apache.avro.ipc.jetty;
-
-import org.apache.avro.ipc.stats.StatsPlugin;
-import org.apache.avro.ipc.stats.StatsServlet;
-
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.handler.ContextHandler;
-import org.eclipse.jetty.server.handler.HandlerList;
-import org.eclipse.jetty.server.handler.ResourceHandler;
-import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.servlet.ServletHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.util.resource.Resource;
 
 /* This is a server that displays live information from a StatsPlugin.
  *
@@ -48,28 +42,11 @@ public class StatsServer {
     this.httpServer = new Server(port);
     this.plugin = plugin;
 
-    ServletContextHandler servletContext = new ServletContextHandler(ServletContextHandler.SESSIONS);
-    servletContext.setContextPath("/");
-
-    ServletHolder servletHolder = new ServletHolder(new StatsServlet(plugin));
-    servletContext.addServlet(servletHolder, "/");
-
-    HandlerList handlers = new HandlerList(servletContext);
-
-    Resource classPathResource = Resource.newClassPathResource("/org/apache/avro/ipc/stats/static");
-    if (classPathResource.exists() && classPathResource.isDirectory()) {
-      ResourceHandler resourceHandler = new ResourceHandler();
-      resourceHandler.setBaseResource(classPathResource);
-      resourceHandler.setDirectoriesListed(false); // Optional: prevent directory listing
-
-      ContextHandler staticContext = new ContextHandler();
-      staticContext.setContextPath("/static");
-      staticContext.setHandler(resourceHandler);
-
-      handlers.prependHandler(staticContext);
-    }
+    ServletHandler handler = new ServletHandler();
+    httpServer.setHandler(handler);
+    handler.addServletWithMapping(new ServletHolder(new StaticServlet()), "/");
 
-    httpServer.setHandler(handlers);
+    handler.addServletWithMapping(new ServletHolder(new StatsServlet(plugin)), "/");
 
     httpServer.start();
   }
diff --git a/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery-1.6.3.min.js b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery-1.6.3.min.js
new file mode 100644
index 0000000000..20d7f61e39
--- /dev/null
+++ b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery-1.6.3.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.6.3 http://jquery.com/ | http://jquery.org/license */
+(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement( [...]
+,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.nam [...]
+return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone: [...]
\ No newline at end of file
diff --git a/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery-3.7.1.min.js b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery-3.7.1.min.js
deleted file mode 100644
index 7f37b5d991..0000000000
--- a/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery-3.7.1.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
-!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue [...]
diff --git a/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/templates/statsview.vm b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/templates/statsview.vm
index 3f45626891..1e9659b0b0 100644
--- a/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/templates/statsview.vm
+++ b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/templates/statsview.vm
@@ -51,7 +51,7 @@
 <title>$title</title>
 <script type="text/javascript" src="static/protovis-r3.2.js"></script>
 <script type="text/javascript" src="static/tipsy.js"></script>
-<script src="static/jquery-3.7.1.min.js" type="text/javascript"></script>
+<script src="static/jquery-1.6.3.min.js" type="text/javascript"></script>
 <script src="static/jquery.tipsy.js" type="text/javascript"></script>
 <script src="static/tipsy.js" type="text/javascript"></script>
 <link href="static/tipsy.css" type="text/css" rel="stylesheet"/>
diff --git a/lang/java/pom.xml b/lang/java/pom.xml
index 642744f289..c347725af7 100644
--- a/lang/java/pom.xml
+++ b/lang/java/pom.xml
@@ -38,38 +38,38 @@
 
     <!-- version properties for dependencies -->
     <ant.version>1.10.15</ant.version>
-    <commons-cli.version>1.11.0</commons-cli.version>
+    <commons-cli.version>1.10.0</commons-cli.version>
     <commons-compress.version>1.28.0</commons-compress.version>
-    <commons-text.version>1.15.0</commons-text.version>
-    <commons-lang3.version>3.20.0</commons-lang3.version>
-    <grpc.version>1.80.0</grpc.version>
-    <hadoop.version>3.4.3</hadoop.version>
+    <commons-text.version>1.14.0</commons-text.version>
+    <commons-lang3.version>3.18.0</commons-lang3.version>
+    <grpc.version>1.75.0</grpc.version>
+    <hadoop.version>3.4.2</hadoop.version>
     <hamcrest.version>3.0</hamcrest.version>
-    <jackson-bom.version>2.21.2</jackson-bom.version>
+    <jackson-bom.version>2.20.0</jackson-bom.version>
     <jetty.version>9.4.58.v20250814</jetty.version>
     <jopt-simple.version>5.0.4</jopt-simple.version>
-    <junit5.version>5.14.3</junit5.version>
+    <junit5.version>5.13.4</junit5.version>
     <maven-core.version>3.9.6</maven-core.version>
-    <mockito.version>5.23.0</mockito.version>
-    <netty.version>4.2.12.Final</netty.version>
-    <protobuf.version>4.34.1</protobuf.version>
+    <mockito.version>5.19.0</mockito.version>
+    <netty.version>4.2.4.Final</netty.version>
+    <protobuf.version>4.32.0</protobuf.version>
     <reload4j.version>1.2.26</reload4j.version>
     <servlet-api.version>4.0.1</servlet-api.version>
     <slf4j.version>2.0.17</slf4j.version>
     <snappy.version>1.1.10.8</snappy.version>
     <thrift.version>0.20.0</thrift.version>
-    <tukaani.version>1.12</tukaani.version>
+    <tukaani.version>1.10</tukaani.version>
     <velocity.version>2.4.1</velocity.version>
-    <zstd-jni.version>1.5.7-7</zstd-jni.version>
+    <zstd-jni.version>1.5.7-4</zstd-jni.version>
     <!-- version properties for plugins -->
-    <archetype-plugin.version>3.4.1</archetype-plugin.version>
-    <bundle-plugin-version>6.0.2</bundle-plugin-version>
+    <archetype-plugin.version>3.4.0</archetype-plugin.version>
+    <bundle-plugin-version>6.0.0</bundle-plugin-version>
     <cyclonedx-maven-plugin.version>2.9.1</cyclonedx-maven-plugin.version>
-    <exec-plugin.version>3.6.3</exec-plugin.version>
+    <exec-plugin.version>3.5.1</exec-plugin.version>
     <file-management.version>3.2.0</file-management.version>
-    <javacc-plugin.version>3.8.0</javacc-plugin.version>
+    <javacc-plugin.version>3.0.3</javacc-plugin.version>
     <javacc.version>7.0.13</javacc.version>
-    <maven-antrun-plugin.version>3.2.0</maven-antrun-plugin.version>
+    <maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
   </properties>
 
   <modules>
diff --git a/lang/js/lib/schemas.js b/lang/js/lib/schemas.js
index d99eedb8a1..cbf9e9600a 100644
--- a/lang/js/lib/schemas.js
+++ b/lang/js/lib/schemas.js
@@ -2029,23 +2029,10 @@ function getOpts(attrs, opts) {
     throw new Error('invalid type: null (did you mean "null"?)');
   }
   opts = opts || {};
-  
-  // Ensure registry and logicalTypes exist and are preserved by reference so 
-  // type definitions can accumulate across recursive calls.
-  if (!opts.registry) {
-    opts.registry = {};
-  }
-  if (!opts.logicalTypes) {
-    opts.logicalTypes = {};
-  }
-  
-  return {
-    registry: opts.registry,  // Preserve same object reference
-    namespace: attrs.namespace || opts.namespace,
-    logicalTypes: opts.logicalTypes,  // Preserve same object reference
-    typeHook: opts.typeHook,
-    assertLogicalTypes: opts.assertLogicalTypes
-  };
+  opts.registry = opts.registry || {};
+  opts.namespace = attrs.namespace || opts.namespace;
+  opts.logicalTypes = opts.logicalTypes || {};
+  return opts;
 }
 
 /**
diff --git a/lang/js/test/test_schemas.js b/lang/js/test/test_schemas.js
index d8bbcd116b..0cc0996b89 100644
--- a/lang/js/test/test_schemas.js
+++ b/lang/js/test/test_schemas.js
@@ -2188,167 +2188,6 @@ describe('types', function () {
       assert.equal(type._fields[1]._type._name, 'all.Alien');
     });
 
-    it('namespace inheritance', function () {
-      // When nested types don't specify a namespace, they should inherit the parent's 
-      // namespace, but other nested types with explicit namespaces shouldn't corrupt 
-      // the inherited context.
-      var schema = {
-        type: 'record',
-        name: 'Parent',
-        namespace: 'parent.ns',
-        fields: [
-          {
-            name: 'child_field',
-            type: {
-              type: 'record',
-              name: 'Child', // No namespace - should inherit 'parent.ns'
-              fields: [{name: 'value', type: 'int'}]
-            }
-          },
-          {
-            name: 'other_field', 
-            type: {
-              type: 'record',
-              name: 'Other',
-              namespace: 'different.ns', // Different namespace
-              fields: [{name: 'data', type: 'int'}]
-            }
-          },
-          {
-            name: 'reference_field',
-            type: 'Child' // Should resolve to 'parent.ns.Child'
-          }
-        ]
-      };
-      
-      var type = createType(schema);
-      assert.equal(type.getName(), 'parent.ns.Parent');
-      
-      var fields = type.getFields();
-      assert.equal(fields.length, 3);
-      
-      // Test all field types to demonstrate the fix works for all namespace scenarios
-      assert.equal(fields[0].getType().getName(), 'parent.ns.Child');    // Inherited namespace
-      assert.equal(fields[1].getType().getName(), 'different.ns.Other'); // Explicit namespace
-      assert.equal(fields[2].getType().getName(), 'parent.ns.Child');    // Reference resolution
-      
-      // Verify the schema works for serialization
-      var testData = {
-        child_field: { value: 42 },
-        other_field: { data: 123 },
-        reference_field: { value: 99 }
-      };
-      assert(type.isValid(testData));
-      var buf = type.toBuffer(testData);
-      assert.deepEqual(type.fromBuffer(buf), testData);
-    });
-
-    it('deep namespace inheritance', function () {
-      // Test namespace inheritance across multiple levels of nesting with various
-      // namespace changes to ensure the fix works robustly in complex scenarios.
-      var schema = {
-        type: 'record',
-        name: 'Root',
-        namespace: 'level1',
-        fields: [
-          {
-            name: 'level2_inherited',
-            type: {
-              type: 'record',
-              name: 'Level2Inherited', // Inherits 'level1'
-              fields: [
-                {
-                  name: 'level3_inherited',
-                  type: {
-                    type: 'record', 
-                    name: 'Level3Inherited', // Also inherits 'level1'
-                    fields: [{name: 'deep_value', type: 'int'}]
-                  }
-                },
-                {
-                  name: 'level3_override',
-                  type: {
-                    type: 'record',
-                    name: 'Level3Override',
-                    namespace: 'level3.ns', // Changes namespace context
-                    fields: [{name: 'override_value', type: 'string'}]
-                  }
-                }
-              ]
-            }
-          },
-          {
-            name: 'level2_different',
-            type: {
-              type: 'record',
-              name: 'Level2Different',
-              namespace: 'level2.ns', // Different namespace
-              fields: [
-                {
-                  name: 'nested_inherited',
-                  type: {
-                    type: 'record',
-                    name: 'NestedInherited', // Should inherit 'level2.ns'
-                    fields: [{name: 'nested_data', type: 'double'}]
-                  }
-                }
-              ]
-            }
-          },
-          {
-            name: 'ref_level2_inherited',
-            type: 'Level2Inherited' // Should resolve to 'level1.Level2Inherited'
-          },
-          {
-            name: 'ref_level3_inherited', 
-            type: 'Level3Inherited' // Should resolve to 'level1.Level3Inherited'
-          }
-        ]
-      };
-      
-      var type = createType(schema);
-      assert.equal(type.getName(), 'level1.Root');
-      
-      var fields = type.getFields();
-      assert.equal(fields.length, 4);
-      
-      // Verify deep inheritance worked correctly
-      assert.equal(fields[0].getType().getName(), 'level1.Level2Inherited');
-      assert.equal(fields[1].getType().getName(), 'level2.ns.Level2Different');
-      
-      // Critical tests: references should resolve to correct namespaces
-      assert.equal(fields[2].getType().getName(), 'level1.Level2Inherited');
-      assert.equal(fields[3].getType().getName(), 'level1.Level3Inherited');
-      
-      // Verify nested types have correct namespaces
-      var level2Fields = fields[0].getType().getFields();
-      assert.equal(level2Fields[0].getType().getName(), 'level1.Level3Inherited');
-      assert.equal(level2Fields[1].getType().getName(), 'level3.ns.Level3Override');
-      
-      var level2DiffFields = fields[1].getType().getFields();
-      assert.equal(level2DiffFields[0].getType().getName(), 'level2.ns.NestedInherited');
-      
-      // Test serialization works correctly
-      var testData = {
-        level2_inherited: {
-          level3_inherited: { deep_value: 42 },
-          level3_override: { override_value: 'test' }
-        },
-        level2_different: {
-          nested_inherited: { nested_data: 3.14 }
-        },
-        ref_level2_inherited: {
-          level3_inherited: { deep_value: 99 },
-          level3_override: { override_value: 'ref' }
-        },
-        ref_level3_inherited: { deep_value: 123 }
-      };
-      
-      assert(type.isValid(testData));
-      var buf = type.toBuffer(testData);
-      assert.deepEqual(type.fromBuffer(buf), testData);
-    });
-
     it('wrapped primitive', function () {
       var type = createType({
         type: 'record',
diff --git a/lang/php/.gitignore b/lang/php/.gitignore
index e691e82460..d2429e1abc 100644
--- a/lang/php/.gitignore
+++ b/lang/php/.gitignore
@@ -1,5 +1,3 @@
 pkg
 vendor
 .phpunit.result.cache
-.phpunit.cache
-.php-cs-fixer.cache
diff --git a/lang/php/.php-cs-fixer.dist.php b/lang/php/.php-cs-fixer.dist.php
deleted file mode 100644
index 337d7874fc..0000000000
--- a/lang/php/.php-cs-fixer.dist.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-declare(strict_types=1);
-
-use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
-
-/**
- * PHP CS Fixer documentation:
- * - Homepage: https://cs.symfony.com/
- * - List of all available rules: https://cs.symfony.com/doc/rules/index.html
- * - List of all available rule sets: https://cs.symfony.com/doc/ruleSets/index.html
- *
- * To inspect a specific rule (e.g. `blank_line_before_statement`), run:
- *
- * ```console
- * > php-cs-fixer describe blank_line_before_statement
- * ```
- */
-$finder = PhpCsFixer\Finder::create()
-    ->in(['lib', 'test'])
-    ->append(['.php-cs-fixer.dist.php']);
-
-return (new PhpCsFixer\Config())
-    ->setRiskyAllowed(true)
-    ->setParallelConfig(ParallelConfigFactory::detect())
-    ->setRules([
-        // —— CS Rule Sets —————————————————————————————————————————————————————
-        '@Symfony' => true,
-        '@PHP8x0Migration' => true,
-
-        // —— Overriden rules ——————————————————————————————————————————————————
-
-        // @Symfony: `['statements' => ['return']]`
-        // Here using: default, `['statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try']]`
-        'blank_line_before_statement' => true,
-
-        // @Symfony: `['tokens' => [['attribute', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'square_brace_block', 'switch', 'throw', 'use']]]`
-        // Here using: default, `['tokens' => ['extra']]`
-        'no_extra_blank_lines' => true,
-
-        // @Symfony: `['allow_hidden_params' => true, 'remove_inheritdoc' => true]`
-        'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'allow_unused_params' => true, 'remove_inheritdoc' => false],
-
-        // @Symfony: `['after_heredoc' => true]`
-        // Here using: default, `['after_heredoc' => false]`
-        'no_whitespace_before_comma_in_array' => true,
-
-        // @Symfony: `['order' => ['use_trait']]`
-        // Here using: default, `['order' => ['use_trait', 'case', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'destruct', 'magic', 'phpunit', 'method_public', 'method_protected', 'method_private']]`)
-        'ordered_class_elements' => true,
-
-        // @Symfony: `['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha']`
-        // Here using: default, all import types (classes, functions, and constants) are sorted together alphabetically without grouping them by type
-        'ordered_imports' => true,
-
-        // @Symfony: `['order' => ['param', 'return', 'throws']]`
-        // Here using: default, `['param', 'throws', 'return']`
-        'phpdoc_order' => true,
-
-        // @Symfony: `['null_adjustment' => 'always_last', 'sort_algorithm' => 'none']`
-        'phpdoc_types_order' => ['null_adjustment' => 'always_first'],
-
-        // @Symfony: `['case' => 'camel_case']`
-        'php_unit_method_casing' => ['case' => 'snake_case'],
-
-        // —— Overriden rules (disabled) ————————————————————————————————————————
-        // @Symfony
-        'increment_style' => false,
-        'phpdoc_align' => false,
-        'phpdoc_separation' => false,
-        'phpdoc_summary' => false,
-        'phpdoc_to_comment' => false,
-        'single_line_comment_style' => false,
-        'single_line_throw' => false,
-        'single_quote' => false,
-
-        // —— Additional rules ——————————————————————————————————————————————————
-        'no_useless_else' => true,
-        'phpdoc_add_missing_param_annotation' => true,
-        'phpdoc_annotation_without_dot' => false,
-        'protected_to_private' => true,
-        'psr_autoloading' => true,
-    ])
-    ->setFinder($finder)
-;
diff --git a/lang/php/README.md b/lang/php/README.md
index 991cfc457a..9aa12d943b 100644
--- a/lang/php/README.md
+++ b/lang/php/README.md
@@ -8,14 +8,14 @@ A library for using [Avro](https://avro.apache.org/) with PHP.
 
 Requirements
 ============
- * PHP 8.1+
+ * PHP 7.3+
  * On 32-bit platforms, the [GMP PHP extension](https://php.net/gmp)
  * For Zstandard compression, [ext-zstd](https://github.com/kjdev/php-ext-zstd)
  * For Snappy compression, [ext-snappy](https://github.com/kjdev/php-ext-snappy)
  * For testing, [PHPUnit](https://www.phpunit.de/)
 
 Both GMP and PHPUnit are often available via package management
-systems as `php8.1-gmp` and `phpunit`, respectively.
+systems as `php7-gmp` and `phpunit`, respectively.
 
 
 Getting started
diff --git a/lang/php/build.sh b/lang/php/build.sh
index bb4595f8bb..8b5497001c 100755
--- a/lang/php/build.sh
+++ b/lang/php/build.sh
@@ -59,22 +59,13 @@ do
 
     lint)
       composer install -d "../.."
-      ../../vendor/bin/php-cs-fixer fix --dry-run --show-progress=dots --verbose --diff --no-interaction
-      ;;
-
-    lint-fix)
-      composer install -d "../.."
-      ../../vendor/bin/php-cs-fixer fix --show-progress=dots --verbose --diff
-      ;;
-
-    phpstan)
-      composer install -d "../.."
-      ../../vendor/bin/phpstan
+      find . -name "*.php" -print0 | xargs -0 -n1 -P8 php -l
+      ../../vendor/bin/phpcs --standard=PSR12 lib
       ;;
 
     test)
       composer install -d "../.."
-      ../../vendor/bin/phpunit
+      ../../vendor/bin/phpunit -v
       ;;
 
     dist)
@@ -86,7 +77,7 @@ do
       ;;
 
     *)
-      echo "Usage: $0 {interop-data-generate|test-interop|lint|lint-fix|test|dist|clean}"
+      echo "Usage: $0 {interop-data-generate|test-interop|lint|test|dist|clean}"
   esac
 done
 
diff --git a/lang/php/examples/write_read.php b/lang/php/examples/write_read.php
index 2c4e8b0e37..b5c1a69b9f 100644
--- a/lang/php/examples/write_read.php
+++ b/lang/php/examples/write_read.php
@@ -37,9 +37,9 @@ $writers_schema_json = <<<_JSON
            {"name":"member_name", "type":"string"}]}
 _JSON;
 
-$jose = ['member_id' => 1392, 'member_name' => 'Jose'];
-$maria = ['member_id' => 1642, 'member_name' => 'Maria'];
-$data = [$jose, $maria];
+$jose = array('member_id' => 1392, 'member_name' => 'Jose');
+$maria = array('member_id' => 1642, 'member_name' => 'Maria');
+$data = array($jose, $maria);
 
 $file_name = 'data.avr';
 // Open $file_name for writing, using the given writer's schema
diff --git a/lang/php/lib/Avro.php b/lang/php/lib/Avro.php
index 2882793110..8e032bc52a 100644
--- a/lang/php/lib/Avro.php
+++ b/lang/php/lib/Avro.php
@@ -27,6 +27,8 @@ namespace Apache\Avro;
  *
  * This port is an implementation of the
  * {@link https://avro.apache.org/docs/1.3.3/spec.html Avro 1.3.3 Specification}
+ *
+ * @package Avro
  */
 class Avro
 {
@@ -44,47 +46,49 @@ class Avro
     private const GMP_BIGINTEGER_MODE = 0x01;
     /**#@-*/
     /**
+     * @var int
      * Mode used to handle bigintegers. After Avro::check64Bit() has been called,
      * (usually via a call to Avro::checkPlatform(), set to
      * self::GMP_BIGINTEGER_MODE on 32-bit platforms that have GMP available,
      * and to self::PHP_BIGINTEGER_MODE otherwise.
      */
-    private static int $bigIntegerMode;
+    private static $biginteger_mode;
 
     /**
      * Wrapper method to call each required check.
+     *
      */
-    public static function checkPlatform(): void
+    public static function checkPlatform()
     {
         self::check64Bit();
     }
 
-    /**
-     * @return bool true if the PHP GMP extension is used and false otherwise.
-     * @internal Requires Avro::check64Bit() (exposed via Avro::checkPlatform())
-     *           to have been called to set Avro::$bigIntegerMode.
-     */
-    public static function usesGmp(): bool
-    {
-        return self::GMP_BIGINTEGER_MODE === self::$bigIntegerMode;
-    }
-
     /**
      * Determines if the host platform can encode and decode long integer data.
      *
      * @throws AvroException if the platform cannot handle long integers.
      */
-    private static function check64Bit(): void
+    private static function check64Bit()
     {
-        if (8 !== PHP_INT_SIZE) {
+        if (8 != PHP_INT_SIZE) {
             if (extension_loaded('gmp')) {
-                self::$bigIntegerMode = self::GMP_BIGINTEGER_MODE;
+                self::$biginteger_mode = self::GMP_BIGINTEGER_MODE;
             } else {
                 throw new AvroException('This platform cannot handle a 64-bit operations. '
-                    .'Please install the GMP PHP extension.');
+                    . 'Please install the GMP PHP extension.');
             }
         } else {
-            self::$bigIntegerMode = self::PHP_BIGINTEGER_MODE;
+            self::$biginteger_mode = self::PHP_BIGINTEGER_MODE;
         }
     }
+
+    /**
+     * @returns boolean true if the PHP GMP extension is used and false otherwise.
+     * @internal Requires Avro::check64Bit() (exposed via Avro::checkPlatform())
+     *           to have been called to set Avro::$biginteger_mode.
+     */
+    public static function usesGmp()
+    {
+        return self::GMP_BIGINTEGER_MODE === self::$biginteger_mode;
+    }
 }
diff --git a/lang/php/lib/AvroDebug.php b/lang/php/lib/AvroDebug.php
index feb74aef5e..777dcd9b24 100644
--- a/lang/php/lib/AvroDebug.php
+++ b/lang/php/lib/AvroDebug.php
@@ -22,6 +22,7 @@ namespace Apache\Avro;
 
 /**
  * Avro library code debugging functions
+ * @package Avro
  */
 class AvroDebug
 {
@@ -41,92 +42,98 @@ class AvroDebug
     /**
      * @param string $format format string for the given arguments. Passed as is
      *                     to <code>vprintf</code>.
-     * @param list<string> $args array of arguments to pass to vsprinf.
-     * @param int $debugLevel debug level at which to print this statement
-     * @return bool true
+     * @param array $args array of arguments to pass to vsprinf.
+     * @param int $debug_level debug level at which to print this statement
+     * @returns boolean true
      */
-    public static function debug(string $format, array $args, int $debugLevel = self::DEBUG1): bool
+    public static function debug($format, $args, $debug_level = self::DEBUG1)
     {
-        if (self::isDebug($debugLevel)) {
-            vprintf($format."\n", $args);
+        if (self::isDebug($debug_level)) {
+            vprintf($format . "\n", $args);
         }
-
         return true;
     }
 
     /**
-     * @return bool true if the given $debug_level is equivalent
+     * @var int $debug_level
+     * @returns boolean true if the given $debug_level is equivalent
      *                  or more verbose than than the current debug level
      *                  and false otherwise.
      */
-    public static function isDebug(int $debugLevel = self::DEBUG1): bool
+    public static function isDebug($debug_level = self::DEBUG1)
     {
-        return self::DEBUG_LEVEL >= $debugLevel;
+        return (self::DEBUG_LEVEL >= $debug_level);
     }
 
     /**
+     * @param string $str
      * @param string $joiner string used to join
-     * @return string hex-represented bytes of each byte of $str
+     * @returns string hex-represented bytes of each byte of $str
      * joined by $joiner
      */
-    public static function hexString(string $str, string $joiner = ' '): string
+    public static function hexString($str, $joiner = ' ')
     {
         return implode($joiner, self::hexArray($str));
     }
 
     /**
-     * @return string[] array of hex representation of each byte of $str
+     * @param string $str
+     * @returns string[] array of hex representation of each byte of $str
      */
-    public static function hexArray(string $str): array
+    public static function hexArray($str)
     {
         return self::bytesArray($str);
     }
 
     /**
+     * @param string $str
      * @param string $format format to represent bytes
-     * @return string[] array of each byte of $str formatted using $format
+     * @returns string[] array of each byte of $str formatted using $format
      */
-    public static function bytesArray(string $str, string $format = 'x%02x'): array
+    public static function bytesArray($str, $format = 'x%02x')
     {
-        $x = [];
+        $x = array();
         foreach (str_split($str) as $b) {
             $x[] = sprintf($format, ord($b));
         }
-
         return $x;
     }
 
     /**
+     * @param string $str
      * @param string $joiner string to join bytes of $str
-     * @return string of bytes of $str represented in decimal format
+     * @returns string of bytes of $str represented in decimal format
      * @uses decArray()
      */
-    public static function decString(string $str, string $joiner = ' '): string
+    public static function decString($str, $joiner = ' ')
     {
         return implode($joiner, self::decArray($str));
     }
 
     /**
-     * @return string[] array of bytes of $str represented in decimal format ('%3d')
+     * @param string $str
+     * @returns string[] array of bytes of $str represented in decimal format ('%3d')
      */
-    public static function decArray(string $str): array
+    public static function decArray($str)
     {
         return self::bytesArray($str, '%3d');
     }
 
     /**
+     * @param string $str
      * @param string $format one of 'ctrl', 'hex', or 'dec'.
      *                       See {@link self::asciiArray()} for more description
-     * @throws AvroException
-     * @return string of bytes joined by $joiner
+     * @param string $joiner
+     * @returns string of bytes joined by $joiner
      * @uses asciiArray()
      */
-    public static function asciiString(string $str, string $format = 'ctrl', string $joiner = ' '): string
+    public static function asciiString($str, $format = 'ctrl', $joiner = ' ')
     {
         return implode($joiner, self::asciiArray($str, $format));
     }
 
     /**
+     * @param string $str
      * @param string $format one of 'ctrl', 'hex', or 'dec' for control,
      * hexadecimal, or decimal format for bytes.
      * - ctrl: ASCII control characters represented as text.
@@ -135,16 +142,16 @@ class AvroDebug
      * others are represented as a decimal ('%03d')
      * - hex: bytes represented in hexadecimal ('%02X')
      * - dec: bytes represented in decimal ('%03d')
+     * @returns string[] array of bytes represented in the given format.
      * @throws AvroException
-     * @return string[] array of bytes represented in the given format.
      */
-    public static function asciiArray(string $str, string $format = 'ctrl'): array
+    public static function asciiArray($str, $format = 'ctrl')
     {
         if (!in_array($format, ['ctrl', 'hex', 'dec'])) {
             throw new AvroException('Unrecognized format specifier');
         }
 
-        $ctrlChars = [
+        $ctrl_chars = array(
             'NUL',
             'SOH',
             'STX',
@@ -176,56 +183,49 @@ class AvroDebug
             'FS',
             'GS',
             'RS',
-            'US',
-        ];
-        $x = [];
+            'US'
+        );
+        $x = array();
         foreach (str_split($str) as $b) {
             $db = ord($b);
             if ($db < 32) {
                 switch ($format) {
                     case 'ctrl':
-                        $x[] = str_pad($ctrlChars[$db], 3, ' ', STR_PAD_LEFT);
-
+                        $x[] = str_pad($ctrl_chars[$db], 3, ' ', STR_PAD_LEFT);
                         break;
                     case 'hex':
                         $x[] = sprintf("x%02X", $db);
-
                         break;
                     case 'dec':
-                        $x[] = str_pad((string) $db, 3, '0', STR_PAD_LEFT);
-
+                        $x[] = str_pad($db, 3, '0', STR_PAD_LEFT);
                         break;
                 }
             } else {
                 if ($db < 127) {
                     $x[] = "  $b";
                 } else {
-                    if (127 == $db) {
+                    if ($db == 127) {
                         switch ($format) {
                             case 'ctrl':
                                 $x[] = 'DEL';
-
                                 break;
                             case 'hex':
                                 $x[] = sprintf("x%02X", $db);
-
                                 break;
                             case 'dec':
-                                $x[] = str_pad((string) $db, 3, '0', STR_PAD_LEFT);
-
+                                $x[] = str_pad($db, 3, '0', STR_PAD_LEFT);
                                 break;
                         }
                     } else {
                         if ('hex' === $format) {
                             $x[] = sprintf("x%02X", $db);
                         } else {
-                            $x[] = str_pad((string) $db, 3, '0', STR_PAD_LEFT);
+                            $x[] = str_pad($db, 3, '0', STR_PAD_LEFT);
                         }
                     }
                 }
             }
         }
-
         return $x;
     }
 }
diff --git a/lang/php/lib/AvroException.php b/lang/php/lib/AvroException.php
index e57efbb6c7..32a96c8242 100644
--- a/lang/php/lib/AvroException.php
+++ b/lang/php/lib/AvroException.php
@@ -22,6 +22,7 @@ namespace Apache\Avro;
 
 /**
  * General Avro exceptions.
+ * @package Avro
  */
 class AvroException extends \Exception
 {
diff --git a/lang/php/lib/AvroGMP.php b/lang/php/lib/AvroGMP.php
index cc1cd2a475..c868cf17a6 100644
--- a/lang/php/lib/AvroGMP.php
+++ b/lang/php/lib/AvroGMP.php
@@ -26,39 +26,41 @@ namespace Apache\Avro;
  * This is a naive and hackish implementation that is intended
  * to work well enough to support Avro. It has not been tested
  * beyond what's needed to decode and encode long values.
+ *
+ * @package Avro
  */
 class AvroGMP
 {
     /**
-     * @var \GMP memoized GMP resource for zero
+     * @var resource memoized GMP resource for zero
      */
-    private static \GMP $gmp_0;
+    private static $gmp_0;
     /**
-     * @var \GMP memoized GMP resource for one (1)
+     * @var resource memoized GMP resource for one (1)
      */
-    private static \GMP $gmp_1;
+    private static $gmp_1;
     /**
-     * @var \GMP memoized GMP resource for two (2)
+     * @var resource memoized GMP resource for two (2)
      */
-    private static \GMP $gmp_2;
+    private static $gmp_2;
     /**
-     * @var \GMP memoized GMP resource for 0x7f
+     * @var resource memoized GMP resource for 0x7f
      */
-    private static \GMP $gmp_0x7f;
+    private static $gmp_0x7f;
     /**
-     * @var \GMP memoized GMP resource for 64-bit ~0x7f
+     * @var resource memoized GMP resource for 64-bit ~0x7f
      */
-    private static \GMP $gmp_n0x7f;
+    private static $gmp_n0x7f;
     /**
-     * @var \GMP memoized GMP resource for 64-bits of 1
+     * @var resource memoized GMP resource for 64-bits of 1
      */
-    private static \GMP $gmp_0xfs;
+    private static $gmp_0xfs;
 
     /**
-     * @param int|string $n integer (or string representation of integer) to encode
+     * @param int|str $n integer (or string representation of integer) to encode
      * @return string $bytes of the long $n encoded per the Avro spec
      */
-    public static function encodeLong(int|string $n): string
+    public static function encodeLong($n)
     {
         $g = gmp_init($n);
         $g = gmp_xor(
@@ -71,16 +73,16 @@ class AvroGMP
             $g = self::shiftRight($g, 7);
         }
         $bytes .= chr(gmp_intval($g));
-
         return $bytes;
     }
 
     /**
      * @interal Only works up to shift 63 (doesn't wrap bits around).
+     * @param resource|int|string $g
      * @param int $shift number of bits to shift left
-     * @return \GMP $g shifted left
+     * @returns resource $g shifted left
      */
-    public static function shiftLeft(int|string|\GMP $g, int $shift)
+    public static function shiftLeft($g, $shift)
     {
         if (0 == $shift) {
             return $g;
@@ -98,24 +100,25 @@ class AvroGMP
                 self::gmp_1()
             ));
         }
-
         return $m;
     }
 
     /**
-     * @return \GMP resource 64-bit two's complement of input.
+     * @param GMP resource
+     * @returns GMP resource 64-bit two's complement of input.
      */
-    public static function gmpTwosComplement(int|string|\GMP $g)
+    public static function gmpTwosComplement($g)
     {
         return gmp_neg(gmp_sub(gmp_pow(self::gmp_2(), 64), $g));
     }
 
     /**
      * Arithmetic right shift
+     * @param resource|int|string $g
      * @param int $shift number of bits to shift right
-     * @return \GMP $g shifted right $shift bits
+     * @returns resource $g shifted right $shift bits
      */
-    public static function shiftRight(int|string|\GMP $g, int $shift)
+    public static function shiftRight($g, $shift)
     {
         if (0 == $shift) {
             return $g;
@@ -123,7 +126,8 @@ class AvroGMP
 
         if (0 <= gmp_sign($g)) {
             $m = gmp_div($g, gmp_pow(self::gmp_2(), $shift));
-        } else { // negative
+        } else // negative
+        {
             $g = gmp_and($g, self::gmp_0xfs());
             $m = gmp_div($g, gmp_pow(self::gmp_2(), $shift));
             $m = gmp_and($m, self::gmp_0xfs());
@@ -140,96 +144,91 @@ class AvroGMP
         return $m;
     }
 
-    /**
-     * @param int[] $bytes array of ascii codes of bytes to decode
-     * @return string represenation of decoded long.
-     */
-    public static function decodeLongFromArray(array $bytes): string
-    {
-        $b = array_shift($bytes);
-        $g = gmp_init($b & 0x7F);
-        $shift = 7;
-        while (0 != ($b & 0x80)) {
-            $b = array_shift($bytes);
-            $g = gmp_or($g, self::shiftLeft($b & 0x7F, $shift));
-            $shift += 7;
-        }
-        $val = gmp_xor(self::shiftRight($g, 1), gmp_neg(gmp_and($g, 1)));
-
-        return gmp_strval($val);
-    }
-
     // phpcs:disable PSR1.Methods.CamelCapsMethodName
 
     /**
-     * @return \GMP GMP resource for two (2)
+     * @returns resource GMP resource for two (2)
      */
     private static function gmp_2()
     {
         if (!isset(self::$gmp_2)) {
             self::$gmp_2 = gmp_init('2');
         }
-
         return self::$gmp_2;
     }
 
     /**
-     * @return \GMP GMP resource for 64-bits of 1
+     * @returns resource GMP resource for 64-bits of 1
      */
-    private static function gmp_0xfs(): \GMP
+    private static function gmp_0xfs()
     {
         if (!isset(self::$gmp_0xfs)) {
             self::$gmp_0xfs = gmp_init('0xffffffffffffffff');
         }
-
         return self::$gmp_0xfs;
     }
 
     /**
-     * @return \GMP GMP resource for one (1)
+     * @returns resource GMP resource for one (1)
      */
-    private static function gmp_1(): \GMP
+    private static function gmp_1()
     {
         if (!isset(self::$gmp_1)) {
             self::$gmp_1 = gmp_init('1');
         }
-
         return self::$gmp_1;
     }
 
     /**
-     * @return \GMP GMP resource for zero
+     * @returns resource GMP resource for zero
      */
-    private static function gmp_0(): \GMP
+    private static function gmp_0()
     {
         if (!isset(self::$gmp_0)) {
             self::$gmp_0 = gmp_init('0');
         }
-
         return self::$gmp_0;
     }
 
     /**
-     * @return \GMP GMP resource for 64-bit ~0x7f
+     * @returns resource GMP resource for 64-bit ~0x7f
      */
-    private static function gmp_n0x7f(): \GMP
+    private static function gmp_n0x7f()
     {
         if (!isset(self::$gmp_n0x7f)) {
             self::$gmp_n0x7f = gmp_init('0xffffffffffffff80');
         }
-
         return self::$gmp_n0x7f;
     }
 
     /**
-     * @return \GMP GMP resource for 0x7f
+     * @returns resource GMP resource for 0x7f
      */
-    private static function gmp_0x7f(): \GMP
+    private static function gmp_0x7f()
     {
         if (!isset(self::$gmp_0x7f)) {
             self::$gmp_0x7f = gmp_init('0x7f');
         }
-
         return self::$gmp_0x7f;
     }
+
+    // phpcs:enable
+
+    /**
+     * @param int[] $bytes array of ascii codes of bytes to decode
+     * @return string represenation of decoded long.
+     */
+    public static function decodeLongFromArray($bytes)
+    {
+        $b = array_shift($bytes);
+        $g = gmp_init($b & 0x7f);
+        $shift = 7;
+        while (0 != ($b & 0x80)) {
+            $b = array_shift($bytes);
+            $g = gmp_or($g, self::shiftLeft(($b & 0x7f), $shift));
+            $shift += 7;
+        }
+        $val = gmp_xor(self::shiftRight($g, 1), gmp_neg(gmp_and($g, 1)));
+        return gmp_strval($val);
+    }
 }
diff --git a/lang/php/lib/AvroIO.php b/lang/php/lib/AvroIO.php
index 869c76a0ff..30cd94e806 100644
--- a/lang/php/lib/AvroIO.php
+++ b/lang/php/lib/AvroIO.php
@@ -18,15 +18,15 @@
  * limitations under the License.
  */
 
-declare(strict_types=1);
-
 namespace Apache\Avro;
 
 /**
  * Barebones IO base class to provide common interface for file and string
  * access within the Avro classes.
+ *
+ * @package Avro
  */
-interface AvroIO
+class AvroIO
 {
     /**
      * @var string general read mode
@@ -52,40 +52,59 @@ interface AvroIO
 
     /**
      * Read $len bytes from AvroIO instance
+     * @return string bytes read
+     * @var int $len
      */
-    public function read(int $len): string;
+    public function read($len)
+    {
+        throw new AvroNotImplementedException('Not implemented');
+    }
 
     /**
      * Append bytes to this buffer. (Nothing more is needed to support Avro.)
-     * @param string $bytes bytes to write
+     * @param string $arg bytes to write
+     * @returns int count of bytes written.
      * @throws IO\AvroIOException if $args is not a string value.
-     * @return int count of bytes written.
      */
-    public function write(string $bytes): int;
+    public function write($arg)
+    {
+        throw new AvroNotImplementedException('Not implemented');
+    }
 
     /**
      * Return byte offset within AvroIO instance
+     * @return int
      */
-    public function tell(): int;
+    public function tell()
+    {
+        throw new AvroNotImplementedException('Not implemented');
+    }
 
     /**
      * Set the position indicator. The new position, measured in bytes
      * from the beginning of the file, is obtained by adding $offset to
      * the position specified by $whence.
      *
+     * @param int $offset
      * @param int $whence one of AvroIO::SEEK_SET, AvroIO::SEEK_CUR,
      *                    or Avro::SEEK_END
+     * @returns boolean true
      *
      * @throws IO\AvroIOException
-     * @return bool true
      */
-    public function seek(int $offset, int $whence = self::SEEK_SET): bool;
+    public function seek($offset, $whence = self::SEEK_SET): bool
+    {
+        throw new AvroNotImplementedException('Not implemented');
+    }
 
     /**
      * Flushes any buffered data to the AvroIO object.
-     * @return bool true upon success.
+     * @returns boolean true upon success.
      */
-    public function flush(): bool;
+    public function flush()
+    {
+        throw new AvroNotImplementedException('Not implemented');
+    }
 
     /**
      * Returns whether or not the current position at the end of this AvroIO
@@ -94,12 +113,18 @@ interface AvroIO
      * Note isEof() is <b>not</b> like eof in C or feof in PHP:
      * it returns TRUE if the *next* read would be end of file,
      * rather than if the *most recent* read read end of file.
-     * @return bool true if at the end of file, and false otherwise
+     * @returns boolean true if at the end of file, and false otherwise
      */
-    public function isEof(): bool;
+    public function isEof()
+    {
+        throw new AvroNotImplementedException('Not implemented');
+    }
 
     /**
      * Closes this AvroIO instance.
      */
-    public function close(): bool;
+    public function close()
+    {
+        throw new AvroNotImplementedException('Not implemented');
+    }
 }
diff --git a/lang/php/lib/AvroNotImplementedException.php b/lang/php/lib/AvroNotImplementedException.php
index 98b09fda85..a56f17fd5b 100644
--- a/lang/php/lib/AvroNotImplementedException.php
+++ b/lang/php/lib/AvroNotImplementedException.php
@@ -22,6 +22,7 @@ namespace Apache\Avro;
 
 /**
  * Avro "not implemented method" exception.
+ * @package Avro
  */
 class AvroNotImplementedException extends AvroException
 {
diff --git a/lang/php/lib/AvroUtil.php b/lang/php/lib/AvroUtil.php
index b32d8a8eed..c61d4988c1 100644
--- a/lang/php/lib/AvroUtil.php
+++ b/lang/php/lib/AvroUtil.php
@@ -22,6 +22,8 @@ namespace Apache\Avro;
 
 /**
  * Class for static utility methods used in Avro.
+ *
+ * @package Avro
  */
 class AvroUtil
 {
@@ -31,10 +33,11 @@ class AvroUtil
      * or a list (an array with monotonically increasing integer indicies
      * starting with zero).
      *
-     * @param mixed $ary array to test
-     * @return bool true if the array is a list and false otherwise.
+     * @param array $ary array to test
+     * @returns true if the array is a list and false otherwise.
+     *
      */
-    public static function isList(mixed $ary): bool
+    public static function isList($ary): bool
     {
         if (is_array($ary)) {
             $i = 0;
@@ -44,10 +47,8 @@ class AvroUtil
                 }
                 $i++;
             }
-
             return true;
         }
-
         return false;
     }
 }
diff --git a/lang/php/lib/DataFile/AvroDataIO.php b/lang/php/lib/DataFile/AvroDataIO.php
index 06ca2aee6a..aaea5bdb14 100644
--- a/lang/php/lib/DataFile/AvroDataIO.php
+++ b/lang/php/lib/DataFile/AvroDataIO.php
@@ -24,9 +24,11 @@ use Apache\Avro\AvroIO;
 use Apache\Avro\Datum\AvroIODatumReader;
 use Apache\Avro\Datum\AvroIODatumWriter;
 use Apache\Avro\IO\AvroFile;
-use Apache\Avro\IO\AvroIOException;
 use Apache\Avro\Schema\AvroSchema;
 
+/**
+ * @package Avro
+ */
 class AvroDataIO
 {
     /**
@@ -76,131 +78,131 @@ class AvroDataIO
     public const BZIP2_CODEC = 'bzip2';
 
     /**
-     * @var array<string> array of valid codec names
+     * @var array array of valid codec names
      */
-    private static array $validCodecs = [
+    private static $validCodecs = [
         self::NULL_CODEC,
         self::DEFLATE_CODEC,
         self::SNAPPY_CODEC,
         self::ZSTANDARD_CODEC,
-        self::BZIP2_CODEC,
+        self::BZIP2_CODEC
     ];
 
     /**
-     * @var ?AvroSchema cached version of metadata schema object
+     * @var AvroSchema cached version of metadata schema object
      */
-    private static ?AvroSchema $metadataSchema = null;
+    private static $metadataSchema;
 
     /**
-     * @return int count of bytes in the initial "magic" segment of the
+     * @returns int count of bytes in the initial "magic" segment of the
      *              Avro container file header
      */
-    public static function magicSize(): int
+    public static function magicSize()
     {
         return strlen(self::magic());
     }
 
     /**
-     * @return string the initial "magic" segment of an Avro container file header.
+     * @returns the initial "magic" segment of an Avro container file header.
      */
-    public static function magic(): string
+    public static function magic()
     {
-        return 'Obj'.pack('c', self::VERSION);
+        return ('Obj' . pack('c', self::VERSION));
     }
 
     /**
-     * @return AvroSchema object of Avro container file metadata.
+     * @returns AvroSchema object of Avro container file metadata.
      */
-    public static function metadataSchema(): AvroSchema
+    public static function metadataSchema()
     {
         if (is_null(self::$metadataSchema)) {
             self::$metadataSchema = AvroSchema::parse(self::METADATA_SCHEMA_JSON);
         }
-
         return self::$metadataSchema;
     }
 
     /**
      * @param string $file_path file_path of file to open
      * @param string $mode one of AvroFile::READ_MODE or AvroFile::WRITE_MODE
-     * @param null|string $schemaJson JSON of writer's schema
+     * @param string $schemaJson JSON of writer's schema
      * @param string $codec compression codec
+     * @returns AvroDataIOWriter instance of AvroDataIOWriter
      *
-     * @throws AvroDataIOException if $writers_schema is not provided or if an invalid $mode is given.
-     * @throws AvroIOException
+     * @throws AvroDataIOException if $writers_schema is not provided
+     *         or if an invalid $mode is given.
      */
     public static function openFile(
-        string $file_path,
-        string $mode = AvroIO::READ_MODE,
-        ?string $schemaJson = null,
-        string $codec = self::NULL_CODEC
-    ): AvroDataIOReader|AvroDataIOWriter {
+        $file_path,
+        $mode = AvroFile::READ_MODE,
+        $schemaJson = null,
+        $codec = self::NULL_CODEC
+    ) {
         $schema = !is_null($schemaJson)
             ? AvroSchema::parse($schemaJson) : null;
 
+        $io = false;
         switch ($mode) {
-            case AvroIO::WRITE_MODE:
+            case AvroFile::WRITE_MODE:
                 if (is_null($schema)) {
                     throw new AvroDataIOException('Writing an Avro file requires a schema.');
                 }
-                $file = new AvroFile($file_path, AvroIO::WRITE_MODE);
-
-                return self::openWriter($file, $schema, $codec);
-
-            case AvroIO::READ_MODE:
-                $file = new AvroFile($file_path, AvroIO::READ_MODE);
-
-                return self::openReader($file, $schema);
-
+                $file = new AvroFile($file_path, AvroFile::WRITE_MODE);
+                $io = self::openWriter($file, $schema, $codec);
+                break;
+            case AvroFile::READ_MODE:
+                $file = new AvroFile($file_path, AvroFile::READ_MODE);
+                $io = self::openReader($file, $schema);
+                break;
             default:
                 throw new AvroDataIOException(
                     sprintf(
                         "Only modes '%s' and '%s' allowed. You gave '%s'.",
-                        AvroIO::READ_MODE,
-                        AvroIO::WRITE_MODE,
+                        AvroFile::READ_MODE,
+                        AvroFile::WRITE_MODE,
                         $mode
                     )
                 );
         }
+        return $io;
     }
 
     /**
-     * @return bool true if $codec is a valid codec value and false otherwise
+     * @param AvroIO $io
+     * @param AvroSchema $schema
+     * @param string $codec
+     * @returns AvroDataIOWriter
      */
-    public static function isValidCodec(?string $codec): bool
+    protected static function openWriter($io, $schema, $codec = self::NULL_CODEC)
     {
-        return is_string($codec) && in_array($codec, self::validCodecs());
+        $writer = new AvroIODatumWriter($schema);
+        return new AvroDataIOWriter($io, $writer, $schema, $codec);
     }
 
     /**
-     * @return array<string> array of valid codecs
+     * @param AvroIO $io
+     * @param AvroSchema $schema
+     * @returns AvroDataIOReader
      */
-    public static function validCodecs(): array
+    protected static function openReader($io, $schema)
     {
-        return self::$validCodecs;
+        $reader = new AvroIODatumReader(null, $schema);
+        return new AvroDataIOReader($io, $reader);
     }
 
     /**
-     * @throws AvroDataIOException
+     * @param string $codec
+     * @returns boolean true if $codec is a valid codec value and false otherwise
      */
-    protected static function openWriter(AvroIO $io, ?AvroSchema $schema, string $codec = self::NULL_CODEC): AvroDataIOWriter
+    public static function isValidCodec($codec)
     {
-        return new AvroDataIOWriter(
-            io: $io,
-            datumWriter: new AvroIODatumWriter($schema),
-            writersSchema: $schema,
-            codec: $codec
-        );
+        return in_array($codec, self::validCodecs());
     }
 
     /**
-     * @throws AvroDataIOException
+     * @returns array array of valid codecs
      */
-    protected static function openReader(AvroIO $io, ?AvroSchema $schema): AvroDataIOReader
+    public static function validCodecs()
     {
-        return new AvroDataIOReader(
-            io: $io,
-            datumReader: new AvroIODatumReader(null, $schema)
-        );
+        return self::$validCodecs;
     }
 }
diff --git a/lang/php/lib/DataFile/AvroDataIOException.php b/lang/php/lib/DataFile/AvroDataIOException.php
index 4d396a4c32..25bcb2f8a0 100644
--- a/lang/php/lib/DataFile/AvroDataIOException.php
+++ b/lang/php/lib/DataFile/AvroDataIOException.php
@@ -24,6 +24,7 @@ use Apache\Avro\AvroException;
 
 /**
  * Raised when something unkind happens with respect to AvroDataIO.
+ * @package Avro
  */
 class AvroDataIOException extends AvroException
 {
diff --git a/lang/php/lib/DataFile/AvroDataIOReader.php b/lang/php/lib/DataFile/AvroDataIOReader.php
index eb0188231d..0dc4dd0ee4 100644
--- a/lang/php/lib/DataFile/AvroDataIOReader.php
+++ b/lang/php/lib/DataFile/AvroDataIOReader.php
@@ -22,48 +22,68 @@ namespace Apache\Avro\DataFile;
 
 use Apache\Avro\AvroException;
 use Apache\Avro\AvroIO;
+use Apache\Avro\AvroUtil;
 use Apache\Avro\Datum\AvroIOBinaryDecoder;
 use Apache\Avro\Datum\AvroIODatumReader;
-use Apache\Avro\IO\AvroIOException;
 use Apache\Avro\IO\AvroStringIO;
 use Apache\Avro\Schema\AvroSchema;
 
 /**
+ *
  * Reads Avro data from an AvroIO source using an AvroSchema.
+ * @package Avro
  */
 class AvroDataIOReader
 {
-    public string $sync_marker;
     /**
-     * @var array<string, mixed> object container metadata
+     * @var string
      */
-    public array $metadata;
-
-    private AvroIOBinaryDecoder $decoder;
+    public $sync_marker;
+    /**
+     * @var array object container metadata
+     */
+    public $metadata;
+    /**
+     * @var AvroIO
+     */
+    private $io;
+    /**
+     * @var AvroIOBinaryDecoder
+     */
+    private $decoder;
+    /**
+     * @var AvroIODatumReader
+     */
+    private $datum_reader;
     /**
      * @var int count of items in block
      */
-    private int $blockCount;
+    private $block_count;
 
     /**
-     * @var string compression codec
+     * @var compression codec
      */
-    private string $codec;
+    private $codec;
 
     /**
      * @param AvroIO $io source from which to read
-     * @param AvroIODatumReader $datumReader reader that understands
+     * @param AvroIODatumReader $datum_reader reader that understands
      *                                        the data schema
      * @throws AvroDataIOException if $io is not an instance of AvroIO
      *                             or the codec specified in the header
      *                             is not supported
      * @uses readHeader()
      */
-    public function __construct(
-        private AvroIO $io,
-        private AvroIODatumReader $datumReader
-    ) {
+    public function __construct($io, $datum_reader)
+    {
+
+        if (!($io instanceof AvroIO)) {
+            throw new AvroDataIOException('io must be instance of AvroIO');
+        }
+
+        $this->io = $io;
         $this->decoder = new AvroIOBinaryDecoder($this->io);
+        $this->datum_reader = $datum_reader;
         $this->readHeader();
 
         $codec = $this->metadata[AvroDataIO::METADATA_CODEC_ATTR] ?? null;
@@ -72,83 +92,25 @@ class AvroDataIOReader
         }
         $this->codec = $codec;
 
-        $this->blockCount = 0;
+        $this->block_count = 0;
         // FIXME: Seems unsanitary to set writers_schema here.
         // Can't constructor take it as an argument?
-        $this->datumReader->setWritersSchema(
+        $this->datum_reader->setWritersSchema(
             AvroSchema::parse($this->metadata[AvroDataIO::METADATA_SCHEMA_ATTR])
         );
     }
 
-    /**
-     * @throws AvroException
-     * @throws AvroIOException
-     * @return list<mixed> of data from object container.
-     * @internal Would be nice to implement data() as an iterator, I think
-     */
-    public function data(): array
-    {
-        $data = [];
-        $decoder = $this->decoder;
-        while (true) {
-            if (0 == $this->blockCount) {
-                if ($this->isEof()) {
-                    break;
-                }
-
-                if ($this->skipSync()) {
-                    /** @phpstan-ignore if.alwaysFalse */
-                    if ($this->isEof()) {
-                        break;
-                    }
-                }
-
-                $length = $this->readBlockHeader();
-                if (AvroDataIO::DEFLATE_CODEC === $this->codec) {
-                    $compressed = $decoder->read($length);
-                    $datum = $this->gzUncompress($compressed);
-                    $decoder = new AvroIOBinaryDecoder(new AvroStringIO($datum));
-                } elseif (AvroDataIO::ZSTANDARD_CODEC === $this->codec) {
-                    $compressed = $decoder->read($length);
-                    $datum = $this->zstdUncompress($compressed);
-                    $decoder = new AvroIOBinaryDecoder(new AvroStringIO($datum));
-                } elseif (AvroDataIO::SNAPPY_CODEC === $this->codec) {
-                    $compressed = $decoder->read($length);
-                    $datum = $this->snappyUncompress($compressed);
-                    $decoder = new AvroIOBinaryDecoder(new AvroStringIO($datum));
-                } elseif (AvroDataIO::BZIP2_CODEC === $this->codec) {
-                    $compressed = $decoder->read($length);
-                    $datum = $this->bzUncompress($compressed);
-                    $decoder = new AvroIOBinaryDecoder(new AvroStringIO($datum));
-                }
-            }
-            $data[] = $this->datumReader->read($decoder);
-            --$this->blockCount;
-        }
-
-        return $data;
-    }
-
-    /**
-     * Closes this writer (and its AvroIO object.)
-     * @uses AvroIO::close()
-     */
-    public function close(): bool
-    {
-        return $this->io->close();
-    }
-
     /**
      * Reads header of object container
      * @throws AvroDataIOException if the file is not an Avro data file.
      */
-    private function readHeader(): void
+    private function readHeader()
     {
         $this->seek(0, AvroIO::SEEK_SET);
 
         $magic = $this->read(AvroDataIO::magicSize());
 
-        if (strlen((string) $magic) < AvroDataIO::magicSize()) {
+        if (strlen($magic) < AvroDataIO::magicSize()) {
             throw new AvroDataIOException(
                 'Not an Avro data file: shorter than the Avro magic block'
             );
@@ -164,7 +126,7 @@ class AvroDataIOReader
             );
         }
 
-        $this->metadata = $this->datumReader->readData(
+        $this->metadata = $this->datum_reader->readData(
             AvroDataIO::metadataSchema(),
             AvroDataIO::metadataSchema(),
             $this->decoder
@@ -175,7 +137,7 @@ class AvroDataIOReader
     /**
      * @uses AvroIO::seek()
      */
-    private function seek(int $offset, int $whence): bool
+    private function seek($offset, $whence)
     {
         return $this->io->seek($offset, $whence);
     }
@@ -183,110 +145,105 @@ class AvroDataIOReader
     /**
      * @uses AvroIO::read()
      */
-    private function read(int $len): string
+    private function read($len)
     {
         return $this->io->read($len);
     }
 
     /**
-     * @uses AvroIO::isEof()
+     * @internal Would be nice to implement data() as an iterator, I think
+     * @returns array of data from object container.
      */
-    private function isEof(): bool
+    public function data()
     {
-        return $this->io->isEof();
-    }
+        $data = [];
+        $decoder = $this->decoder;
+        while (true) {
+            if (0 == $this->block_count) {
+                if ($this->isEof()) {
+                    break;
+                }
 
-    private function skipSync(): bool
-    {
-        $proposedSyncMarker = $this->read(AvroDataIO::SYNC_SIZE);
-        if ($proposedSyncMarker !== $this->sync_marker) {
-            $this->seek(-AvroDataIO::SYNC_SIZE, AvroIO::SEEK_CUR);
+                if ($this->skipSync()) {
+                    if ($this->isEof()) {
+                        break;
+                    }
+                }
 
-            return false;
+                $length = $this->readBlockHeader();
+                if ($this->codec == AvroDataIO::DEFLATE_CODEC) {
+                    $compressed = $decoder->read($length);
+                    $datum = gzinflate($compressed);
+                    $decoder = new AvroIOBinaryDecoder(new AvroStringIO($datum));
+                } elseif ($this->codec === AvroDataIO::ZSTANDARD_CODEC) {
+                    if (!extension_loaded('zstd')) {
+                        throw new AvroException('Please install ext-zstd to use zstandard compression.');
+                    }
+                    $compressed = $decoder->read($length);
+                    $datum = zstd_uncompress($compressed);
+                    $decoder = new AvroIOBinaryDecoder(new AvroStringIO($datum));
+                } elseif ($this->codec === AvroDataIO::SNAPPY_CODEC) {
+                    if (!extension_loaded('snappy')) {
+                        throw new AvroException('Please install ext-snappy to use snappy compression.');
+                    }
+                    $compressed = $decoder->read($length);
+                    $crc32 = unpack('N', substr($compressed, -4))[1];
+                    $datum = snappy_uncompress(substr($compressed, 0, -4));
+                    if ($crc32 === crc32($datum)) {
+                        $decoder = new AvroIOBinaryDecoder(new AvroStringIO($datum));
+                    } else {
+                        $decoder = new AvroIOBinaryDecoder(new AvroStringIO(snappy_uncompress($datum)));
+                    }
+                } elseif ($this->codec === AvroDataIO::BZIP2_CODEC) {
+                    if (!extension_loaded('bz2')) {
+                        throw new AvroException('Please install ext-bz2 to use bzip2 compression.');
+                    }
+                    $compressed = $decoder->read($length);
+                    $datum = bzdecompress($compressed);
+                    $decoder = new AvroIOBinaryDecoder(new AvroStringIO($datum));
+                }
+            }
+            $data[] = $this->datum_reader->read($decoder);
+            --$this->block_count;
         }
-
-        return true;
-    }
-
-    /**
-     * Reads the block header (which includes the count of items in the block
-     * and the length in bytes of the block)
-     * @return int|string length in bytes of the block. It returns a string if AvroGMP is enabled.
-     */
-    private function readBlockHeader(): string|int
-    {
-        $this->blockCount = $this->decoder->readLong();
-
-        return $this->decoder->readLong();
+        return $data;
     }
 
     /**
-     * @throws AvroException
+     * @uses AvroIO::isEof()
      */
-    private function gzUncompress(string $compressed): string
+    private function isEof()
     {
-        $datum = gzinflate($compressed);
-
-        if (false === $datum) {
-            throw new AvroException('gzip uncompression failed.');
-        }
-
-        return $datum;
+        return $this->io->isEof();
     }
 
-    /**
-     * @throws AvroException
-     */
-    private function zstdUncompress(string $compressed): string
+    private function skipSync()
     {
-        if (!extension_loaded('zstd')) {
-            throw new AvroException('Please install ext-zstd to use zstandard compression.');
-        }
-        $datum = zstd_uncompress($compressed);
-
-        if (false === $datum) {
-            throw new AvroException('zstd uncompression failed.');
+        $proposed_sync_marker = $this->read(AvroDataIO::SYNC_SIZE);
+        if ($proposed_sync_marker != $this->sync_marker) {
+            $this->seek(-AvroDataIO::SYNC_SIZE, AvroIO::SEEK_CUR);
+            return false;
         }
-
-        return $datum;
+        return true;
     }
 
     /**
-     * @throws AvroException
+     * Reads the block header (which includes the count of items in the block
+     * and the length in bytes of the block)
+     * @returns int length in bytes of the block.
      */
-    private function bzUncompress(string $compressed): string
+    private function readBlockHeader()
     {
-        if (!extension_loaded('bz2')) {
-            throw new AvroException('Please install ext-bz2 to use bzip2 compression.');
-        }
-        $datum = bzdecompress($compressed);
-
-        if (!is_string($datum)) {
-            throw new AvroException('bz2 uncompression failed.');
-        }
-
-        return $datum;
+        $this->block_count = $this->decoder->readLong();
+        return $this->decoder->readLong();
     }
 
     /**
-     * @throws AvroException
+     * Closes this writer (and its AvroIO object.)
+     * @uses AvroIO::close()
      */
-    private function snappyUncompress(string $compressed): string
+    public function close()
     {
-        if (!extension_loaded('snappy')) {
-            throw new AvroException('Please install ext-snappy to use snappy compression.');
-        }
-        $crc32 = unpack('N', substr((string) $compressed, -4))[1];
-        $datum = snappy_uncompress(substr((string) $compressed, 0, -4));
-
-        if (false === $datum) {
-            throw new AvroException('snappy uncompression failed.');
-        }
-
-        if ($crc32 !== crc32($datum)) {
-            throw new AvroException('snappy uncompression failed - crc32 mismatch.');
-        }
-
-        return $datum;
+        return $this->io->close();
     }
 }
diff --git a/lang/php/lib/DataFile/AvroDataIOWriter.php b/lang/php/lib/DataFile/AvroDataIOWriter.php
index c40d83a7ae..730a2ef2dd 100644
--- a/lang/php/lib/DataFile/AvroDataIOWriter.php
+++ b/lang/php/lib/DataFile/AvroDataIOWriter.php
@@ -30,248 +30,212 @@ use Apache\Avro\Schema\AvroSchema;
 
 /**
  * Writes Avro data to an AvroIO source using an AvroSchema
+ * @package Avro
  */
 class AvroDataIOWriter
 {
     /**
      * @var AvroIO object container where data is written
      */
-    private AvroIO $io;
+    private $io;
     /**
      * @var AvroIOBinaryEncoder encoder for object container
      */
-    private AvroIOBinaryEncoder $encoder;
+    private $encoder;
+    /**
+     * @var AvroIODatumWriter
+     */
+    private $datum_writer;
     /**
      * @var AvroStringIO buffer for writing
      */
-    private AvroStringIO $buffer;
-
-    private AvroIODatumWriter $datumWriter;
-
+    private $buffer;
     /**
      * @var AvroIOBinaryEncoder encoder for buffer
      */
-    private AvroIOBinaryEncoder $bufferEncoder;
+    private $buffer_encoder;
     /**
      * @var int count of items written to block
      */
-    private int $blockCount;
+    private $block_count; // AvroIOBinaryEncoder
     /**
-     * @var array<string, mixed> map of object container metadata
+     * @var array map of object container metadata
      */
-    private array $metadata;
+    private $metadata;
     /**
      * @var string compression codec
      */
-    private string $codec;
+    private $codec;
     /**
      * @var string sync marker
      */
-    private string $syncMarker;
+    private $sync_marker;
+
+    /**
+     * @param AvroIO $io
+     * @param AvroIODatumWriter $datum_writer
+     * @param AvroSchema $writers_schema
+     * @param string $codec
+     */
+    public function __construct($io, $datum_writer, $writers_schema = null, $codec = AvroDataIO::NULL_CODEC)
+    {
+        if (!($io instanceof AvroIO)) {
+            throw new AvroDataIOException('io must be instance of AvroIO');
+        }
 
-    public function __construct(
-        AvroIO $io,
-        AvroIODatumWriter $datumWriter,
-        string|AvroSchema|null $writersSchema = null,
-        string $codec = AvroDataIO::NULL_CODEC
-    ) {
         $this->io = $io;
-        $this->datumWriter = $datumWriter;
         $this->encoder = new AvroIOBinaryEncoder($this->io);
+        $this->datum_writer = $datum_writer;
         $this->buffer = new AvroStringIO();
-        $this->bufferEncoder = new AvroIOBinaryEncoder($this->buffer);
-        $this->blockCount = 0;
-        $this->metadata = [];
+        $this->buffer_encoder = new AvroIOBinaryEncoder($this->buffer);
+        $this->block_count = 0;
+        $this->metadata = array();
 
-        if ($writersSchema) {
+        if ($writers_schema) {
             if (!AvroDataIO::isValidCodec($codec)) {
                 throw new AvroDataIOException(
                     sprintf('codec %s is not supported', $codec)
                 );
             }
 
-            $this->syncMarker = self::generateSyncMarker();
+            $this->sync_marker = self::generateSyncMarker();
             $this->metadata[AvroDataIO::METADATA_CODEC_ATTR] = $this->codec = $codec;
-            $this->metadata[AvroDataIO::METADATA_SCHEMA_ATTR] = (string) $writersSchema;
+            $this->metadata[AvroDataIO::METADATA_SCHEMA_ATTR] = (string) $writers_schema;
             $this->writeHeader();
         } else {
             $dfr = new AvroDataIOReader($this->io, new AvroIODatumReader());
-            $this->syncMarker = $dfr->sync_marker;
+            $this->sync_marker = $dfr->sync_marker;
             $this->metadata[AvroDataIO::METADATA_CODEC_ATTR] = $this->codec
                 = $dfr->metadata[AvroDataIO::METADATA_CODEC_ATTR];
-            $schemaFromFile = $dfr->metadata[AvroDataIO::METADATA_SCHEMA_ATTR];
-            $this->metadata[AvroDataIO::METADATA_SCHEMA_ATTR] = $schemaFromFile;
-            $this->datumWriter->writersSchema = AvroSchema::parse($schemaFromFile);
+            $schema_from_file = $dfr->metadata[AvroDataIO::METADATA_SCHEMA_ATTR];
+            $this->metadata[AvroDataIO::METADATA_SCHEMA_ATTR] = $schema_from_file;
+            $this->datum_writer->writersSchema = AvroSchema::parse($schema_from_file);
             $this->seek(0, SEEK_END);
         }
     }
 
-    public function append(mixed $datum): void
-    {
-        $this->datumWriter->write($datum, $this->bufferEncoder);
-        $this->blockCount++;
-
-        if ($this->buffer->length() >= AvroDataIO::SYNC_INTERVAL) {
-            $this->writeBlock();
-        }
-    }
-
     /**
-     * Flushes buffer to AvroIO object container and closes it.
-     * @see AvroIO::close()
-     */
-    public function close(): bool
-    {
-        $this->flush();
-
-        return $this->io->close();
-    }
-
-    /**
-     * @return string a new, unique sync marker.
+     * @returns string a new, unique sync marker.
      */
-    private static function generateSyncMarker(): string
+    private static function generateSyncMarker()
     {
         // From https://php.net/manual/en/function.mt-rand.php comments
         return pack(
             'S8',
-            random_int(0, 0xFFFF),
-            random_int(0, 0xFFFF),
-            random_int(0, 0xFFFF),
-            random_int(0, 0xFFFF) | 0x4000,
-            random_int(0, 0xFFFF) | 0x8000,
-            random_int(0, 0xFFFF),
-            random_int(0, 0xFFFF),
-            random_int(0, 0xFFFF)
+            random_int(0, 0xffff),
+            random_int(0, 0xffff),
+            random_int(0, 0xffff),
+            random_int(0, 0xffff) | 0x4000,
+            random_int(0, 0xffff) | 0x8000,
+            random_int(0, 0xffff),
+            random_int(0, 0xffff),
+            random_int(0, 0xffff)
         );
     }
 
     /**
      * Writes the header of the AvroIO object container
      */
-    private function writeHeader(): void
+    private function writeHeader()
     {
         $this->write(AvroDataIO::magic());
-        $this->datumWriter->writeData(
+        $this->datum_writer->writeData(
             AvroDataIO::metadataSchema(),
             $this->metadata,
             $this->encoder
         );
-        $this->write($this->syncMarker);
+        $this->write($this->sync_marker);
     }
 
     /**
+     * @param string $bytes
      * @uses AvroIO::write()
      */
-    private function write(string $bytes): int
+    private function write($bytes)
     {
         return $this->io->write($bytes);
     }
 
     /**
+     * @param int $offset
+     * @param int $whence
      * @uses AvroIO::seek()
      */
-    private function seek(int $offset, int $whence): bool
+    private function seek($offset, $whence)
     {
         return $this->io->seek($offset, $whence);
     }
 
     /**
-     * Writes a block of data to the AvroIO object container.
+     * @param mixed $datum
      */
-    private function writeBlock(): void
+    public function append($datum)
     {
-        if ($this->blockCount > 0) {
-            $this->encoder->writeLong($this->blockCount);
-            $toWrite = (string) $this->buffer;
-
-            $toWrite = match ($this->codec) {
-                AvroDataIO::DEFLATE_CODEC => $this->gzCompress($toWrite),
-                AvroDataIO::ZSTANDARD_CODEC => $this->zstdCompress($toWrite),
-                AvroDataIO::SNAPPY_CODEC => $this->snappyCompress($toWrite),
-                AvroDataIO::BZIP2_CODEC => $this->bzCompress($toWrite),
-                default => $toWrite,
-            };
-
-            $this->encoder->writeLong(strlen($toWrite));
-            $this->write($toWrite);
-            $this->write($this->syncMarker);
-            $this->buffer->truncate();
-            $this->blockCount = 0;
-        }
-    }
+        $this->datum_writer->write($datum, $this->buffer_encoder);
+        $this->block_count++;
 
-    /**
-     * Flushes biffer to AvroIO object container.
-     * @see AvroIO::flush()
-     */
-    private function flush(): void
-    {
-        $this->writeBlock();
-        $this->io->flush();
-    }
-
-    /**
-     * @throws AvroException
-     */
-    private function gzCompress(string $data): string
-    {
-        $data = gzdeflate($data);
-        if (false === $data) {
-            throw new AvroException('gzip compression failed.');
+        if ($this->buffer->length() >= AvroDataIO::SYNC_INTERVAL) {
+            $this->writeBlock();
         }
-
-        return $data;
     }
 
     /**
-     * @throws AvroException
+     * Writes a block of data to the AvroIO object container.
      */
-    private function zstdCompress(string $data): string
+    private function writeBlock()
     {
-        if (!extension_loaded('zstd')) {
-            throw new AvroException('Please install ext-zstd to use zstandard compression.');
-        }
-        $data = zstd_compress($data);
+        if ($this->block_count > 0) {
+            $this->encoder->writeLong($this->block_count);
+            $to_write = (string) $this->buffer;
+
+            if ($this->codec === AvroDataIO::DEFLATE_CODEC) {
+                $to_write = gzdeflate($to_write);
+            } elseif ($this->codec === AvroDataIO::ZSTANDARD_CODEC) {
+                if (!extension_loaded('zstd')) {
+                    throw new AvroException('Please install ext-zstd to use zstandard compression.');
+                }
+                $to_write = zstd_compress($to_write);
+            } elseif ($this->codec === AvroDataIO::SNAPPY_CODEC) {
+                if (!extension_loaded('snappy')) {
+                    throw new AvroException('Please install ext-snappy to use snappy compression.');
+                }
+                $crc32 = crc32($to_write);
+                $compressed = snappy_compress($to_write);
+                $to_write = pack('a*N', $compressed, $crc32);
+            } elseif ($this->codec === AvroDataIO::BZIP2_CODEC) {
+                if (!extension_loaded('bz2')) {
+                    throw new AvroException('Please install ext-bz2 to use bzip2 compression.');
+                }
+                $to_write = bzcompress($to_write);
+            }
 
-        if (false === $data) {
-            throw new AvroException('zstd compression failed.');
+            $this->encoder->writeLong(strlen($to_write));
+            $this->write($to_write);
+            $this->write($this->sync_marker);
+            $this->buffer->truncate();
+            $this->block_count = 0;
         }
-
-        return $data;
     }
 
     /**
-     * @throws AvroException
+     * Flushes buffer to AvroIO object container and closes it.
+     * @return mixed value of $io->close()
+     * @see AvroIO::close()
      */
-    private function snappyCompress(string $data): string
+    public function close()
     {
-        if (!extension_loaded('snappy')) {
-            throw new AvroException('Please install ext-snappy to use snappy compression.');
-        }
-        $crc32 = crc32($data);
-        $compressed = snappy_compress($data);
-        if (false === $compressed) {
-            throw new AvroException('snappy compression failed.');
-        }
-
-        return pack('a*N', $compressed, $crc32);
+        $this->flush();
+        return $this->io->close();
     }
 
     /**
-     * @throws AvroException
+     * Flushes biffer to AvroIO object container.
+     * @returns mixed value of $io->flush()
+     * @see AvroIO::flush()
      */
-    private function bzCompress(string $toWrite): string
+    private function flush()
     {
-        if (!extension_loaded('bz2')) {
-            throw new AvroException('Please install ext-bz2 to use bzip2 compression.');
-        }
-        $toWrite = bzcompress($toWrite);
-
-        if (is_int($toWrite)) {
-            throw new AvroException("bz2 compression failed (error: {$toWrite}).");
-        }
-
-        return $toWrite;
+        $this->writeBlock();
+        return $this->io->flush();
     }
 }
diff --git a/lang/php/lib/Datum/AvroIOBinaryDecoder.php b/lang/php/lib/Datum/AvroIOBinaryDecoder.php
index ac5fcf7e92..31a007f0ac 100644
--- a/lang/php/lib/Datum/AvroIOBinaryDecoder.php
+++ b/lang/php/lib/Datum/AvroIOBinaryDecoder.php
@@ -25,61 +25,81 @@ use Apache\Avro\Avro;
 use Apache\Avro\AvroException;
 use Apache\Avro\AvroGMP;
 use Apache\Avro\AvroIO;
-use Apache\Avro\Schema\AvroArraySchema;
-use Apache\Avro\Schema\AvroFixedSchema;
-use Apache\Avro\Schema\AvroMapSchema;
-use Apache\Avro\Schema\AvroRecordSchema;
-use Apache\Avro\Schema\AvroSchema;
-use Apache\Avro\Schema\AvroUnionSchema;
 
 /**
  * Decodes and reads Avro data from an AvroIO object encoded using
  * Avro binary encoding.
+ *
+ * @package Avro
  */
 class AvroIOBinaryDecoder
 {
+    /**
+     * @var AvroIO
+     */
+    private $io;
+
     /**
      * @param AvroIO $io object from which to read.
      */
-    public function __construct(
-        private AvroIO $io
-    ) {
+    public function __construct($io)
+    {
         Avro::checkPlatform();
+        $this->io = $io;
     }
 
     /**
-     * @return null
+     * @returns null
      */
     public function readNull()
     {
         return null;
     }
 
-    public function readBoolean(): bool
+    /**
+     * @returns boolean
+     */
+    public function readBoolean()
+    {
+        return (bool) (1 == ord($this->nextByte()));
+    }
+
+    /**
+     * @returns string the next byte from $this->io.
+     * @throws AvroException if the next byte cannot be read.
+     */
+    private function nextByte()
     {
-        return 1 === ord($this->nextByte());
+        return $this->read(1);
     }
 
     /**
      * @param int $len count of bytes to read
+     * @returns string
      */
-    public function read(int $len): string
+    public function read($len)
     {
         return $this->io->read($len);
     }
 
-    public function readInt(): int
+    /**
+     * @returns int
+     */
+    public function readInt()
     {
         return (int) $this->readLong();
     }
 
-    public function readLong(): string|int
+    /**
+     * @returns string|int
+     */
+    public function readLong()
     {
         $byte = ord($this->nextByte());
-        $bytes = [$byte];
+        $bytes = array($byte);
         while (0 != ($byte & 0x80)) {
             $byte = ord($this->nextByte());
-            $bytes[] = $byte;
+            $bytes [] = $byte;
         }
 
         if (Avro::usesGmp()) {
@@ -90,25 +110,27 @@ class AvroIOBinaryDecoder
     }
 
     /**
-     * @param int[] $bytes array of byte ascii values
-     * @return int decoded value
+     * @param int[] array of byte ascii values
+     * @returns long decoded value
      * @internal Requires 64-bit platform
      */
-    public static function decodeLongFromArray(array $bytes): int
+    public static function decodeLongFromArray($bytes)
     {
         $b = array_shift($bytes);
-        $n = $b & 0x7F;
+        $n = $b & 0x7f;
         $shift = 7;
         while (0 != ($b & 0x80)) {
             $b = array_shift($bytes);
-            $n |= (($b & 0x7F) << $shift);
+            $n |= (($b & 0x7f) << $shift);
             $shift += 7;
         }
-
         return ($n >> 1) ^ (($n >> 63) << 63) ^ -($n & 1);
     }
 
-    public function readFloat(): float
+    /**
+     * @returns float
+     */
+    public function readFloat()
     {
         return self::intBitsToFloat($this->read(4));
     }
@@ -118,15 +140,20 @@ class AvroIOBinaryDecoder
      *
      * XXX: This is <b>not</b> endian-aware! See comments in
      * {@link AvroIOBinaryEncoder::floatToIntBits()} for details.
+     *
+     * @param string $bits
+     * @returns float
      */
-    public static function intBitsToFloat(string $bits): float
+    public static function intBitsToFloat($bits)
     {
         $float = unpack('g', $bits);
-
         return (float) $float[1];
     }
 
-    public function readDouble(): float
+    /**
+     * @returns double
+     */
+    public function readDouble()
     {
         return self::longBitsToDouble($this->read(8));
     }
@@ -136,53 +163,70 @@ class AvroIOBinaryDecoder
      *
      * XXX: This is <b>not</b> endian-aware! See comments in
      * {@link AvroIOBinaryEncoder::floatToIntBits()} for details.
+     *
+     * @param string $bits
+     * @returns float
      */
-    public static function longBitsToDouble(string $bits): float
+    public static function longBitsToDouble($bits)
     {
         $double = unpack('e', $bits);
-
-        return (float) $double[1];
+        return (double) $double[1];
     }
 
     /**
      * A string is encoded as a long followed by that many bytes
      * of UTF-8 encoded character data.
+     * @returns string
      */
-    public function readString(): string
+    public function readString()
     {
         return $this->readBytes();
     }
 
-    public function readBytes(): string
+    /**
+     * @returns string
+     */
+    public function readBytes()
     {
         return $this->read($this->readLong());
     }
 
-    public function skipNull(): void
+    public function skipNull()
     {
-
+        return null;
     }
 
-    public function skipBoolean(): void
+    public function skipBoolean()
     {
-        $this->skip(1);
+        return $this->skip(1);
     }
 
     /**
      * @param int $len count of bytes to skip
      * @uses AvroIO::seek()
      */
-    public function skip(int $len): void
+    public function skip($len)
     {
         $this->seek($len, AvroIO::SEEK_CUR);
     }
 
-    public function skipInt(): void
+    /**
+     * @param int $offset
+     * @param int $whence
+     * @returns boolean true upon success
+     * @uses AvroIO::seek()
+     */
+    private function seek($offset, $whence)
+    {
+        return $this->io->seek($offset, $whence);
+    }
+
+    public function skipInt()
     {
-        $this->skipLong();
+        return $this->skipLong();
     }
 
-    public function skipLong(): void
+    public function skipLong()
     {
         $b = ord($this->nextByte());
         while (0 != ($b & 0x80)) {
@@ -190,100 +234,83 @@ class AvroIOBinaryDecoder
         }
     }
 
-    public function skipFloat(): void
+    public function skipFloat()
     {
-        $this->skip(4);
+        return $this->skip(4);
     }
 
-    public function skipDouble(): void
+    public function skipDouble()
     {
-        $this->skip(8);
+        return $this->skip(8);
     }
 
-    public function skipString(): void
+    public function skipString()
     {
-        $this->skipBytes();
+        return $this->skipBytes();
     }
 
-    public function skipBytes(): void
+    public function skipBytes()
     {
-        $this->skip($this->readLong());
+        return $this->skip($this->readLong());
     }
 
-    public function skipFixed(AvroFixedSchema $writersSchema, AvroIOBinaryDecoder $decoder): void
+    public function skipFixed($writers_schema, AvroIOBinaryDecoder $decoder)
     {
-        $decoder->skip($writersSchema->size());
+        $decoder->skip($writers_schema->size());
     }
 
-    public function skipEnum(AvroSchema $writersSchema, AvroIOBinaryDecoder $decoder): void
+    public function skipEnum($writers_schema, AvroIOBinaryDecoder $decoder)
     {
         $decoder->skipInt();
     }
 
-    public function skipUnion(AvroUnionSchema $writersSchema, AvroIOBinaryDecoder $decoder): void
+    public function skipUnion($writers_schema, AvroIOBinaryDecoder $decoder)
     {
         $index = $decoder->readLong();
-        AvroIODatumReader::skipData($writersSchema->schemaByIndex($index), $decoder);
+        AvroIODatumReader::skipData($writers_schema->schemaByIndex($index), $decoder);
     }
 
-    public function skipRecord(AvroRecordSchema $writersSchema, AvroIOBinaryDecoder $decoder): void
+    public function skipRecord($writers_schema, AvroIOBinaryDecoder $decoder)
     {
-        foreach ($writersSchema->fields() as $f) {
+        foreach ($writers_schema->fields() as $f) {
             AvroIODatumReader::skipData($f->type(), $decoder);
         }
     }
 
-    public function skipArray(AvroArraySchema $writersSchema, AvroIOBinaryDecoder $decoder): void
+    public function skipArray($writers_schema, AvroIOBinaryDecoder $decoder)
     {
-        $blockCount = $decoder->readLong();
-        while (0 !== $blockCount) {
-            if ($blockCount < 0) {
+        $block_count = $decoder->readLong();
+        while (0 !== $block_count) {
+            if ($block_count < 0) {
                 $decoder->skip($this->readLong());
             }
-            for ($i = 0; $i < $blockCount; $i++) {
-                AvroIODatumReader::skipData($writersSchema->items(), $decoder);
+            for ($i = 0; $i < $block_count; $i++) {
+                AvroIODatumReader::skipData($writers_schema->items(), $decoder);
             }
-            $blockCount = $decoder->readLong();
+            $block_count = $decoder->readLong();
         }
     }
 
-    public function skipMap(AvroMapSchema $writersSchema, AvroIOBinaryDecoder $decoder): void
+    public function skipMap($writers_schema, AvroIOBinaryDecoder $decoder)
     {
-        $blockCount = $decoder->readLong();
-        while (0 !== $blockCount) {
-            if ($blockCount < 0) {
+        $block_count = $decoder->readLong();
+        while (0 !== $block_count) {
+            if ($block_count < 0) {
                 $decoder->skip($this->readLong());
             }
-            for ($i = 0; $i < $blockCount; $i++) {
+            for ($i = 0; $i < $block_count; $i++) {
                 $decoder->skipString();
-                AvroIODatumReader::skipData($writersSchema->values(), $decoder);
+                AvroIODatumReader::skipData($writers_schema->values(), $decoder);
             }
-            $blockCount = $decoder->readLong();
+            $block_count = $decoder->readLong();
         }
     }
 
     /**
-     * @throws AvroException if the next byte cannot be read.
-     * @return string the next byte from $this->io.
-     */
-    private function nextByte(): string
-    {
-        return $this->read(1);
-    }
-
-    /**
-     * @uses AvroIO::seek()
-     */
-    private function seek(int $offset, int $whence): bool
-    {
-        return $this->io->seek($offset, $whence);
-    }
-
-    /**
-     * @return int position of pointer in AvroIO instance
+     * @returns int position of pointer in AvroIO instance
      * @uses AvroIO::tell()
      */
-    private function tell(): int
+    private function tell()
     {
         return $this->io->tell();
     }
diff --git a/lang/php/lib/Datum/AvroIOBinaryEncoder.php b/lang/php/lib/Datum/AvroIOBinaryEncoder.php
index 1ef350809a..d4c47248c1 100644
--- a/lang/php/lib/Datum/AvroIOBinaryEncoder.php
+++ b/lang/php/lib/Datum/AvroIOBinaryEncoder.php
@@ -21,50 +21,69 @@
 namespace Apache\Avro\Datum;
 
 use Apache\Avro\Avro;
-use Apache\Avro\AvroException;
 use Apache\Avro\AvroGMP;
 use Apache\Avro\AvroIO;
 
 /**
  * Encodes and writes Avro data to an AvroIO object using
  * Avro binary encoding.
+ *
+ * @package Avro
  */
 class AvroIOBinaryEncoder
 {
+    /**
+     * @var AvroIO
+     */
+    private $io;
+
     /**
      * @param AvroIO $io object to which data is to be written.
+     *
      */
-    public function __construct(
-        private readonly AvroIO $io
-    ) {
+    public function __construct($io)
+    {
         Avro::checkPlatform();
+        $this->io = $io;
     }
 
     /**
      * @param null $datum actual value is ignored
      */
-    public function writeNull($datum): void
+    public function writeNull($datum)
     {
-
+        return null;
     }
 
-    public function writeBoolean(bool $datum): void
+    /**
+     * @param boolean $datum
+     */
+    public function writeBoolean($datum)
     {
         $byte = $datum ? chr(1) : chr(0);
         $this->write($byte);
     }
 
-    public function write(string $datum): void
+    /**
+     * @param string $datum
+     */
+    public function write($datum)
     {
         $this->io->write($datum);
     }
 
-    public function writeInt(int|string $datum): void
+    /**
+     * @param int $datum
+     */
+    public function writeInt($datum)
     {
         $this->writeLong($datum);
     }
 
-    public function writeLong(int|string $n): void
+    /**
+     * @param int $n
+     */
+    public function writeLong($n)
     {
         if (Avro::usesGmp()) {
             $this->write(AvroGMP::encodeLong($n));
@@ -75,7 +94,7 @@ class AvroIOBinaryEncoder
 
     /**
      * @param int|string $n
-     * @return string long $n encoded as bytes
+     * @returns string long $n encoded as bytes
      * @internal This relies on 64-bit PHP.
      */
     public static function encodeLong($n)
@@ -99,7 +118,6 @@ class AvroIOBinaryEncoder
         }
 
         $buf[] = $n;
-
         return pack("C*", ...$buf);
     }
 
@@ -107,7 +125,7 @@ class AvroIOBinaryEncoder
      * @param float $datum
      * @uses self::floatToIntBits()
      */
-    public function writeFloat($datum): void
+    public function writeFloat($datum)
     {
         $this->write(self::floatToIntBits($datum));
     }
@@ -121,18 +139,19 @@ class AvroIOBinaryEncoder
      * encoding required by the Avro spec.
      *
      * @param float $float
-     * @return string bytes
+     * @returns string bytes
      * @see Avro::checkPlatform()
      */
-    public static function floatToIntBits($float): string
+    public static function floatToIntBits($float)
     {
         return pack('g', (float) $float);
     }
 
     /**
+     * @param float $datum
      * @uses self::doubleToLongBits()
      */
-    public function writeDouble(float $datum): void
+    public function writeDouble($datum)
     {
         $this->write(self::doubleToLongBits($datum));
     }
@@ -143,70 +162,29 @@ class AvroIOBinaryEncoder
      * XXX: This is <b>not</b> endian-aware! See comments in
      * {@link AvroIOBinaryEncoder::floatToIntBits()} for details.
      *
-     * @param float $double
-     * @return string bytes
+     * @param double $double
+     * @returns string bytes
      */
-    public static function doubleToLongBits($double): string
+    public static function doubleToLongBits($double)
     {
-        return pack('e', (float) $double);
+        return pack('e', (double) $double);
     }
 
     /**
+     * @param string $str
      * @uses self::writeBytes()
      */
-    public function writeString(string $str): void
+    public function writeString($str)
     {
         $this->writeBytes($str);
     }
 
-    public function writeBytes(string $bytes): void
+    /**
+     * @param string $bytes
+     */
+    public function writeBytes($bytes)
     {
         $this->writeLong(strlen($bytes));
         $this->write($bytes);
     }
-
-    public function writeDecimal(string $decimal, int $scale, int $precision): void
-    {
-        if (!is_numeric($decimal)) {
-            throw new AvroException("Decimal value '{$decimal}' must be numeric");
-        }
-
-        $value = ((float) $decimal) * (10 ** $scale);
-        $value = (int) round($value);
-
-        $maxValue = 10 ** $precision;
-        if (abs($value) >= $maxValue) {
-            throw new AvroException(
-                "Decimal value '{$decimal}' is out of range for precision={$precision}, scale={$scale}"
-            );
-        }
-
-        $packed = pack('J', $value);
-
-        $significantBit = self::getMostSignificantBitAt($packed, 0);
-        $trimByte = $significantBit ? 0xFF : 0x00;
-
-        $offset = 0;
-        $packedLength = strlen($packed);
-        while ($offset < $packedLength - 1) {
-            if (ord($packed[$offset]) !== $trimByte) {
-                break;
-            }
-
-            if (self::getMostSignificantBitAt($packed, $offset + 1) !== $significantBit) {
-                break;
-            }
-
-            $offset++;
-        }
-
-        $value = substr($packed, $offset);
-
-        $this->writeBytes($value);
-    }
-
-    private static function getMostSignificantBitAt(string $bytes, int $offset): int
-    {
-        return ord($bytes[$offset]) & 0x80;
-    }
 }
diff --git a/lang/php/lib/Datum/AvroIODatumReader.php b/lang/php/lib/Datum/AvroIODatumReader.php
index 48f193f4c0..c9a5ae3953 100644
--- a/lang/php/lib/Datum/AvroIODatumReader.php
+++ b/lang/php/lib/Datum/AvroIODatumReader.php
@@ -21,191 +21,202 @@
 namespace Apache\Avro\Datum;
 
 use Apache\Avro\AvroException;
-use Apache\Avro\Datum\Type\AvroDuration;
-use Apache\Avro\Schema\AvroAliasedSchema;
-use Apache\Avro\Schema\AvroArraySchema;
-use Apache\Avro\Schema\AvroEnumSchema;
-use Apache\Avro\Schema\AvroFixedSchema;
-use Apache\Avro\Schema\AvroLogicalType;
-use Apache\Avro\Schema\AvroMapSchema;
 use Apache\Avro\Schema\AvroName;
-use Apache\Avro\Schema\AvroPrimitiveSchema;
-use Apache\Avro\Schema\AvroRecordSchema;
 use Apache\Avro\Schema\AvroSchema;
-use Apache\Avro\Schema\AvroSchemaParseException;
-use Apache\Avro\Schema\AvroUnionSchema;
 
 /**
  * Handles schema-specifc reading of data from the decoder.
  *
  * Also handles schema resolution between the reader and writer
  * schemas (if a writer's schema is provided).
+ *
+ * @package Avro
  */
 class AvroIODatumReader
 {
-    public function __construct(
-        private ?AvroSchema $writersSchema = null,
-        private ?AvroSchema $readersSchema = null
-    ) {
+    /**
+     * @var AvroSchema
+     */
+    private $writers_schema;
+    /**
+     * @var AvroSchema
+     */
+    private $readers_schema;
+
+    /**
+     * @param AvroSchema $writers_schema
+     * @param AvroSchema $readers_schema
+     */
+    public function __construct($writers_schema = null, $readers_schema = null)
+    {
+        $this->writers_schema = $writers_schema;
+        $this->readers_schema = $readers_schema;
     }
 
-    public function setWritersSchema(AvroSchema $schema): void
+    /**
+     * @param AvroSchema $readers_schema
+     */
+    public function setWritersSchema($readers_schema)
     {
-        $this->writersSchema = $schema;
+        $this->writers_schema = $readers_schema;
     }
 
-    public function read(AvroIOBinaryDecoder $decoder): mixed
+    /**
+     * @param AvroIOBinaryDecoder $decoder
+     * @returns string
+     */
+    public function read($decoder)
     {
-        if (is_null($this->readersSchema)) {
-            $this->readersSchema = $this->writersSchema;
+        if (is_null($this->readers_schema)) {
+            $this->readers_schema = $this->writers_schema;
         }
-
         return $this->readData(
-            $this->writersSchema,
-            $this->readersSchema,
+            $this->writers_schema,
+            $this->readers_schema,
             $decoder
         );
     }
 
-    public function readData(
-        AvroSchema $writersSchema,
-        AvroSchema $readersSchema,
-        AvroIOBinaryDecoder $decoder
-    ): mixed {
+    /**
+     * @returns mixed
+     */
+    public function readData($writers_schema, $readers_schema, $decoder)
+    {
         // Schema resolution: reader's schema is a union, writer's schema is not
         if (
-            $readersSchema instanceof AvroUnionSchema
-            && AvroSchema::UNION_SCHEMA === $readersSchema->type()
-            && AvroSchema::UNION_SCHEMA !== $writersSchema->type()
+            AvroSchema::UNION_SCHEMA === $readers_schema->type()
+            && AvroSchema::UNION_SCHEMA !== $writers_schema->type()
         ) {
-            foreach ($readersSchema->schemas() as $schema) {
-                if (self::schemasMatch($writersSchema, $schema)) {
-                    return $this->readData($writersSchema, $schema, $decoder);
+            foreach ($readers_schema->schemas() as $schema) {
+                if (self::schemasMatch($writers_schema, $schema)) {
+                    return $this->readData($writers_schema, $schema, $decoder);
                 }
             }
-
-            throw new AvroIOSchemaMatchException($writersSchema, $readersSchema);
+            throw new AvroIOSchemaMatchException($writers_schema, $readers_schema);
         }
 
-        return match ($writersSchema->type()) {
-            AvroSchema::NULL_TYPE => $decoder->readNull(),
-            AvroSchema::BOOLEAN_TYPE => $decoder->readBoolean(),
-            AvroSchema::INT_TYPE => $decoder->readInt(),
-            AvroSchema::LONG_TYPE => $decoder->readLong(),
-            AvroSchema::FLOAT_TYPE => $decoder->readFloat(),
-            AvroSchema::DOUBLE_TYPE => $decoder->readDouble(),
-            AvroSchema::STRING_TYPE => $decoder->readString(),
-            AvroSchema::BYTES_TYPE => $this->readBytes($writersSchema, $readersSchema, $decoder->readBytes()),
-            AvroSchema::ARRAY_SCHEMA => $this->readArray($writersSchema, $readersSchema, $decoder),
-            AvroSchema::MAP_SCHEMA => $this->readMap($writersSchema, $readersSchema, $decoder),
-            AvroSchema::UNION_SCHEMA => $this->readUnion($writersSchema, $readersSchema, $decoder),
-            AvroSchema::ENUM_SCHEMA => $this->readEnum($writersSchema, $readersSchema, $decoder),
-            AvroSchema::FIXED_SCHEMA => $this->readFixed($writersSchema, $readersSchema, $decoder),
-            AvroSchema::RECORD_SCHEMA,
-            AvroSchema::ERROR_SCHEMA,
-            AvroSchema::REQUEST_SCHEMA => $this->readRecord($writersSchema, $readersSchema, $decoder),
-            default => throw new AvroException(sprintf(
-                "Cannot read unknown schema type: %s",
-                $writersSchema->type()
-            )),
-        };
+        switch ($writers_schema->type()) {
+            case AvroSchema::NULL_TYPE:
+                return $decoder->readNull();
+            case AvroSchema::BOOLEAN_TYPE:
+                return $decoder->readBoolean();
+            case AvroSchema::INT_TYPE:
+                return $decoder->readInt();
+            case AvroSchema::LONG_TYPE:
+                return $decoder->readLong();
+            case AvroSchema::FLOAT_TYPE:
+                return $decoder->readFloat();
+            case AvroSchema::DOUBLE_TYPE:
+                return $decoder->readDouble();
+            case AvroSchema::STRING_TYPE:
+                return $decoder->readString();
+            case AvroSchema::BYTES_TYPE:
+                return $decoder->readBytes();
+            case AvroSchema::ARRAY_SCHEMA:
+                return $this->readArray($writers_schema, $readers_schema, $decoder);
+            case AvroSchema::MAP_SCHEMA:
+                return $this->readMap($writers_schema, $readers_schema, $decoder);
+            case AvroSchema::UNION_SCHEMA:
+                return $this->readUnion($writers_schema, $readers_schema, $decoder);
+            case AvroSchema::ENUM_SCHEMA:
+                return $this->readEnum($writers_schema, $readers_schema, $decoder);
+            case AvroSchema::FIXED_SCHEMA:
+                return $this->readFixed($writers_schema, $readers_schema, $decoder);
+            case AvroSchema::RECORD_SCHEMA:
+            case AvroSchema::ERROR_SCHEMA:
+            case AvroSchema::REQUEST_SCHEMA:
+                return $this->readRecord($writers_schema, $readers_schema, $decoder);
+            default:
+                throw new AvroException(sprintf(
+                    "Cannot read unknown schema type: %s",
+                    $writers_schema->type()
+                ));
+        }
     }
 
     /**
-     * @throws AvroSchemaParseException
-     * @return bool true if the schemas are consistent with each other and false otherwise.
+     *
+     * @param AvroSchema $writers_schema
+     * @param AvroSchema $readers_schema
+     * @returns boolean true if the schemas are consistent with
+     *                  each other and false otherwise.
      */
-    public static function schemasMatch(
-        AvroSchema $writersSchema,
-        AvroSchema $readersSchema
-    ): bool {
-        $writersSchemaType = $writersSchema->type;
-        $readersSchemaType = $readersSchema->type;
+    public static function schemasMatch($writers_schema, $readers_schema)
+    {
+        $writers_schema_type = $writers_schema->type;
+        $readers_schema_type = $readers_schema->type;
 
-        if (AvroSchema::UNION_SCHEMA === $writersSchemaType || AvroSchema::UNION_SCHEMA === $readersSchemaType) {
+        if (AvroSchema::UNION_SCHEMA === $writers_schema_type || AvroSchema::UNION_SCHEMA === $readers_schema_type) {
             return true;
         }
 
-        if (
-            $writersSchema instanceof AvroPrimitiveSchema
-            && $readersSchema instanceof AvroPrimitiveSchema
-            && $writersSchemaType === $readersSchemaType
-        ) {
+        if (AvroSchema::isPrimitiveType($writers_schema_type)) {
             return true;
         }
 
-        switch ($readersSchemaType) {
+        switch ($readers_schema_type) {
             case AvroSchema::MAP_SCHEMA:
-                if (
-                    !$writersSchema instanceof AvroMapSchema
-                    || !$readersSchema instanceof AvroMapSchema
-                ) {
-                    return false;
-                }
-
                 return self::attributesMatch(
-                    $writersSchema->values(),
-                    $readersSchema->values(),
+                    $writers_schema->values(),
+                    $readers_schema->values(),
                     [AvroSchema::TYPE_ATTR]
                 );
             case AvroSchema::ARRAY_SCHEMA:
-                if (
-                    !$writersSchema instanceof AvroArraySchema
-                    || !$readersSchema instanceof AvroArraySchema
-                ) {
-                    return false;
-                }
-
                 return self::attributesMatch(
-                    $writersSchema->items(),
-                    $readersSchema->items(),
+                    $writers_schema->items(),
+                    $readers_schema->items(),
                     [AvroSchema::TYPE_ATTR]
                 );
+            case AvroSchema::ENUM_SCHEMA:
+                return self::attributesMatch(
+                    $writers_schema,
+                    $readers_schema,
+                    [AvroSchema::FULLNAME_ATTR]
+                );
             case AvroSchema::FIXED_SCHEMA:
                 return self::attributesMatch(
-                    $writersSchema,
-                    $readersSchema,
+                    $writers_schema,
+                    $readers_schema,
                     [
                         AvroSchema::FULLNAME_ATTR,
-                        AvroSchema::SIZE_ATTR,
+                        AvroSchema::SIZE_ATTR
                     ]
                 );
-            case AvroSchema::ENUM_SCHEMA:
             case AvroSchema::RECORD_SCHEMA:
             case AvroSchema::ERROR_SCHEMA:
                 return self::attributesMatch(
-                    $writersSchema,
-                    $readersSchema,
+                    $writers_schema,
+                    $readers_schema,
                     [AvroSchema::FULLNAME_ATTR]
                 );
             case AvroSchema::REQUEST_SCHEMA:
                 // XXX: This seems wrong
                 return true;
-                // XXX: no default
+            // XXX: no default
         }
 
         if (
-            AvroSchema::INT_TYPE === $writersSchemaType
-            && in_array($readersSchemaType, [
+            AvroSchema::INT_TYPE === $writers_schema_type
+            && in_array($readers_schema_type, [
                 AvroSchema::LONG_TYPE,
                 AvroSchema::FLOAT_TYPE,
-                AvroSchema::DOUBLE_TYPE,
+                AvroSchema::DOUBLE_TYPE
             ])
         ) {
             return true;
         }
 
         if (
-            AvroSchema::LONG_TYPE === $writersSchemaType
-            && in_array($readersSchemaType, [
+            AvroSchema::LONG_TYPE === $writers_schema_type
+            && in_array($readers_schema_type, [
                 AvroSchema::FLOAT_TYPE,
-                AvroSchema::DOUBLE_TYPE,
+                AvroSchema::DOUBLE_TYPE
             ])
         ) {
             return true;
         }
 
-        if (AvroSchema::FLOAT_TYPE === $writersSchemaType && AvroSchema::DOUBLE_TYPE === $readersSchemaType) {
+        if (AvroSchema::FLOAT_TYPE === $writers_schema_type && AvroSchema::DOUBLE_TYPE === $readers_schema_type) {
             return true;
         }
 
@@ -215,26 +226,17 @@ class AvroIODatumReader
     /**
      * Checks equivalence of the given attributes of the two given schemas.
      *
+     * @param AvroSchema $schema_one
+     * @param AvroSchema $schema_two
      * @param string[] $attribute_names array of string attribute names to compare
      *
-     * @throws AvroSchemaParseException
-     * @return bool true if the attributes match and false otherwise.
+     * @return boolean true if the attributes match and false otherwise.
      */
-    public static function attributesMatch(
-        AvroSchema $schema_one,
-        AvroSchema $schema_two,
-        array $attribute_names
-    ): bool {
+    public static function attributesMatch($schema_one, $schema_two, $attribute_names)
+    {
         foreach ($attribute_names as $attribute_name) {
             if ($schema_one->attribute($attribute_name) !== $schema_two->attribute($attribute_name)) {
-                if (AvroSchema::FULLNAME_ATTR === $attribute_name) {
-
-                    if (
-                        !$schema_two instanceof AvroAliasedSchema
-                    ) {
-                        return false;
-                    }
-
+                if ($attribute_name === AvroSchema::FULLNAME_ATTR) {
                     foreach ($schema_two->getAliases() as $alias) {
                         if (
                             $schema_one->attribute($attribute_name) === (new AvroName(
@@ -247,295 +249,238 @@ class AvroIODatumReader
                         }
                     }
                 }
-
                 return false;
             }
         }
-
         return true;
     }
 
-    public function readBytes(AvroSchema $writers_schema, AvroSchema $readers_schema, string $bytes): string
-    {
-        $logicalTypeWriters = $writers_schema->logicalType();
-        if (
-            $logicalTypeWriters instanceof AvroLogicalType
-            && AvroSchema::DECIMAL_LOGICAL_TYPE === $logicalTypeWriters->name()
-        ) {
-            if ($logicalTypeWriters !== $readers_schema->logicalType()) {
-                throw new AvroIOSchemaMatchException($writers_schema, $readers_schema);
-            }
-
-            $scale = $logicalTypeWriters->attributes()['scale'] ?? 0;
-            $bytes = $this->readDecimal($bytes, $scale);
-        }
-
-        return $bytes;
-    }
-
     /**
-     * @throws AvroException
-     * @throws AvroIOSchemaMatchException
-     * @return list<mixed>
+     * @return array
      */
-    public function readArray(
-        AvroArraySchema $writersSchema,
-        AvroArraySchema $readersSchema,
-        AvroIOBinaryDecoder $decoder
-    ): array {
-        $items = [];
-        $blockCount = $decoder->readLong();
-        while (0 !== $blockCount) {
-            if ($blockCount < 0) {
-                $blockCount = -$blockCount;
-                $decoder->readLong(); // Read (and ignore) block size
+    public function readArray($writers_schema, $readers_schema, $decoder)
+    {
+        $items = array();
+        $block_count = $decoder->readLong();
+        while (0 !== $block_count) {
+            if ($block_count < 0) {
+                $block_count = -$block_count;
+                $block_size = $decoder->readLong(); // Read (and ignore) block size
             }
-            for ($i = 0; $i < $blockCount; $i++) {
-                $items[] = $this->readData(
-                    $writersSchema->items(),
-                    $readersSchema->items(),
+            for ($i = 0; $i < $block_count; $i++) {
+                $items [] = $this->readData(
+                    $writers_schema->items(),
+                    $readers_schema->items(),
                     $decoder
                 );
             }
-            $blockCount = $decoder->readLong();
+            $block_count = $decoder->readLong();
         }
-
         return $items;
     }
 
     /**
-     * @return array<string, mixed>
+     * @returns array
      */
-    public function readMap(
-        AvroMapSchema $writersSchema,
-        AvroMapSchema $readersSchema,
-        AvroIOBinaryDecoder $decoder
-    ): array {
-        $items = [];
+    public function readMap($writers_schema, $readers_schema, $decoder)
+    {
+        $items = array();
         $pair_count = $decoder->readLong();
         while (0 != $pair_count) {
             if ($pair_count < 0) {
                 $pair_count = -$pair_count;
                 // Note: we're not doing anything with block_size other than skipping it
-                $decoder->readLong();
+                $block_size = $decoder->readLong();
             }
 
             for ($i = 0; $i < $pair_count; $i++) {
                 $key = $decoder->readString();
                 $items[$key] = $this->readData(
-                    $writersSchema->values(),
-                    $readersSchema->values(),
+                    $writers_schema->values(),
+                    $readers_schema->values(),
                     $decoder
                 );
             }
             $pair_count = $decoder->readLong();
         }
-
         return $items;
     }
 
-    public function readUnion(
-        AvroUnionSchema $writers_schema,
-        AvroUnionSchema $readers_schema,
-        AvroIOBinaryDecoder $decoder
-    ): mixed {
+    /**
+     * @returns mixed
+     */
+    public function readUnion($writers_schema, $readers_schema, $decoder)
+    {
         $schema_index = $decoder->readLong();
         $selected_writers_schema = $writers_schema->schemaByIndex($schema_index);
-
         return $this->readData($selected_writers_schema, $readers_schema, $decoder);
     }
 
-    public function readEnum(
-        AvroEnumSchema $writers_schema,
-        AvroEnumSchema $readers_schema,
-        AvroIOBinaryDecoder $decoder
-    ): ?string {
+    /**
+     * @returns string
+     */
+    public function readEnum($writers_schema, $readers_schema, $decoder)
+    {
         $symbol_index = $decoder->readInt();
         $symbol = $writers_schema->symbolByIndex($symbol_index);
-
         if (!$readers_schema->hasSymbol($symbol)) {
-            return null;
+            null;
         } // FIXME: unset wrt schema resolution
-
         return $symbol;
     }
 
-    public function readFixed(
-        AvroFixedSchema $writers_schema,
-        AvroFixedSchema $readers_schema,
-        AvroIOBinaryDecoder $decoder
-    ): string|AvroDuration {
-        $logicalTypeWriters = $writers_schema->logicalType();
-        if ($logicalTypeWriters instanceof AvroLogicalType) {
-            if ($logicalTypeWriters !== $readers_schema->logicalType()) {
-                throw new AvroIOSchemaMatchException($writers_schema, $readers_schema);
-            }
-
-            switch ($logicalTypeWriters->name()) {
-                case AvroSchema::DECIMAL_LOGICAL_TYPE:
-                    $scale = $logicalTypeWriters->attributes()['scale'] ?? 0;
-
-                    return $this->readDecimal($decoder->readBytes(), $scale);
-                case AvroSchema::DURATION_LOGICAL_TYPE:
-                    $encodedDuration = $decoder->read($writers_schema->size());
-                    if (12 !== strlen($encodedDuration)) {
-                        throw new AvroException('Invalid duration fixed size: '.strlen($encodedDuration));
-                    }
-
-                    return AvroDuration::fromBytes($encodedDuration);
-                default:
-                    throw new AvroException('Unknown logical type for fixed: '.$logicalTypeWriters->name());
-            }
-        }
-
+    /**
+     * @returns string
+     */
+    public function readFixed($writers_schema, $readers_schema, $decoder)
+    {
         return $decoder->read($writers_schema->size());
     }
 
     /**
-     * @return array<string, mixed>
+     * @returns array
      */
-    public function readRecord(
-        AvroRecordSchema $writersSchema,
-        AvroRecordSchema $readersSchema,
-        AvroIOBinaryDecoder $decoder
-    ): array {
-        $readerFields = $readersSchema->fieldsHash();
+    public function readRecord($writers_schema, $readers_schema, $decoder)
+    {
+        $readers_fields = $readers_schema->fieldsHash();
         $record = [];
-        foreach ($writersSchema->fields() as $writersField) {
-            $type = $writersField->type();
-            $readersField = $readerFields[$writersField->name()] ?? null;
-            if ($readersField) {
-                $record[$writersField->name()] = $this->readData($type, $readersField->type(), $decoder);
-            } elseif (isset($readersSchema->fieldsByAlias()[$writersField->name()])) {
-                $readersField = $readersSchema->fieldsByAlias()[$writersField->name()];
-                $field_val = $this->readData($writersField->type(), $readersField->type(), $decoder);
-                $record[$readersField->name()] = $field_val;
+        foreach ($writers_schema->fields() as $writers_field) {
+            $type = $writers_field->type();
+            $readers_field = $readers_fields[$writers_field->name()] ?? null;
+            if ($readers_field) {
+                $record[$writers_field->name()] = $this->readData($type, $readers_field->type(), $decoder);
+            } elseif (isset($readers_schema->fieldsByAlias()[$writers_field->name()])) {
+                $readers_field = $readers_schema->fieldsByAlias()[$writers_field->name()];
+                $field_val = $this->readData($writers_field->type(), $readers_field->type(), $decoder);
+                $record[$readers_field->name()] = $field_val;
             } else {
                 self::skipData($type, $decoder);
             }
         }
         // Fill in default values
-        $writers_fields = $writersSchema->fieldsHash();
-        foreach ($readerFields as $field_name => $field) {
+        $writers_fields = $writers_schema->fieldsHash();
+        foreach ($readers_fields as $field_name => $field) {
             if (isset($writers_fields[$field_name])) {
                 continue;
             }
             if ($field->hasDefaultValue()) {
                 $record[$field->name()] = $this->readDefaultValue($field->type(), $field->defaultValue());
+            } else {
+                null;
             }
         }
 
         return $record;
     }
 
-    public static function skipData(
-        AvroSchema|AvroFixedSchema|AvroEnumSchema|AvroUnionSchema|AvroArraySchema|AvroMapSchema $writersSchema,
-        AvroIOBinaryDecoder $decoder
-    ): void {
-        match ($writersSchema->type()) {
-            AvroSchema::NULL_TYPE => $decoder->skipNull(),
-            AvroSchema::BOOLEAN_TYPE => $decoder->skipBoolean(),
-            AvroSchema::INT_TYPE => $decoder->skipInt(),
-            AvroSchema::LONG_TYPE => $decoder->skipLong(),
-            AvroSchema::FLOAT_TYPE => $decoder->skipFloat(),
-            AvroSchema::DOUBLE_TYPE => $decoder->skipDouble(),
-            AvroSchema::STRING_TYPE => $decoder->skipString(),
-            AvroSchema::BYTES_TYPE => $decoder->skipBytes(),
-            AvroSchema::ARRAY_SCHEMA => $decoder->skipArray($writersSchema, $decoder),
-            AvroSchema::MAP_SCHEMA => $decoder->skipMap($writersSchema, $decoder),
-            AvroSchema::UNION_SCHEMA => $decoder->skipUnion($writersSchema, $decoder),
-            AvroSchema::ENUM_SCHEMA => $decoder->skipEnum($writersSchema, $decoder),
-            AvroSchema::FIXED_SCHEMA => $decoder->skipFixed($writersSchema, $decoder),
-            AvroSchema::RECORD_SCHEMA,
-            AvroSchema::ERROR_SCHEMA,
-            AvroSchema::REQUEST_SCHEMA => $decoder->skipRecord($writersSchema, $decoder),
-            default => throw new AvroException(sprintf(
-                'Unknown schema type: %s',
-                $writersSchema->type()
-            )),
-        };
+    /**
+     * @param AvroSchema $writers_schema
+     * @param AvroIOBinaryDecoder $decoder
+     */
+    public static function skipData($writers_schema, $decoder)
+    {
+        switch ($writers_schema->type()) {
+            case AvroSchema::NULL_TYPE:
+                return $decoder->skipNull();
+            case AvroSchema::BOOLEAN_TYPE:
+                return $decoder->skipBoolean();
+            case AvroSchema::INT_TYPE:
+                return $decoder->skipInt();
+            case AvroSchema::LONG_TYPE:
+                return $decoder->skipLong();
+            case AvroSchema::FLOAT_TYPE:
+                return $decoder->skipFloat();
+            case AvroSchema::DOUBLE_TYPE:
+                return $decoder->skipDouble();
+            case AvroSchema::STRING_TYPE:
+                return $decoder->skipString();
+            case AvroSchema::BYTES_TYPE:
+                return $decoder->skipBytes();
+            case AvroSchema::ARRAY_SCHEMA:
+                return $decoder->skipArray($writers_schema, $decoder);
+            case AvroSchema::MAP_SCHEMA:
+                return $decoder->skipMap($writers_schema, $decoder);
+            case AvroSchema::UNION_SCHEMA:
+                return $decoder->skipUnion($writers_schema, $decoder);
+            case AvroSchema::ENUM_SCHEMA:
+                return $decoder->skipEnum($writers_schema, $decoder);
+            case AvroSchema::FIXED_SCHEMA:
+                return $decoder->skipFixed($writers_schema, $decoder);
+            case AvroSchema::RECORD_SCHEMA:
+            case AvroSchema::ERROR_SCHEMA:
+            case AvroSchema::REQUEST_SCHEMA:
+                return $decoder->skipRecord($writers_schema, $decoder);
+            default:
+                throw new AvroException(sprintf(
+                    'Unknown schema type: %s',
+                    $writers_schema->type()
+                ));
+        }
     }
 
     /**
-     * @param null|array<string, mixed>|bool|float|int|list<mixed>|string $defaultValue
+     * @param AvroSchema $field_schema
+     * @param null|boolean|int|float|string|array $default_value
+     * @returns null|boolean|int|float|string|array
      *
      * @throws AvroException if $field_schema type is unknown.
-     * @return null|array<string, mixed>|bool|float|int|list<mixed>|string
      */
-    public function readDefaultValue(AvroSchema $fieldSchema, mixed $defaultValue): mixed
+    public function readDefaultValue($field_schema, $default_value)
     {
-        switch ($fieldSchema->type()) {
+        switch ($field_schema->type()) {
             case AvroSchema::NULL_TYPE:
                 return null;
             case AvroSchema::BOOLEAN_TYPE:
-                return $defaultValue;
+                return $default_value;
             case AvroSchema::INT_TYPE:
             case AvroSchema::LONG_TYPE:
-                return (int) $defaultValue;
+                return (int) $default_value;
             case AvroSchema::FLOAT_TYPE:
             case AvroSchema::DOUBLE_TYPE:
-                return (float) $defaultValue;
+                return (float) $default_value;
             case AvroSchema::STRING_TYPE:
             case AvroSchema::BYTES_TYPE:
-                return $this->readBytes($fieldSchema, $fieldSchema, $defaultValue);
+                return $default_value;
             case AvroSchema::ARRAY_SCHEMA:
-                $array = [];
-                foreach ($defaultValue as $jsonValue) {
-                    /** @phpstan-ignore method.notFound */
-                    $val = $this->readDefaultValue($fieldSchema->items(), $jsonValue);
-                    $array[] = $val;
+                $array = array();
+                foreach ($default_value as $json_val) {
+                    $val = $this->readDefaultValue($field_schema->items(), $json_val);
+                    $array [] = $val;
                 }
-
                 return $array;
             case AvroSchema::MAP_SCHEMA:
-                $map = [];
-                foreach ($defaultValue as $key => $jsonValue) {
+                $map = array();
+                foreach ($default_value as $key => $json_val) {
                     $map[$key] = $this->readDefaultValue(
-                        /** @phpstan-ignore method.notFound */
-                        $fieldSchema->values(),
-                        $jsonValue
+                        $field_schema->values(),
+                        $json_val
                     );
                 }
-
                 return $map;
             case AvroSchema::UNION_SCHEMA:
                 return $this->readDefaultValue(
-                    /** @phpstan-ignore method.notFound */
-                    $fieldSchema->schemaByIndex(0),
-                    $defaultValue
+                    $field_schema->schemaByIndex(0),
+                    $default_value
                 );
             case AvroSchema::ENUM_SCHEMA:
             case AvroSchema::FIXED_SCHEMA:
-                return $defaultValue;
+                return $default_value;
             case AvroSchema::RECORD_SCHEMA:
-                /** @var AvroRecordSchema $fieldSchema */
-                $record = [];
-                foreach ($fieldSchema->fields() as $field) {
-                    $fieldName = $field->name();
-                    if (!array_key_exists($fieldName, $defaultValue)) {
-                        $jsonValue = $field->defaultValue();
-                    } else {
-                        $jsonValue = $defaultValue[$fieldName];
+                $record = array();
+                foreach ($field_schema->fields() as $field) {
+                    $field_name = $field->name();
+                    if (!$json_val = $default_value[$field_name]) {
+                        $json_val = $field->default_value();
                     }
 
-                    $record[$fieldName] = $this->readDefaultValue(
+                    $record[$field_name] = $this->readDefaultValue(
                         $field->type(),
-                        $jsonValue
+                        $json_val
                     );
                 }
-
                 return $record;
             default:
-                throw new AvroException(sprintf('Unknown type: %s', $fieldSchema->type()));
+                throw new AvroException(sprintf('Unknown type: %s', $field_schema->type()));
         }
     }
-
-    private function readDecimal(string $bytes, int $scale): string
-    {
-        $mostSignificantBit = ord($bytes[0]) & 0x80;
-        $padded = str_pad($bytes, 8, $mostSignificantBit ? "\xff" : "\x00", STR_PAD_LEFT);
-        $int = unpack('J', $padded)[1];
-
-        return (string) ($scale > 0 ? ($int / (10 ** $scale)) : $int);
-    }
 }
diff --git a/lang/php/lib/Datum/AvroIODatumWriter.php b/lang/php/lib/Datum/AvroIODatumWriter.php
index 08760d4c13..ef8031f763 100644
--- a/lang/php/lib/Datum/AvroIODatumWriter.php
+++ b/lang/php/lib/Datum/AvroIODatumWriter.php
@@ -21,249 +21,179 @@
 namespace Apache\Avro\Datum;
 
 use Apache\Avro\AvroException;
-use Apache\Avro\Datum\Type\AvroDuration;
-use Apache\Avro\Schema\AvroArraySchema;
-use Apache\Avro\Schema\AvroEnumSchema;
-use Apache\Avro\Schema\AvroLogicalType;
-use Apache\Avro\Schema\AvroMapSchema;
-use Apache\Avro\Schema\AvroRecordSchema;
 use Apache\Avro\Schema\AvroSchema;
-use Apache\Avro\Schema\AvroSchemaParseException;
-use Apache\Avro\Schema\AvroUnionSchema;
 
 /**
  * Handles schema-specific writing of data to the encoder.
  *
  * Ensures that each datum written is consistent with the writer's schema.
+ *
+ * @package Avro
  */
 class AvroIODatumWriter
 {
     /**
      * Schema used by this instance to write Avro data.
+     * @var AvroSchema
      */
-    public ?AvroSchema $writersSchema;
+    public $writersSchema;
 
-    public function __construct(?AvroSchema $writersSchema = null)
+    /**
+     * @param AvroSchema $writers_schema
+     */
+    public function __construct($writers_schema = null)
     {
-        $this->writersSchema = $writersSchema;
+        $this->writersSchema = $writers_schema;
     }
 
-    public function write(mixed $datum, AvroIOBinaryEncoder $encoder): void
+    /**
+     * @param $datum
+     * @param AvroIOBinaryEncoder $encoder
+     */
+    public function write($datum, $encoder)
     {
         $this->writeData($this->writersSchema, $datum, $encoder);
     }
 
     /**
+     * @param AvroSchema $writers_schema
+     * @param $datum
+     * @param AvroIOBinaryEncoder $encoder
+     * @return mixed
+     *
      * @throws AvroIOTypeException if $datum is invalid for $writers_schema
-     * @throws AvroException if the type is invalid
      */
-    public function writeData(AvroSchema $writersSchema, mixed $datum, AvroIOBinaryEncoder $encoder): void
+    public function writeData($writers_schema, $datum, $encoder)
     {
-        if (!AvroSchema::isValidDatum($writersSchema, $datum)) {
-            throw new AvroIOTypeException($writersSchema, $datum);
+        if (!AvroSchema::isValidDatum($writers_schema, $datum)) {
+            throw new AvroIOTypeException($writers_schema, $datum);
         }
 
-        $this->writeValidatedData($writersSchema, $datum, $encoder);
+        return $this->writeValidatedData($writers_schema, $datum, $encoder);
     }
 
     /**
-     * @throws AvroException
+     * @param AvroSchema $writers_schema
+     * @param $datum
+     * @param AvroIOBinaryEncoder $encoder
+     * @return mixed
+     *
      * @throws AvroIOTypeException if $datum is invalid for $writers_schema
-     * @throws AvroSchemaParseException
      */
-    private function writeValidatedData(AvroSchema $writersSchema, mixed $datum, AvroIOBinaryEncoder $encoder): void
+    private function writeValidatedData($writers_schema, $datum, $encoder)
     {
-        switch ($writersSchema->type()) {
+        switch ($writers_schema->type()) {
             case AvroSchema::NULL_TYPE:
-                $encoder->writeNull($datum);
-
-                return;
+                return $encoder->writeNull($datum);
             case AvroSchema::BOOLEAN_TYPE:
-                $encoder->writeBoolean($datum);
-
-                return;
+                return $encoder->writeBoolean($datum);
             case AvroSchema::INT_TYPE:
-                $encoder->writeInt($datum);
-
-                return;
+                return $encoder->writeInt($datum);
             case AvroSchema::LONG_TYPE:
-                $encoder->writeLong($datum);
-
-                return;
+                return $encoder->writeLong($datum);
             case AvroSchema::FLOAT_TYPE:
-                $encoder->writeFloat($datum);
-
-                return;
+                return $encoder->writeFloat($datum);
             case AvroSchema::DOUBLE_TYPE:
-                $encoder->writeDouble($datum);
-
-                return;
+                return $encoder->writeDouble($datum);
             case AvroSchema::STRING_TYPE:
-                $encoder->writeString($datum);
-
-                return;
+                return $encoder->writeString($datum);
             case AvroSchema::BYTES_TYPE:
-                $this->writeBytes($writersSchema, $datum, $encoder);
-
-                return;
+                return $encoder->writeBytes($datum);
             case AvroSchema::ARRAY_SCHEMA:
-                $this->writeArray($writersSchema, $datum, $encoder);
-
-                return;
+                return $this->writeArray($writers_schema, $datum, $encoder);
             case AvroSchema::MAP_SCHEMA:
-                $this->writeMap($writersSchema, $datum, $encoder);
-
-                return;
+                return $this->writeMap($writers_schema, $datum, $encoder);
             case AvroSchema::FIXED_SCHEMA:
-                $this->writeFixed($writersSchema, $datum, $encoder);
-
-                return;
+                return $this->writeFixed($writers_schema, $datum, $encoder);
             case AvroSchema::ENUM_SCHEMA:
-                $this->writeEnum($writersSchema, $datum, $encoder);
-
-                return;
+                return $this->writeEnum($writers_schema, $datum, $encoder);
             case AvroSchema::RECORD_SCHEMA:
             case AvroSchema::ERROR_SCHEMA:
             case AvroSchema::REQUEST_SCHEMA:
-                $this->writeRecord($writersSchema, $datum, $encoder);
-
-                return;
+                return $this->writeRecord($writers_schema, $datum, $encoder);
             case AvroSchema::UNION_SCHEMA:
-                $this->writeUnion($writersSchema, $datum, $encoder);
-
-                return;
+                return $this->writeUnion($writers_schema, $datum, $encoder);
             default:
                 throw new AvroException(sprintf(
                     'Unknown type: %s',
-                    $writersSchema->type()
+                    $writers_schema->type
                 ));
         }
     }
 
-    private function writeBytes(AvroSchema $writers_schema, string $datum, AvroIOBinaryEncoder $encoder): void
-    {
-        $logicalType = $writers_schema->logicalType();
-        if (
-            $logicalType instanceof AvroLogicalType
-            && AvroSchema::DECIMAL_LOGICAL_TYPE === $logicalType->name()
-        ) {
-            $scale = $logicalType->attributes()['scale'] ?? 0;
-            $precision = $logicalType->attributes()['precision'] ?? null;
-
-            $encoder->writeDecimal($datum, $scale, $precision);
-
-            return;
-        }
-
-        $encoder->writeBytes($datum);
-    }
-
     /**
-     * @param list<mixed> $datum
-     * @throws AvroIOTypeException
+     * @param AvroSchema $writers_schema
+     * @param null|boolean|int|float|string|array $datum item to be written
+     * @param AvroIOBinaryEncoder $encoder
      */
-    private function writeArray(AvroArraySchema $writersSchema, array $datum, AvroIOBinaryEncoder $encoder): void
+    private function writeArray($writers_schema, $datum, $encoder)
     {
-        $datumCount = count($datum);
-        if (0 < $datumCount) {
-            $encoder->writeLong($datumCount);
-            $items = $writersSchema->items();
+        $datum_count = count($datum);
+        if (0 < $datum_count) {
+            $encoder->writeLong($datum_count);
+            $items = $writers_schema->items();
             foreach ($datum as $item) {
                 $this->writeValidatedData($items, $item, $encoder);
             }
         }
-        $encoder->writeLong(0);
+        return $encoder->writeLong(0);
     }
 
     /**
-     * @param array<string, mixed> $datum
+     * @param $writers_schema
+     * @param $datum
+     * @param $encoder
      * @throws AvroIOTypeException
      */
-    private function writeMap(AvroMapSchema $writersSchema, array $datum, AvroIOBinaryEncoder $encoder): void
+    private function writeMap($writers_schema, $datum, $encoder)
     {
         $datum_count = count($datum);
         if ($datum_count > 0) {
             $encoder->writeLong($datum_count);
             foreach ($datum as $k => $v) {
                 $encoder->writeString($k);
-                $this->writeValidatedData($writersSchema->values(), $v, $encoder);
+                $this->writeValidatedData($writers_schema->values(), $v, $encoder);
             }
         }
         $encoder->writeLong(0);
     }
 
-    private function writeFixed(
-        AvroSchema $writersSchema,
-        string|AvroDuration $datum,
-        AvroIOBinaryEncoder $encoder
-    ): void {
-        $logicalType = $writersSchema->logicalType();
-        if (
-            $logicalType instanceof AvroLogicalType
-        ) {
-            switch ($logicalType->name()) {
-                case AvroSchema::DECIMAL_LOGICAL_TYPE:
-                    $scale = $logicalType->attributes()['scale'] ?? 0;
-                    $precision = $logicalType->attributes()['precision'] ?? null;
-
-                    $encoder->writeDecimal($datum, $scale, $precision);
-
-                    return;
-                case AvroSchema::DURATION_LOGICAL_TYPE:
-                    if (!$datum instanceof AvroDuration) {
-                        throw new AvroException(
-                            "Duration datum must be an instance of AvroDuration"
-                        );
-                    }
-                    $duration = (string) $datum;
-
-                    if (12 !== strlen($duration)) {
-                        throw new AvroException(
-                            "Fixed duration size mismatch. Expected 12 bytes, got ".strlen($duration)
-                        );
-                    }
-
-                    $encoder->write($duration);
-
-                    return;
-            }
-        }
-
-        $encoder->write($datum);
+    private function writeFixed($writers_schema, $datum, $encoder)
+    {
+        /**
+         * NOTE Unused $writers_schema parameter included for consistency
+         * with other write_* methods.
+         */
+        return $encoder->write($datum);
     }
 
-    private function writeEnum(AvroEnumSchema $writersSchema, string $datum, AvroIOBinaryEncoder $encoder): void
+    private function writeEnum($writers_schema, $datum, $encoder)
     {
-        $datumIndex = $writersSchema->symbolIndex($datum);
-        $encoder->writeInt($datumIndex);
+        $datum_index = $writers_schema->symbolIndex($datum);
+        return $encoder->writeInt($datum_index);
     }
 
-    private function writeRecord(AvroRecordSchema $writersSchema, mixed $datum, AvroIOBinaryEncoder $encoder): void
+    private function writeRecord($writers_schema, $datum, $encoder)
     {
-        foreach ($writersSchema->fields() as $field) {
+        foreach ($writers_schema->fields() as $field) {
             $this->writeValidatedData($field->type(), $datum[$field->name()] ?? null, $encoder);
         }
     }
 
-    /**
-     * @throws AvroIOTypeException
-     * @throws AvroSchemaParseException
-     */
-    private function writeUnion(AvroUnionSchema $writersSchema, mixed $datum, AvroIOBinaryEncoder $encoder): void
+    private function writeUnion($writers_schema, $datum, $encoder)
     {
         $datum_schema_index = -1;
         $datum_schema = null;
-        foreach ($writersSchema->schemas() as $index => $schema) {
+        foreach ($writers_schema->schemas() as $index => $schema) {
             if (AvroSchema::isValidDatum($schema, $datum)) {
                 $datum_schema_index = $index;
                 $datum_schema = $schema;
-
                 break;
             }
         }
 
         if (is_null($datum_schema)) {
-            throw new AvroIOTypeException($writersSchema, $datum);
+            throw new AvroIOTypeException($writers_schema, $datum);
         }
 
         $encoder->writeLong($datum_schema_index);
diff --git a/lang/php/lib/Datum/AvroIOSchemaMatchException.php b/lang/php/lib/Datum/AvroIOSchemaMatchException.php
index 8706674bc3..373adddacb 100644
--- a/lang/php/lib/Datum/AvroIOSchemaMatchException.php
+++ b/lang/php/lib/Datum/AvroIOSchemaMatchException.php
@@ -18,8 +18,6 @@
  * limitations under the License.
  */
 
-declare(strict_types=1);
-
 namespace Apache\Avro\Datum;
 
 use Apache\Avro\AvroException;
@@ -28,20 +26,22 @@ use Apache\Avro\Schema\AvroSchema;
 /**
  * Exceptions arising from incompatibility between
  * reader and writer schemas.
+ *
+ * @package Avro
  */
 class AvroIOSchemaMatchException extends AvroException
 {
     /**
-     * @param AvroSchema $writersSchema
-     * @param AvroSchema $readersSchema
+     * @param AvroSchema $writers_schema
+     * @param AvroSchema $readers_schema
      */
-    public function __construct($writersSchema, $readersSchema)
+    public function __construct($writers_schema, $readers_schema)
     {
         parent::__construct(
             sprintf(
                 "Writer's schema %s and Reader's schema %s do not match.",
-                $writersSchema,
-                $readersSchema
+                $writers_schema,
+                $readers_schema
             )
         );
     }
diff --git a/lang/php/lib/Datum/AvroIOTypeException.php b/lang/php/lib/Datum/AvroIOTypeException.php
index 0dac7597bc..dc7b585312 100644
--- a/lang/php/lib/Datum/AvroIOTypeException.php
+++ b/lang/php/lib/Datum/AvroIOTypeException.php
@@ -25,6 +25,8 @@ use Apache\Avro\Schema\AvroSchema;
 
 /**
  * Exceptions arising from writing or reading Avro data.
+ *
+ * @package Avro
  */
 class AvroIOTypeException extends AvroException
 {
diff --git a/lang/php/lib/Datum/Type/AvroDuration.php b/lang/php/lib/Datum/Type/AvroDuration.php
deleted file mode 100644
index 571ba54be4..0000000000
--- a/lang/php/lib/Datum/Type/AvroDuration.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-declare(strict_types=1);
-
-namespace Apache\Avro\Datum\Type;
-
-use Apache\Avro\AvroException;
-use Apache\Avro\Schema\AvroSchema;
-
-class AvroDuration implements \Stringable
-{
-    private readonly int $months;
-
-    private readonly int $days;
-
-    private readonly int $milliseconds;
-
-    /**
-     * @throws AvroException
-     */
-    public function __construct(
-        int $months,
-        int $days,
-        int $milliseconds
-    ) {
-        self::validateComponent($months, 'months');
-        self::validateComponent($days, 'days');
-        self::validateComponent($milliseconds, 'milliseconds');
-
-        $this->months = $months;
-        $this->days = $days;
-        $this->milliseconds = $milliseconds;
-    }
-
-    public function __toString(): string
-    {
-        return $this->toBytes();
-    }
-
-    public static function fromBytes(string $bytes): self
-    {
-        $unpackedData = unpack('Vmonths/Vdays/Vmilliseconds', $bytes);
-        $months = (int) $unpackedData['months'];
-        $days = (int) $unpackedData['days'];
-        $milliseconds = (int) $unpackedData['milliseconds'];
-
-        // Correct the sign for each component if it was read as a negative number
-        // (i.e., if the value is 2^31 or greater, which means the sign bit was set)
-        if ($months > AvroSchema::INT_MAX_VALUE) {
-            $months -= AvroSchema::INT_RANGE;
-        }
-        if ($days > AvroSchema::INT_MAX_VALUE) {
-            $days -= AvroSchema::INT_RANGE;
-        }
-        if ($milliseconds > AvroSchema::INT_MAX_VALUE) {
-            $milliseconds -= AvroSchema::INT_RANGE;
-        }
-
-        return new self(
-            $months,
-            $days,
-            $milliseconds
-        );
-    }
-
-    public function toBytes(): string
-    {
-        $months = pack('V', $this->months);
-        $days = pack('V', $this->days);
-        $milliseconds = pack('V', $this->milliseconds);
-
-        return $months.$days.$milliseconds;
-    }
-
-    /**
-     * Helper to check if a value is within the 32-bit signed range.
-     * @throws AvroException If the value is out of bounds.
-     */
-    private static function validateComponent(int $value, string $name): void
-    {
-        if ($value > AvroSchema::INT_MAX_VALUE || $value < AvroSchema::INT_MIN_VALUE) {
-            // Throw an appropriate exception for an out-of-bounds value
-            // You may need to replace \Exception with your specific AvroException
-            throw new AvroException(
-                sprintf(
-                    "Duration component '%s' value (%d) is out of bounds for a 32-bit signed integer.",
-                    $name,
-                    $value
-                )
-            );
-        }
-    }
-}
diff --git a/lang/php/lib/IO/AvroFile.php b/lang/php/lib/IO/AvroFile.php
index b0b6852ce5..b68de63eed 100644
--- a/lang/php/lib/IO/AvroFile.php
+++ b/lang/php/lib/IO/AvroFile.php
@@ -18,16 +18,15 @@
  * limitations under the License.
  */
 
-declare(strict_types=1);
-
 namespace Apache\Avro\IO;
 
 use Apache\Avro\AvroIO;
 
 /**
  * AvroIO wrapper for PHP file access functions
+ * @package Avro
  */
-class AvroFile implements AvroIO
+class AvroFile extends AvroIO
 {
     /**
      * @var string fopen read mode value. Used internally.
@@ -39,29 +38,35 @@ class AvroFile implements AvroIO
      */
     public const FOPEN_WRITE_MODE = 'wb';
 
+    /**
+     * @var string
+     */
+    private $file_path;
+
     /**
      * @var resource file handle for AvroFile instance
      */
-    private $fileHandle;
+    private $file_handle;
 
-    public function __construct(
-        private string $filePath,
-        string $mode = self::READ_MODE
-    ) {
+    public function __construct($file_path, $mode = self::READ_MODE)
+    {
+        /**
+         * XXX: should we check for file existence (in case of reading)
+         * or anything else about the provided file_path argument?
+         */
+        $this->file_path = $file_path;
         switch ($mode) {
             case self::WRITE_MODE:
-                $this->fileHandle = fopen($this->filePath, self::FOPEN_WRITE_MODE);
-                if (false === $this->fileHandle) {
+                $this->file_handle = fopen($this->file_path, self::FOPEN_WRITE_MODE);
+                if (false == $this->file_handle) {
                     throw new AvroIOException('Could not open file for writing');
                 }
-
                 break;
             case self::READ_MODE:
-                $this->fileHandle = fopen($this->filePath, self::FOPEN_READ_MODE);
-                if (false === $this->fileHandle) {
+                $this->file_handle = fopen($this->file_path, self::FOPEN_READ_MODE);
+                if (false == $this->file_handle) {
                     throw new AvroIOException('Could not open file for reading');
                 }
-
                 break;
             default:
                 throw new AvroIOException(
@@ -76,70 +81,66 @@ class AvroFile implements AvroIO
     }
 
     /**
+     * @returns int count of bytes written
      * @throws AvroIOException if write failed.
-     * @return int count of bytes written
      */
-    public function write(string $bytes): int
+    public function write($str)
     {
-        $len = fwrite($this->fileHandle, $bytes);
+        $len = fwrite($this->file_handle, $str);
         if (false === $len) {
             throw new AvroIOException(sprintf('Could not write to file'));
         }
-
         return $len;
     }
 
     /**
+     * @returns int current position within the file
      * @throws AvroIOException if tell failed.
-     * @return int current position within the file
      */
-    public function tell(): int
+    public function tell()
     {
-        $position = ftell($this->fileHandle);
+        $position = ftell($this->file_handle);
         if (false === $position) {
             throw new AvroIOException('Could not execute tell on reader');
         }
-
         return $position;
     }
 
     /**
      * Closes the file.
+     * @returns boolean true if successful.
      * @throws AvroIOException if there was an error closing the file.
-     * @return bool true if successful.
      */
-    public function close(): bool
+    public function close()
     {
-        $res = fclose($this->fileHandle);
+        $res = fclose($this->file_handle);
         if (false === $res) {
             throw new AvroIOException('Error closing file.');
         }
-
         return $res;
     }
 
     /**
-     * @return bool true if the pointer is at the end of the file,
+     * @returns boolean true if the pointer is at the end of the file,
      *                  and false otherwise.
      * @see AvroIO::isEof() as behavior differs from feof()
      */
-    public function isEof(): bool
+    public function isEof()
     {
         $this->read(1);
-        if (feof($this->fileHandle)) {
+        if (feof($this->file_handle)) {
             return true;
         }
         $this->seek(-1, self::SEEK_CUR);
-
         return false;
     }
 
     /**
      * @param int $len count of bytes to read.
+     * @returns string bytes read
      * @throws AvroIOException if length value is negative or if the read failed
-     * @return string bytes read
      */
-    public function read(int $len): string
+    public function read($len)
     {
         if (0 > $len) {
             throw new AvroIOException(
@@ -147,26 +148,27 @@ class AvroFile implements AvroIO
             );
         }
 
-        if (0 === $len) {
+        if (0 == $len) {
             return '';
         }
 
-        $bytes = fread($this->fileHandle, $len);
+        $bytes = fread($this->file_handle, $len);
         if (false === $bytes) {
             throw new AvroIOException('Could not read from file');
         }
-
         return $bytes;
     }
 
     /**
+     * @param int $offset
+     * @param int $whence
+     * @returns boolean true upon success
      * @throws AvroIOException if seek failed.
-     * @return bool true upon success
      * @see AvroIO::seek()
      */
-    public function seek(int $offset, int $whence = SEEK_SET): bool
+    public function seek($offset, $whence = SEEK_SET): bool
     {
-        $res = fseek($this->fileHandle, $offset, $whence);
+        $res = fseek($this->file_handle, $offset, $whence);
         // Note: does not catch seeking beyond end of file
         if (-1 === $res) {
             throw new AvroIOException(
@@ -177,21 +179,19 @@ class AvroFile implements AvroIO
                 )
             );
         }
-
         return true;
     }
 
     /**
+     * @returns boolean true if the flush was successful.
      * @throws AvroIOException if there was an error flushing the file.
-     * @return bool true if the flush was successful.
      */
-    public function flush(): bool
+    public function flush()
     {
-        $res = fflush($this->fileHandle);
+        $res = fflush($this->file_handle);
         if (false === $res) {
             throw new AvroIOException('Could not flush file.');
         }
-
         return true;
     }
 }
diff --git a/lang/php/lib/IO/AvroIOException.php b/lang/php/lib/IO/AvroIOException.php
index ccf10d8e37..e4d531d4e3 100644
--- a/lang/php/lib/IO/AvroIOException.php
+++ b/lang/php/lib/IO/AvroIOException.php
@@ -24,6 +24,7 @@ use Apache\Avro\AvroException;
 
 /**
  * Exceptions associated with AvroIO instances.
+ * @package Avro
  */
 class AvroIOException extends AvroException
 {
diff --git a/lang/php/lib/IO/AvroStringIO.php b/lang/php/lib/IO/AvroStringIO.php
index e371cc948b..9b98ff31c2 100644
--- a/lang/php/lib/IO/AvroStringIO.php
+++ b/lang/php/lib/IO/AvroStringIO.php
@@ -18,125 +18,162 @@
  * limitations under the License.
  */
 
-declare(strict_types=1);
-
 namespace Apache\Avro\IO;
 
 use Apache\Avro\AvroIO;
 
 /**
  * AvroIO wrapper for string access
+ * @package Avro
  */
-class AvroStringIO implements AvroIO, \Stringable
+class AvroStringIO extends AvroIO
 {
-    private string $stringBuffer;
+    /**
+     * @var string
+     */
+    private $string_buffer;
     /**
      * @var int  current position in string
      */
-    private int $currentIndex;
+    private $current_index;
     /**
-     * @var bool whether or not the string is closed.
+     * @var boolean whether or not the string is closed.
      */
-    private bool $isClosed;
+    private $is_closed;
 
     /**
      * @param string $str initial value of AvroStringIO buffer. Regardless
      *                    of the initial value, the pointer is set to the
      *                    beginning of the buffer.
+     * @throws AvroIOException if a non-string value is passed as $str
      */
-    public function __construct(string $str = '')
+    public function __construct($str = '')
     {
-        $this->isClosed = false;
-        $this->stringBuffer = $str;
-        $this->currentIndex = 0;
-    }
+        $this->is_closed = false;
+        $this->string_buffer = '';
+        $this->current_index = 0;
 
-    public function __toString(): string
-    {
-        return $this->stringBuffer;
+        if (is_string($str)) {
+            $this->string_buffer .= $str;
+        } else {
+            throw new AvroIOException(
+                sprintf('constructor argument must be a string: %s', gettype($str))
+            );
+        }
     }
 
     /**
      * Append bytes to this buffer.
      * (Nothing more is needed to support Avro.)
-     * @param string $bytes bytes to write
+     * @param string $arg bytes to write
+     * @returns int count of bytes written.
      * @throws AvroIOException if $args is not a string value.
-     * @return int count of bytes written.
      */
-    public function write(string $bytes): int
+    public function write($arg)
     {
         $this->checkClosed();
+        if (is_string($arg)) {
+            return $this->appendStr($arg);
+        }
+        throw new AvroIOException(
+            sprintf(
+                'write argument must be a string: (%s) %s',
+                gettype($arg),
+                var_export($arg, true)
+            )
+        );
+    }
 
-        return $this->appendStr($bytes);
+    /**
+     * @throws AvroIOException if the buffer is closed.
+     */
+    private function checkClosed()
+    {
+        if ($this->isClosed()) {
+            throw new AvroIOException('Buffer is closed');
+        }
     }
 
     /**
-     * @return bool true if this buffer is closed and false otherwise.
+     * @returns boolean true if this buffer is closed and false
+     *                       otherwise.
      */
-    public function isClosed(): bool
+    public function isClosed()
     {
-        return $this->isClosed;
+        return $this->is_closed;
+    }
+
+    /**
+     * Appends bytes to this buffer.
+     * @param string $str
+     * @returns integer count of bytes written.
+     */
+    private function appendStr($str)
+    {
+        $this->checkClosed();
+        $this->string_buffer .= $str;
+        $len = strlen($str);
+        $this->current_index += $len;
+        return $len;
     }
 
     /**
+     * @returns string bytes read from buffer
      * @todo test for fencepost errors wrt updating current_index
-     * @param mixed $len
-     * @return string bytes read from buffer
      */
-    public function read($len): string
+    public function read($len)
     {
         $this->checkClosed();
         $read = '';
-        for ($i = $this->currentIndex; $i < ($this->currentIndex + $len); $i++) {
-            $read .= $this->stringBuffer[$i] ?? '';
+        for ($i = $this->current_index; $i < ($this->current_index + $len); $i++) {
+            $read .= $this->string_buffer[$i] ?? '';
         }
         if (strlen($read) < $len) {
-            $this->currentIndex = $this->length();
+            $this->current_index = $this->length();
         } else {
-            $this->currentIndex += $len;
+            $this->current_index += $len;
         }
-
         return $read;
     }
 
     /**
-     * @return int count of bytes in the buffer
+     * @returns int count of bytes in the buffer
      * @internal Could probably memoize length for performance, but
      *           no need do this yet.
      */
-    public function length(): int
+    public function length()
     {
-        return strlen($this->stringBuffer);
+        return strlen($this->string_buffer);
     }
 
     /**
+     * @returns boolean true if successful
      * @throws AvroIOException if the seek failed.
-     * @return bool true if successful
      */
-    public function seek(int $offset, int $whence = self::SEEK_SET): bool
+    public function seek($offset, $whence = self::SEEK_SET): bool
     {
+        if (!is_int($offset)) {
+            throw new AvroIOException('Seek offset must be an integer.');
+        }
         // Prevent seeking before BOF
         switch ($whence) {
             case self::SEEK_SET:
                 if (0 > $offset) {
                     throw new AvroIOException('Cannot seek before beginning of file.');
                 }
-                $this->currentIndex = $offset;
-
+                $this->current_index = $offset;
                 break;
             case self::SEEK_CUR:
-                if (0 > $this->currentIndex + $offset) {
+                if (0 > $this->current_index + $whence) {
                     throw new AvroIOException('Cannot seek before beginning of file.');
                 }
-                $this->currentIndex += $offset;
-
+                $this->current_index += $offset;
                 break;
             case self::SEEK_END:
                 if (0 > $this->length() + $offset) {
                     throw new AvroIOException('Cannot seek before beginning of file.');
                 }
-                $this->currentIndex = $this->length() + $offset;
-
+                $this->current_index = $this->length() + $offset;
                 break;
             default:
                 throw new AvroIOException(sprintf('Invalid seek whence %d', $whence));
@@ -146,85 +183,70 @@ class AvroStringIO implements AvroIO, \Stringable
     }
 
     /**
+     * @returns int
      * @see AvroIO::tell()
      */
-    public function tell(): int
+    public function tell()
     {
-        return $this->currentIndex;
+        return $this->current_index;
     }
 
     /**
+     * @returns boolean
      * @see AvroIO::isEof()
      */
-    public function isEof(): bool
+    public function isEof()
     {
-        return $this->currentIndex >= $this->length();
+        return ($this->current_index >= $this->length());
     }
 
     /**
      * No-op provided for compatibility with AvroIO interface.
-     * @return bool true
+     * @returns boolean true
      */
-    public function flush(): bool
+    public function flush()
     {
         return true;
     }
 
     /**
      * Marks this buffer as closed.
+     * @returns boolean true
      */
-    public function close(): bool
+    public function close()
     {
         $this->checkClosed();
-        $this->isClosed = true;
-
+        $this->is_closed = true;
         return true;
     }
 
     /**
      * Truncates the truncate buffer to 0 bytes and returns the pointer
      * to the beginning of the buffer.
-     * @return bool true
+     * @returns boolean true
      */
-    public function truncate(): bool
+    public function truncate()
     {
         $this->checkClosed();
-        $this->stringBuffer = '';
-        $this->currentIndex = 0;
-
+        $this->string_buffer = '';
+        $this->current_index = 0;
         return true;
     }
 
     /**
+     * @returns string
      * @uses self::__toString()
      */
-    public function string(): string
+    public function string()
     {
         return (string) $this;
     }
 
     /**
-     * @throws AvroIOException if the buffer is closed.
+     * @returns string
      */
-    private function checkClosed(): void
+    public function __toString()
     {
-        if ($this->isClosed()) {
-            throw new AvroIOException('Buffer is closed');
-        }
-    }
-
-    /**
-     * Appends bytes to this buffer.
-     * @throws AvroIOException
-     * @return int count of bytes written.
-     */
-    private function appendStr(string $str): int
-    {
-        $this->checkClosed();
-        $this->stringBuffer .= $str;
-        $len = strlen($str);
-        $this->currentIndex += $len;
-
-        return $len;
+        return $this->string_buffer;
     }
 }
diff --git a/lang/php/lib/Protocol/AvroProtocol.php b/lang/php/lib/Protocol/AvroProtocol.php
index ef6c09e74d..a1be7b79bf 100644
--- a/lang/php/lib/Protocol/AvroProtocol.php
+++ b/lang/php/lib/Protocol/AvroProtocol.php
@@ -18,85 +18,50 @@
  * limitations under the License.
  */
 
-declare(strict_types=1);
-
 namespace Apache\Avro\Protocol;
 
 use Apache\Avro\Schema\AvroNamedSchemata;
 use Apache\Avro\Schema\AvroSchema;
-use Apache\Avro\Schema\AvroSchemaParseException;
 
 /**
  * Avro library for protocols
- * @phpstan-import-type AvroSchemaDefinitionArray from AvroSchema
- * @phpstan-import-type AvroProtocolMessageDefinitionArray from AvroProtocolMessage
- * @phpstan-type AvroProtocolDefinitionArray array{
- *     types?: AvroSchemaDefinitionArray,
- *     protocol: string,
- *     namespace: string,
- *     messages?: array<string, AvroProtocolMessageDefinitionArray>
- * }
+ * @package Avro
  */
 class AvroProtocol
 {
-    public function __construct(
-        public readonly string $protocol,
-        public readonly string $name,
-        public readonly string $namespace,
-        public readonly AvroNamedSchemata $schemata,
-        /** @var array<int, AvroProtocolMessage> */
-        public readonly array $messages,
-    ) {
-    }
+    public $protocol;
+    public $name;
+    public $namespace;
+    public $schemata;
+    public $messages;
 
-    /**
-     * @throws AvroProtocolParseException
-     * @throws AvroSchemaParseException
-     */
-    public static function parse(string $json): self
+    public static function parse($json)
     {
-        try {
-            return self::realParse(
-                json_decode($json, associative: true, flags: JSON_THROW_ON_ERROR)
-            );
-        } catch (\JsonException $e) {
-            throw new AvroProtocolParseException(
-                "Protocol json schema is invalid: ".$e->getMessage(),
-                previous: $e
-            );
+        if (is_null($json)) {
+            throw new AvroProtocolParseException("Protocol can't be null");
         }
+
+        $protocol = new AvroProtocol();
+        $protocol->realParse(json_decode($json, true));
+        return $protocol;
     }
 
-    /**
-     * @param AvroProtocolDefinitionArray $avro AVRO protocol as associative array
-     * @throws AvroSchemaParseException
-     */
-    public static function realParse(array $avro): self
+    public function realParse($avro)
     {
-        $schemata = new AvroNamedSchemata();
+        $this->protocol = $avro["protocol"];
+        $this->namespace = $avro["namespace"];
+        $this->schemata = new AvroNamedSchemata();
+        $this->name = $avro["protocol"];
 
-        if (array_key_exists("types", $avro)) {
-            AvroSchema::realParse($avro["types"], $avro["namespace"], $schemata);
+        if (!is_null($avro["types"])) {
+            $types = AvroSchema::realParse($avro["types"], $this->namespace, $this->schemata);
         }
 
-        $messages = [];
-        if (is_array($avro["messages"] ?? null)) {
+        if (!is_null($avro["messages"])) {
             foreach ($avro["messages"] as $messageName => $messageAvro) {
-                $messages[] = new AvroProtocolMessage(
-                    name: $messageName,
-                    avro: $messageAvro,
-                    namespace: $avro["namespace"],
-                    schemata: $schemata
-                );
+                $message = new AvroProtocolMessage($messageName, $messageAvro, $this);
+                $this->messages[$messageName] = $message;
             }
         }
-
-        return new self(
-            protocol: $avro["protocol"],
-            name: $avro["protocol"],
-            namespace: $avro["namespace"],
-            schemata: $schemata,
-            messages: $messages
-        );
     }
 }
diff --git a/lang/php/lib/Protocol/AvroProtocolMessage.php b/lang/php/lib/Protocol/AvroProtocolMessage.php
index 5d31ffa8f1..186e3ce5e8 100644
--- a/lang/php/lib/Protocol/AvroProtocolMessage.php
+++ b/lang/php/lib/Protocol/AvroProtocolMessage.php
@@ -18,59 +18,44 @@
  * limitations under the License.
  */
 
-declare(strict_types=1);
-
 namespace Apache\Avro\Protocol;
 
 use Apache\Avro\Schema\AvroName;
-use Apache\Avro\Schema\AvroNamedSchemata;
 use Apache\Avro\Schema\AvroPrimitiveSchema;
 use Apache\Avro\Schema\AvroRecordSchema;
 use Apache\Avro\Schema\AvroSchema;
-use Apache\Avro\Schema\AvroSchemaParseException;
 
-/**
- * @phpstan-import-type AvroSchemaDefinitionArray from AvroSchema
- * @phpstan-type AvroProtocolMessageDefinitionArray array{request: AvroSchemaDefinitionArray, response?: string}
- */
 class AvroProtocolMessage
 {
-    public readonly AvroRecordSchema $request;
-
-    public readonly ?AvroSchema $response;
+    public $name;
 
     /**
-     * @param AvroProtocolMessageDefinitionArray $avro
-     * @throws AvroSchemaParseException
+     * @var AvroRecordSchema $request
      */
-    public function __construct(
-        public string $name,
-        array $avro,
-        string $namespace,
-        AvroNamedSchemata $schemata,
-    ) {
+    public $request;
+
+    public $response;
+
+    public function __construct($name, $avro, $protocol)
+    {
+        $this->name = $name;
         $this->request = new AvroRecordSchema(
-            name: new AvroName($this->name, null, $namespace),
-            doc: null,
-            fields: $avro['request'],
-            schemata: $schemata,
-            schemaType: AvroSchema::REQUEST_SCHEMA
+            new AvroName($name, null, $protocol->namespace),
+            null,
+            $avro['request'],
+            $protocol->schemata,
+            AvroSchema::REQUEST_SCHEMA
         );
 
-        $response = null;
         if (array_key_exists('response', $avro)) {
-            $response = $schemata->schemaByName(
-                new AvroName(
-                    name: $avro['response'],
-                    namespace: $namespace,
-                    defaultNamespace: $namespace
-                )
-            );
-
-            if (is_null($response)) {
-                $response = new AvroPrimitiveSchema($avro['response']);
+            $this->response = $protocol->schemata->schemaByName(new AvroName(
+                $avro['response'],
+                $protocol->namespace,
+                $protocol->namespace
+            ));
+            if ($this->response == null) {
+                $this->response = new AvroPrimitiveSchema($avro['response']);
             }
         }
-        $this->response = $response;
     }
 }
diff --git a/lang/php/lib/Schema/AvroAliasedSchema.php b/lang/php/lib/Schema/AvroAliasedSchema.php
deleted file mode 100644
index 90a33c4fea..0000000000
--- a/lang/php/lib/Schema/AvroAliasedSchema.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-declare(strict_types=1);
-
-namespace Apache\Avro\Schema;
-
-/**
- * @phpstan-type AvroAliases list<string>
- */
-interface AvroAliasedSchema
-{
-    /** @return null|AvroAliases */
-    public function getAliases(): ?array;
-}
diff --git a/lang/php/lib/Schema/AvroArraySchema.php b/lang/php/lib/Schema/AvroArraySchema.php
index 1a7a049a91..2ba08396cd 100644
--- a/lang/php/lib/Schema/AvroArraySchema.php
+++ b/lang/php/lib/Schema/AvroArraySchema.php
@@ -23,56 +23,66 @@ namespace Apache\Avro\Schema;
 /**
  * Avro array schema, consisting of items of a particular
  * Avro schema type.
+ * @package Avro
  */
 class AvroArraySchema extends AvroSchema
 {
     /**
-     * @var AvroSchema The schema of the array elements
+     * @var AvroName|AvroSchema named schema name or AvroSchema of
+     *                          array element
      */
-    private AvroSchema $items;
+    private $items;
 
-    private bool $isItemsSchemaFromSchemata;
+    /**
+     * @var boolean true if the items schema
+     * FIXME: couldn't we derive this from whether or not $this->items
+     *        is an AvroName or an AvroSchema?
+     */
+    private $is_items_schema_from_schemata;
 
     /**
-     * @param mixed|string $items AvroNamedSchema name or object form
+     * @param string|mixed $items AvroNamedSchema name or object form
      *        of decoded JSON schema representation.
-     * @throws AvroSchemaParseException
+     * @param string $defaultNamespace namespace of enclosing schema
+     * @param AvroNamedSchemata &$schemata
      */
-    public function __construct($items, ?string $defaultNamespace, AvroNamedSchemata $schemata)
+    public function __construct($items, $defaultNamespace, &$schemata = null)
     {
         parent::__construct(AvroSchema::ARRAY_SCHEMA);
 
-        $itemsSchema = null;
-        $this->isItemsSchemaFromSchemata = false;
+        $this->is_items_schema_from_schemata = false;
+        $items_schema = null;
         if (
             is_string($items)
-            && $itemsSchema = $schemata->schemaByName(
+            && $items_schema = $schemata->schemaByName(
                 new AvroName($items, null, $defaultNamespace)
             )
         ) {
-            $this->isItemsSchemaFromSchemata = true;
+            $this->is_items_schema_from_schemata = true;
         } else {
-            $itemsSchema = AvroSchema::subparse($items, $defaultNamespace, $schemata);
+            $items_schema = AvroSchema::subparse($items, $defaultNamespace, $schemata);
         }
 
-        $this->items = $itemsSchema;
+        $this->items = $items_schema;
     }
 
     /**
-     * @return AvroName|AvroSchema named schema name or AvroSchema
+     * @returns AvroName|AvroSchema named schema name or AvroSchema
      *          of this array schema's elements.
      */
-    public function items(): AvroName|AvroSchema
+    public function items()
     {
         return $this->items;
     }
 
-    public function toAvro(): string|array
+    /**
+     * @returns mixed
+     */
+    public function toAvro()
     {
         $avro = parent::toAvro();
-        $avro[AvroSchema::ITEMS_ATTR] = $this->isItemsSchemaFromSchemata && $this->items instanceof AvroNamedSchema
+        $avro[AvroSchema::ITEMS_ATTR] = $this->is_items_schema_from_schemata
             ? $this->items->qualifiedName() : $this->items->toAvro();
-
         return $avro;
     }
 }
diff --git a/lang/php/lib/Schema/AvroEnumSchema.php b/lang/php/lib/Schema/AvroEnumSchema.php
index 6b6fd12c98..523fedd39a 100644
--- a/lang/php/lib/Schema/AvroEnumSchema.php
+++ b/lang/php/lib/Schema/AvroEnumSchema.php
@@ -23,19 +23,24 @@ namespace Apache\Avro\Schema;
 use Apache\Avro\AvroException;
 use Apache\Avro\AvroUtil;
 
+/**
+ * @package Avro
+ */
 class AvroEnumSchema extends AvroNamedSchema
 {
     /**
      * @var string[] array of symbols
      */
-    private array $symbols;
+    private $symbols;
 
     /**
+     * @param AvroName $name
+     * @param string $doc
      * @param string[] $symbols
-     * @param null|array<string> $aliases
+     * @param AvroNamedSchemata &$schemata
      * @throws AvroSchemaParseException
      */
-    public function __construct(AvroName $name, ?string $doc, mixed $symbols, AvroNamedSchemata $schemata, ?array $aliases = null)
+    public function __construct($name, $doc, $symbols, &$schemata = null, $aliases = null)
     {
         if (!AvroUtil::isList($symbols)) {
             throw new AvroSchemaParseException('Enum Schema symbols are not a list');
@@ -43,7 +48,7 @@ class AvroEnumSchema extends AvroNamedSchema
 
         if (count(array_unique($symbols)) > count($symbols)) {
             throw new AvroSchemaParseException(
-                sprintf('Duplicate symbols: %s', implode(", ", $symbols))
+                sprintf('Duplicate symbols: %s', $symbols)
             );
         }
 
@@ -60,7 +65,7 @@ class AvroEnumSchema extends AvroNamedSchema
     }
 
     /**
-     * @return string[] this enum schema's symbols
+     * @returns string[] this enum schema's symbols
      */
     public function symbols()
     {
@@ -69,7 +74,7 @@ class AvroEnumSchema extends AvroNamedSchema
 
     /**
      * @param string $symbol
-     * @return bool true if the given symbol exists in this
+     * @returns boolean true if the given symbol exists in this
      *          enum schema and false otherwise
      */
     public function hasSymbol($symbol)
@@ -79,36 +84,36 @@ class AvroEnumSchema extends AvroNamedSchema
 
     /**
      * @param int $index
-     * @return string enum schema symbol with the given (zero-based) index
+     * @returns string enum schema symbol with the given (zero-based) index
      */
     public function symbolByIndex($index)
     {
         if (array_key_exists($index, $this->symbols)) {
             return $this->symbols[$index];
         }
-
         throw new AvroException(sprintf('Invalid symbol index %d', $index));
     }
 
     /**
-     * @throws AvroException
-     * @return int the index of the given $symbol in the enum schema
+     * @param string $symbol
+     * @returns int the index of the given $symbol in the enum schema
      */
-    public function symbolIndex(string $symbol): int
+    public function symbolIndex($symbol)
     {
         $idx = array_search($symbol, $this->symbols, true);
         if (false !== $idx) {
             return $idx;
         }
-
         throw new AvroException(sprintf("Invalid symbol value '%s'", $symbol));
     }
 
-    public function toAvro(): string|array
+    /**
+     * @returns mixed
+     */
+    public function toAvro()
     {
         $avro = parent::toAvro();
         $avro[AvroSchema::SYMBOLS_ATTR] = $this->symbols;
-
         return $avro;
     }
 }
diff --git a/lang/php/lib/Schema/AvroField.php b/lang/php/lib/Schema/AvroField.php
index eb3e65e9ff..eeb50bc197 100644
--- a/lang/php/lib/Schema/AvroField.php
+++ b/lang/php/lib/Schema/AvroField.php
@@ -18,17 +18,13 @@
  * limitations under the License.
  */
 
-declare(strict_types=1);
-
 namespace Apache\Avro\Schema;
 
 /**
  * Field of an {@link AvroRecordSchema}
- *
- * @phpstan-import-type AvroSchemaDefinitionArray from AvroSchema
- * @phpstan-import-type AvroAliases from AvroAliasedSchema
+ * @package Avro
  */
-class AvroField extends AvroSchema implements AvroAliasedSchema
+class AvroField extends AvroSchema
 {
     /**
      * @var string fields name attribute name
@@ -61,211 +57,152 @@ class AvroField extends AvroSchema implements AvroAliasedSchema
     public const IGNORE_SORT_ORDER = 'ignore';
 
     /**
-     * @var list<string> list of valid field sort order values
+     * @var array list of valid field sort order values
      */
-    private static array $validFieldSortOrders = [
+    private static $validFieldSortOrders = array(
         self::ASC_SORT_ORDER,
         self::DESC_SORT_ORDER,
-        self::IGNORE_SORT_ORDER,
-    ];
-
-    private string $name;
-
-    private bool $isTypeFromSchemata;
-
+        self::IGNORE_SORT_ORDER
+    );
     /**
-     * @var bool whether or no there is a default value
+     * @var string
      */
-    private bool $hasDefault;
-
+    private $name;
     /**
-     * @var mixed field default value
+     * @var boolean whether or no there is a default value
      */
-    private mixed $default;
+    private $hasDefault;
     /**
-     * @var null|string sort order of this field
+     * @var string field default value
      */
-    private ?string $order;
-
-    /** @var null|AvroAliases */
-    private ?array $aliases;
-    private ?string $doc;
+    private $default;
+    /**
+     * @var string sort order of this field
+     */
+    private $order;
+    /**
+     * @var boolean whether or not the AvroNamedSchema of this field is
+     *              defined in the AvroNamedSchemata instance
+     */
+    private $isTypeFromSchemata;
+    /**
+     * @var array|null
+     */
+    private $aliases;
 
     /**
-     * @param array<string> $aliases
+     * @param string $name
+     * @param AvroSchema $schema
+     * @param boolean $is_type_from_schemata
+     * @param $has_default
+     * @param string $default
+     * @param string $order
+     * @param array $aliases
+     * @throws AvroSchemaParseException
      * @todo Check validity of $default value
-     */
-    private function __construct(
-        string $name,
-        string|AvroSchema $schema,
-        bool $isTypeFromSchemata,
-        bool $hasDefault,
-        mixed $default,
-        ?string $order = null,
-        ?array $aliases = null,
-        ?string $doc = null
+     * @todo Check validity of $order value
+     */
+    public function __construct(
+        $name,
+        $schema,
+        $is_type_from_schemata,
+        $has_default,
+        $default,
+        $order = null,
+        $aliases = null
     ) {
+        if (!AvroName::isWellFormedName($name)) {
+            throw new AvroSchemaParseException('Field requires a "name" attribute');
+        }
+
         parent::__construct($schema);
+        $this->isTypeFromSchemata = $is_type_from_schemata;
         $this->name = $name;
-        $this->isTypeFromSchemata = $isTypeFromSchemata;
-        $this->hasDefault = $hasDefault;
+        $this->hasDefault = $has_default;
         if ($this->hasDefault) {
             $this->default = $default;
         }
+        self::checkOrderValue($order);
         $this->order = $order;
+        self::hasValidAliases($aliases);
         $this->aliases = $aliases;
-
-        $this->doc = $doc;
     }
 
     /**
-     * @param AvroSchemaDefinitionArray $avro
-     * @throws AvroSchemaParseException
+     * @param string $order
+     * @throws AvroSchemaParseException if $order is not a valid
+     *                                  field order value.
      */
-    public static function fromFieldDefinition(array $avro, ?string $defaultNamespace, AvroNamedSchemata $schemata): self
+    private static function checkOrderValue($order)
     {
-        $name = $avro[self::FIELD_NAME_ATTR] ?? null;
-        $type = $avro[AvroSchema::TYPE_ATTR] ?? null;
-        $order = $avro[self::ORDER_ATTR] ?? null;
-        $aliases = $avro[AvroSchema::ALIASES_ATTR] ?? null;
-        $doc = $avro[AvroSchema::DOC_ATTR] ?? null;
-
-        if (!AvroName::isWellFormedName($name)) {
-            throw new AvroSchemaParseException('Field requires a "name" attribute');
-        }
-
-        self::checkOrderValue($order);
-        self::hasValidAliases($aliases);
-        self::hasValidDoc($doc);
-
-        $default = null;
-        $hasDefault = false;
-        if (array_key_exists(self::DEFAULT_ATTR, $avro)) {
-            $default = $avro[self::DEFAULT_ATTR];
-            $hasDefault = true;
-        }
-
-        $isSchemaFromSchemata = false;
-        $fieldAvroSchema = null;
-        if (
-            is_string($type)
-            && $fieldAvroSchema = $schemata->schemaByName(
-                new AvroName($type, null, $defaultNamespace)
-            )
-        ) {
-            $isSchemaFromSchemata = true;
-        } elseif (is_string($type) && self::isPrimitiveType($type)) {
-            $fieldAvroSchema = self::subparse($avro, $defaultNamespace, $schemata);
-        } else {
-            $fieldAvroSchema = self::subparse($type, $defaultNamespace, $schemata);
+        if (!is_null($order) && !self::isValidFieldSortOrder($order)) {
+            throw new AvroSchemaParseException(
+                sprintf('Invalid field sort order %s', $order)
+            );
         }
+    }
 
-        return new self(
-            name: $name,
-            schema: $fieldAvroSchema,
-            isTypeFromSchemata: $isSchemaFromSchemata,
-            hasDefault: $hasDefault,
-            default: $default,
-            order: $order,
-            aliases: $aliases,
-            doc: $doc
-        );
+    /**
+     * @param string $order
+     * @returns boolean
+     */
+    private static function isValidFieldSortOrder($order)
+    {
+        return in_array($order, self::$validFieldSortOrders);
     }
 
     /**
-     * @return AvroSchemaDefinitionArray|string the Avro representation of this field
+     * @returns mixed
      */
-    public function toAvro(): string|array
+    public function toAvro()
     {
-        $avro = [self::FIELD_NAME_ATTR => $this->name];
+        $avro = array(AvroField::FIELD_NAME_ATTR => $this->name);
 
-        $avro[AvroSchema::TYPE_ATTR] = match (true) {
-            $this->isTypeFromSchemata && $this->type instanceof AvroNamedSchema => $this->type->qualifiedName(),
-            $this->type instanceof AvroSchema => $this->type->toAvro(),
-            is_string($this->type) => $this->type,
-        };
+        $avro[AvroSchema::TYPE_ATTR] = ($this->isTypeFromSchemata)
+            ? $this->type->qualifiedName() : $this->type->toAvro();
 
         if (isset($this->default)) {
-            $avro[self::DEFAULT_ATTR] = $this->default;
+            $avro[AvroField::DEFAULT_ATTR] = $this->default;
         }
 
         if ($this->order) {
-            $avro[self::ORDER_ATTR] = $this->order;
-        }
-
-        if (!is_null($this->aliases)) {
-            $avro[AvroSchema::ALIASES_ATTR] = $this->aliases;
-        }
-
-        if (!is_null($this->doc)) {
-            $avro[AvroSchema::DOC_ATTR] = $this->doc;
+            $avro[AvroField::ORDER_ATTR] = $this->order;
         }
 
         return $avro;
     }
 
     /**
-     * @return string the name of this field
+     * @returns string the name of this field
      */
-    public function name(): string
+    public function name()
     {
         return $this->name;
     }
 
     /**
-     * @return mixed the default value of this field
+     * @returns mixed the default value of this field
      */
-    public function defaultValue(): mixed
+    public function defaultValue()
     {
         return $this->default;
     }
 
     /**
-     * @return bool true if the field has a default and false otherwise
+     * @returns boolean true if the field has a default and false otherwise
      */
-    public function hasDefaultValue(): bool
+    public function hasDefaultValue()
     {
         return $this->hasDefault;
     }
 
-    /**
-     * @return null|AvroAliases
-     */
-    public function getAliases(): ?array
+    public function getAliases()
     {
         return $this->aliases;
     }
 
-    public function hasAliases(): bool
-    {
-        return null !== $this->aliases;
-    }
-
-    public function getDoc(): ?string
-    {
-        return $this->doc;
-    }
-
-    public function hasDoc(): bool
-    {
-        return null !== $this->doc;
-    }
-
-    /**
-     * @throws AvroSchemaParseException if $order is not a valid
-     *                                  field order value.
-     */
-    private static function checkOrderValue(?string $order): void
-    {
-        if (!is_null($order) && !self::isValidFieldSortOrder($order)) {
-            throw new AvroSchemaParseException(
-                sprintf('Invalid field sort order %s', $order)
-            );
-        }
-    }
-
-    private static function isValidFieldSortOrder(string $order): bool
+    public function hasAliases()
     {
-        return in_array($order, self::$validFieldSortOrders, true);
+        return $this->aliases !== null;
     }
 }
diff --git a/lang/php/lib/Schema/AvroFixedSchema.php b/lang/php/lib/Schema/AvroFixedSchema.php
index 8fa70fd476..3ace00e46b 100644
--- a/lang/php/lib/Schema/AvroFixedSchema.php
+++ b/lang/php/lib/Schema/AvroFixedSchema.php
@@ -20,104 +20,51 @@
 
 namespace Apache\Avro\Schema;
 
-use Apache\Avro\AvroException;
-
 /**
  * AvroNamedSchema with fixed-length data values
+ * @package Avro
  */
 class AvroFixedSchema extends AvroNamedSchema
 {
     /**
      * @var int byte count of this fixed schema data value
      */
-    private int $size;
+    private $size;
 
     /**
+     * @param AvroName $name
+     * @param string $doc Set to null, as fixed schemas don't have doc strings
      * @param int $size byte count of this fixed schema data value
+     * @param AvroNamedSchemata &$schemata
+     * @param array $aliases
      * @throws AvroSchemaParseException
      */
-    public function __construct(AvroName $name, ?string $doc, int $size, AvroNamedSchemata $schemata, ?array $aliases = null)
+    public function __construct($name, $doc, $size, &$schemata = null, $aliases = null)
     {
-        parent::__construct(AvroSchema::FIXED_SCHEMA, $name, $doc, $schemata, $aliases);
+        if (!is_int($size)) {
+            throw new AvroSchemaParseException(
+                'Fixed Schema requires a valid integer for "size" attribute'
+            );
+        }
+        parent::__construct(AvroSchema::FIXED_SCHEMA, $name, null, $schemata, $aliases);
         $this->size = $size;
     }
 
     /**
-     * @return int byte count of this fixed schema data value
+     * @returns int byte count of this fixed schema data value
      */
-    public function size(): int
+    public function size()
     {
         return $this->size;
     }
 
-    public function toAvro(): string|array
+    /**
+     * @returns mixed
+     */
+    public function toAvro()
     {
         $avro = parent::toAvro();
         $avro[AvroSchema::SIZE_ATTR] = $this->size;
-
         return $avro;
     }
-
-    /**
-     * @param null|array<int, string> $aliases
-     * @throws AvroSchemaParseException
-     */
-    public static function duration(
-        AvroName $name,
-        ?string $doc,
-        AvroNamedSchemata $schemata,
-        ?array $aliases = null
-    ): self {
-        $fixedSchema = new self(
-            name: $name,
-            doc: $doc,
-            size: 12,
-            schemata: $schemata,
-            aliases: $aliases
-        );
-
-        $fixedSchema->logicalType = AvroLogicalType::duration();
-
-        return $fixedSchema;
-    }
-
-    /**
-     * @param null|array<int, string> $aliases
-     * @throws AvroSchemaParseException
-     * @throws AvroException
-     */
-    public static function decimal(
-        AvroName $name,
-        ?string $doc,
-        int $size,
-        int $precision,
-        int $scale,
-        AvroNamedSchemata $schemata,
-        ?array $aliases = null
-    ): self {
-        $self = new self(
-            name: $name,
-            doc: $doc,
-            size: $size,
-            schemata: $schemata,
-            aliases: $aliases
-        );
-
-        $maxPrecision = (int) floor(log10(self::maxDecimalMagnitude($size)));
-
-        if ($precision > $maxPrecision) {
-            throw new AvroException(
-                "Invalid precision for specified fixed size (size='{$size}', precision='{$precision}')."
-            );
-        }
-
-        $self->logicalType = AvroLogicalType::decimal($precision, $scale);
-
-        return $self;
-    }
-
-    public static function maxDecimalMagnitude(int $size): float
-    {
-        return (float) (2 ** ((8 * $size) - 1)) - 1;
-    }
 }
diff --git a/lang/php/lib/Schema/AvroLogicalType.php b/lang/php/lib/Schema/AvroLogicalType.php
deleted file mode 100644
index c432c8511d..0000000000
--- a/lang/php/lib/Schema/AvroLogicalType.php
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache\Avro\Schema;
-
-use Apache\Avro\AvroException;
-
-/**
- * @phpstan-import-type AvroSchemaDefinitionArray from AvroSchema
- * @phpstan-type AvroLogicalTypeAttributes array<string, int>
- */
-class AvroLogicalType
-{
-    public const ATTRIBUTE_DECIMAL_PRECISION = 'precision';
-    public const ATTRIBUTE_DECIMAL_SCALE = 'scale';
-
-    /**
-     * @param AvroLogicalTypeAttributes $attributes
-     */
-    public function __construct(
-        private readonly string $name,
-        private readonly array $attributes = []
-    ) {
-    }
-
-    public function name(): string
-    {
-        return $this->name;
-    }
-
-    /**
-     * @return AvroLogicalTypeAttributes
-     */
-    public function attributes(): array
-    {
-        return $this->attributes;
-    }
-
-    /**
-     * @return AvroSchemaDefinitionArray|string
-     */
-    public function toAvro(): string|array
-    {
-        $avro[AvroSchema::LOGICAL_TYPE_ATTR] = $this->name;
-
-        return array_merge($avro, $this->attributes);
-    }
-
-    public static function decimal(int $precision, int $scale): self
-    {
-        if ($precision <= 0) {
-            throw new AvroException("Precision '{$precision}' is invalid. It must be a positive integer.");
-        }
-
-        if ($scale < 0) {
-            throw new AvroException("Scale '{$scale}' is invalid. It must be a non-negative integer.");
-        }
-
-        if ($scale >= $precision) {
-            throw new AvroException(
-                "Scale must be a lower than precision (scale='{$scale}', precision='{$precision}')."
-            );
-        }
-
-        return new AvroLogicalType(
-            AvroSchema::DECIMAL_LOGICAL_TYPE,
-            [
-                self::ATTRIBUTE_DECIMAL_PRECISION => $precision,
-                self::ATTRIBUTE_DECIMAL_SCALE => $scale,
-
-            ]
-        );
-    }
-
-    public static function uuid(): self
-    {
-        return new AvroLogicalType(AvroSchema::UUID_LOGICAL_TYPE);
-    }
-
-    public static function date(): self
-    {
-        return new AvroLogicalType(AvroSchema::DATE_LOGICAL_TYPE);
-    }
-
-    public static function timeMillis(): self
-    {
-        return new AvroLogicalType(AvroSchema::TIME_MILLIS_LOGICAL_TYPE);
-    }
-
-    public static function timeMicros(): self
-    {
-        return new AvroLogicalType(AvroSchema::TIME_MICROS_LOGICAL_TYPE);
-    }
-
-    public static function timestampMillis(): self
-    {
-        return new AvroLogicalType(AvroSchema::TIMESTAMP_MILLIS_LOGICAL_TYPE);
-    }
-
-    public static function timestampMicros(): self
-    {
-        return new AvroLogicalType(AvroSchema::TIMESTAMP_MICROS_LOGICAL_TYPE);
-    }
-
-    public static function localTimestampMillis(): self
-    {
-        return new AvroLogicalType(AvroSchema::LOCAL_TIMESTAMP_MILLIS_LOGICAL_TYPE);
-    }
-
-    public static function localTimestampMicros(): self
-    {
-        return new AvroLogicalType(AvroSchema::LOCAL_TIMESTAMP_MICROS_LOGICAL_TYPE);
-    }
-
-    public static function duration(): self
-    {
-        return new AvroLogicalType(AvroSchema::DURATION_LOGICAL_TYPE);
-    }
-}
diff --git a/lang/php/lib/Schema/AvroMapSchema.php b/lang/php/lib/Schema/AvroMapSchema.php
index c8f6f76f42..dfcb9dab85 100644
--- a/lang/php/lib/Schema/AvroMapSchema.php
+++ b/lang/php/lib/Schema/AvroMapSchema.php
@@ -23,63 +23,68 @@ namespace Apache\Avro\Schema;
 /**
  * Avro map schema consisting of named values of defined
  * Avro Schema types.
- *
- * @phpstan-import-type AvroSchemaDefinitionArray from AvroSchema
+ * @package Avro
  */
 class AvroMapSchema extends AvroSchema
 {
     /**
-     * AvroSchema definition based on input $values variable that could contain a primitive type or an associative
-     * array with the AVRO definition.
+     * @var string|AvroSchema named schema name or AvroSchema
+     *      of map schema values.
      */
-    private AvroSchema $values;
+    private $values;
 
     /**
-     * @var bool true if the named schema
+     * @var boolean true if the named schema
+     * XXX Couldn't we derive this based on whether or not
+     * $this->values is a string?
      */
-    private bool $isValuesSchemaFromSchemata;
+    private $isValuesSchemaFromSchemata;
 
     /**
-     * @param AvroSchemaDefinitionArray|string $values
-     * @throws AvroSchemaParseException
+     * @param string|AvroSchema $values
+     * @param string $defaultNamespace namespace of enclosing schema
+     * @param AvroNamedSchemata &$schemata
      */
-    public function __construct(string|array $values, ?string $defaultNamespace, AvroNamedSchemata $schemata)
+    public function __construct($values, $defaultNamespace, &$schemata = null)
     {
         parent::__construct(AvroSchema::MAP_SCHEMA);
 
         $this->isValuesSchemaFromSchemata = false;
-        $valuesSchema = null;
+        $values_schema = null;
         if (
             is_string($values)
-            && $valuesSchema = $schemata->schemaByName(
+            && $values_schema = $schemata->schemaByName(
                 new AvroName($values, null, $defaultNamespace)
             )
         ) {
             $this->isValuesSchemaFromSchemata = true;
         } else {
-            $valuesSchema = AvroSchema::subparse(
+            $values_schema = AvroSchema::subparse(
                 $values,
                 $defaultNamespace,
                 $schemata
             );
         }
 
-        $this->values = $valuesSchema;
+        $this->values = $values_schema;
     }
 
-    public function values(): AvroSchema
+    /**
+     * @returns XXX|AvroSchema
+     */
+    public function values()
     {
         return $this->values;
     }
 
-    public function toAvro(): string|array
+    /**
+     * @returns mixed
+     */
+    public function toAvro()
     {
         $avro = parent::toAvro();
-        $avro[AvroSchema::VALUES_ATTR] = match (true) {
-            $this->isValuesSchemaFromSchemata && $this->values instanceof AvroNamedSchema => $this->values->qualifiedName(),
-            default => $this->values->toAvro(),
-        };
-
+        $avro[AvroSchema::VALUES_ATTR] = $this->isValuesSchemaFromSchemata
+            ? $this->values->qualifiedName() : $this->values->toAvro();
         return $avro;
     }
 }
diff --git a/lang/php/lib/Schema/AvroName.php b/lang/php/lib/Schema/AvroName.php
index 8b8f48b6a8..19ddd06972 100644
--- a/lang/php/lib/Schema/AvroName.php
+++ b/lang/php/lib/Schema/AvroName.php
@@ -20,7 +20,10 @@
 
 namespace Apache\Avro\Schema;
 
-class AvroName implements \Stringable
+/**
+ * @package Avro
+ */
+class AvroName
 {
     /**
      * @var string character used to separate names comprising the fullname
@@ -34,18 +37,26 @@ class AvroName implements \Stringable
     /**
      * @var string valid names are matched by self::NAME_REGEXP
      */
-    private string $name;
-    private ?string $namespace;
-    private string $fullname;
+    private $name;
+    /**
+     * @var string
+     */
+    private $namespace;
+    /**
+     * @var string
+     */
+    private $fullname;
     /**
      * @var string Name qualified as necessary given its default namespace.
      */
-    private string $qualifiedName;
+    private $qualified_name;
 
     /**
-     * @throws AvroSchemaParseException
+     * @param string $name
+     * @param string $namespace
+     * @param string $default_namespace
      */
-    public function __construct(mixed $name, ?string $namespace, ?string $defaultNamespace)
+    public function __construct($name, $namespace, $default_namespace)
     {
         if (!is_string($name) || empty($name)) {
             throw new AvroSchemaParseException('Name must be a non-empty string.');
@@ -57,104 +68,101 @@ class AvroName implements \Stringable
             throw new AvroSchemaParseException(sprintf('Invalid name "%s"', $name));
         } elseif (!is_null($namespace)) {
             $this->fullname = self::parseFullname($name, $namespace);
-        } elseif (!is_null($defaultNamespace)) {
-            $this->fullname = self::parseFullname($name, $defaultNamespace);
+        } elseif (!is_null($default_namespace)) {
+            $this->fullname = self::parseFullname($name, $default_namespace);
         } else {
             $this->fullname = $name;
         }
 
         [$this->name, $this->namespace] = self::extractNamespace($this->fullname);
-        $this->qualifiedName = (is_null($this->namespace) || $this->namespace === $defaultNamespace)
+        $this->qualified_name = (is_null($this->namespace) || $this->namespace === $default_namespace)
             ? $this->name
             : $this->fullname;
     }
 
     /**
-     * @return string fullname
-     * @uses $this->fullname()
+     * @param string $namespace
+     * @returns boolean true if namespace is composed of valid names
+     * @throws AvroSchemaParseException if any of the namespace components
+     *                                  are invalid.
      */
-    public function __toString(): string
+    private static function checkNamespaceNames($namespace)
     {
-        return (string) $this->fullname();
+        foreach (explode(self::NAME_SEPARATOR, $namespace) as $n) {
+            if (empty($n) || (0 === preg_match(self::NAME_REGEXP, $n))) {
+                throw new AvroSchemaParseException(sprintf('Invalid name "%s"', $n));
+            }
+        }
+        return true;
     }
 
     /**
-     * @return array{0: string, 1: null|string}
+     * @param string $name
+     * @param string $namespace
+     * @returns string
+     * @throws AvroSchemaParseException if any of the names are not valid.
      */
-    public static function extractNamespace(string $name, ?string $namespace = null): array
+    private static function parseFullname($name, $namespace)
+    {
+        if (!is_string($namespace) || empty($namespace)) {
+            throw new AvroSchemaParseException('Namespace must be a non-empty string.');
+        }
+        self::checkNamespaceNames($namespace);
+        return $namespace . '.' . $name;
+    }
+
+    /**
+     * @returns string[] array($name, $namespace)
+     */
+    public static function extractNamespace($name, $namespace = null)
     {
         $parts = explode(self::NAME_SEPARATOR, $name);
         if (count($parts) > 1) {
             $name = array_pop($parts);
             $namespace = implode(self::NAME_SEPARATOR, $parts);
         }
-
         return [$name, $namespace];
     }
 
     /**
-     * @return bool true if the given name is well-formed
+     * @returns boolean true if the given name is well-formed
      *          (is a non-null, non-empty string) and false otherwise
      */
-    public static function isWellFormedName(mixed $name): bool
+    public static function isWellFormedName($name)
     {
-        return is_string($name) && !empty($name) && preg_match(self::NAME_REGEXP, $name);
+        return (is_string($name) && !empty($name) && preg_match(self::NAME_REGEXP, $name));
     }
 
     /**
-     * @return array{0: string, 1: string}
+     * @returns array array($name, $namespace)
      */
-    public function nameAndNamespace(): array
+    public function nameAndNamespace()
     {
         return [$this->name, $this->namespace];
     }
 
-    public function fullname(): string
-    {
-        return $this->fullname;
-    }
-
     /**
-     * @return string name qualified for its context
+     * @returns string fullname
+     * @uses $this->fullname()
      */
-    public function qualifiedName(): string
+    public function __toString()
     {
-        return $this->qualifiedName;
-    }
-
-    public function namespace(): ?string
-    {
-        return $this->namespace;
+        return $this->fullname();
     }
 
     /**
-     * @throws AvroSchemaParseException if any of the namespace components
-     *                                  are invalid.
-     * @return bool true if namespace is composed of valid names
+     * @returns string
      */
-    private static function checkNamespaceNames(string $namespace): bool
+    public function fullname()
     {
-        foreach (explode(self::NAME_SEPARATOR, $namespace) as $n) {
-            if (empty($n) || (0 === preg_match(self::NAME_REGEXP, $n))) {
-                throw new AvroSchemaParseException(sprintf('Invalid name "%s"', $n));
-            }
-        }
-
-        return true;
+        return $this->fullname;
     }
 
     /**
-     * @param string $name
-     * @param string $namespace
-     * @throws AvroSchemaParseException if any of the names are not valid.
+     * @returns string name qualified for its context
      */
-    private static function parseFullname($name, $namespace): string
+    public function qualifiedName()
     {
-        if (!is_string($namespace) || empty($namespace)) {
-            throw new AvroSchemaParseException('Namespace must be a non-empty string.');
-        }
-        self::checkNamespaceNames($namespace);
-
-        return $namespace.'.'.$name;
+        return $this->qualified_name;
     }
 }
diff --git a/lang/php/lib/Schema/AvroNamedSchema.php b/lang/php/lib/Schema/AvroNamedSchema.php
index b34e90f30c..7db254dbb7 100644
--- a/lang/php/lib/Schema/AvroNamedSchema.php
+++ b/lang/php/lib/Schema/AvroNamedSchema.php
@@ -22,44 +22,62 @@ namespace Apache\Avro\Schema;
 
 /**
  * Parent class of named Avro schema
- * @phpstan-import-type AvroAliases from AvroAliasedSchema
+ * @package Avro
+ * @todo Refactor AvroNamedSchema to use an AvroName instance
+ *       to store name information.
  */
-class AvroNamedSchema extends AvroSchema implements AvroAliasedSchema
+class AvroNamedSchema extends AvroSchema
 {
     /**
-     * @param null|AvroAliases $aliases
+     * @var AvroName $name
+     */
+    private $name;
+
+    /**
+     * @var string documentation string
+     */
+    private $doc;
+    /**
+     * @var array
+     */
+    private $aliases;
+
+    /**
+     * @param string $type
+     * @param AvroName $name
+     * @param string $doc documentation string
+     * @param AvroNamedSchemata &$schemata
+     * @param array $aliases
      * @throws AvroSchemaParseException
      */
-    public function __construct(
-        string $type,
-        private readonly AvroName $name,
-        private readonly ?string $doc = null,
-        ?AvroNamedSchemata $schemata = null,
-        private ?array $aliases = null
-    ) {
+    public function __construct($type, $name, $doc = null, &$schemata = null, $aliases = null)
+    {
         parent::__construct($type);
+        $this->name = $name;
 
-        if ($this->aliases) {
-            self::hasValidAliases($this->aliases);
+        if ($doc && !is_string($doc)) {
+            throw new AvroSchemaParseException('Schema doc attribute must be a string');
+        }
+        $this->doc = $doc;
+        if ($aliases) {
+            self::hasValidAliases($aliases);
+            $this->aliases = $aliases;
         }
 
         if (!is_null($schemata)) {
-            $schemata->registerNamedSchema($this);
+            $schemata = $schemata->cloneWithNewSchema($this);
         }
     }
 
-    /**
-     * @return null|AvroAliases
-     */
-    public function getAliases(): ?array
+    public function getAliases()
     {
         return $this->aliases;
     }
 
     /**
-     * @return array<string, mixed>|string
+     * @returns mixed
      */
-    public function toAvro(): string|array
+    public function toAvro()
     {
         $avro = parent::toAvro();
         [$name, $namespace] = AvroName::extractNamespace($this->qualifiedName());
@@ -73,22 +91,19 @@ class AvroNamedSchema extends AvroSchema implements AvroAliasedSchema
         if (!is_null($this->aliases)) {
             $avro[AvroSchema::ALIASES_ATTR] = $this->aliases;
         }
-
         return $avro;
     }
 
-    public function qualifiedName(): string
+    public function qualifiedName()
     {
         return $this->name->qualifiedName();
     }
 
-    public function fullname(): string
+    /**
+     * @returns string
+     */
+    public function fullname()
     {
         return $this->name->fullname();
     }
-
-    public function namespace(): ?string
-    {
-        return $this->name->namespace();
-    }
 }
diff --git a/lang/php/lib/Schema/AvroNamedSchemata.php b/lang/php/lib/Schema/AvroNamedSchemata.php
index 643a1876e5..1e7a88b2e1 100644
--- a/lang/php/lib/Schema/AvroNamedSchemata.php
+++ b/lang/php/lib/Schema/AvroNamedSchemata.php
@@ -18,100 +18,86 @@
  * limitations under the License.
  */
 
-declare(strict_types=1);
-
 namespace Apache\Avro\Schema;
 
 /**
  *  Keeps track of AvroNamedSchema which have been observed so far,
  *  as well as the default namespace.
+ *
+ * @package Avro
  */
 class AvroNamedSchemata
 {
-    public function __construct(
-        /**
-         * @var AvroNamedSchema[]
-         */
-        private array $schemata = []
-    ) {
+    /**
+     * @var AvroNamedSchema[]
+     */
+    private $schemata;
+
+    /**
+     * @param AvroNamedSchemata[]
+     */
+    public function __construct($schemata = array())
+    {
+        $this->schemata = $schemata;
     }
 
-    public function listSchemas(): void
+    public function listSchemas()
     {
         var_export($this->schemata);
         foreach ($this->schemata as $sch) {
-            echo 'Schema '.$sch->__toString()."\n";
+            print('Schema ' . $sch->__toString() . "\n");
         }
     }
 
-    public function schemaByName(AvroName $name): ?AvroSchema
+    /**
+     * @param AvroName $name
+     * @returns AvroSchema|null
+     */
+    public function schemaByName($name)
     {
         return $this->schema($name->fullname());
     }
 
     /**
-     * @return null|AvroSchema the schema which has the given name,
+     * @param string $fullname
+     * @returns AvroSchema|null the schema which has the given name,
      *          or null if there is no schema with the given name.
      */
-    public function schema(string $fullname): ?AvroSchema
+    public function schema($fullname)
     {
-        return $this->schemata[$fullname] ?? null;
+        if (isset($this->schemata[$fullname])) {
+            return $this->schemata[$fullname];
+        }
+        return null;
     }
 
     /**
      * Creates a new AvroNamedSchemata instance of this schemata instance
      * with the given $schema appended.
-     *
-     * @param AvroNamedSchema $schema schema to add to this existing schemata
-     * @throws AvroSchemaParseException
+     * @param AvroNamedSchema schema to add to this existing schemata
+     * @returns AvroNamedSchemata
      */
-    public function cloneWithNewSchema(AvroNamedSchema $schema): self
+    public function cloneWithNewSchema($schema)
     {
         $name = $schema->fullname();
-        $this->validateNamedSchema($name);
-
-        $schemata = new self($this->schemata);
+        if (AvroSchema::isValidType($name)) {
+            throw new AvroSchemaParseException(sprintf('Name "%s" is a reserved type name', $name));
+        }
+        if ($this->hasName($name)) {
+            throw new AvroSchemaParseException(sprintf('Name "%s" is already in use', $name));
+        }
+        $schemata = new AvroNamedSchemata($this->schemata);
         $schemata->schemata[$name] = $schema;
-
         return $schemata;
     }
 
     /**
-     * Append the given AvroNamedSchema to this schemata instance.
-     *
-     * @param AvroNamedSchema $schema schema to add to this existing schemata
-     * @throws AvroSchemaParseException
-     */
-    public function registerNamedSchema(AvroNamedSchema $schema): self
-    {
-        $name = $schema->fullname();
-        $this->validateNamedSchema($name);
-
-        $this->schemata[$name] = $schema;
-
-        return $this;
-    }
-
-    /**
-     * @return bool true if there exists a schema with the given name
+     * @param string $fullname
+     * @returns boolean true if there exists a schema with the given name
      *                  and false otherwise.
      */
-    public function hasName(string $fullname): bool
+    public function hasName($fullname)
     {
         return array_key_exists($fullname, $this->schemata);
     }
-
-    /**
-     * @throws AvroSchemaParseException
-     */
-    private function validateNamedSchema(string $name): void
-    {
-        if (AvroSchema::isValidType($name)) {
-            throw new AvroSchemaParseException(sprintf('Name "%s" is a reserved type name', $name));
-        }
-
-        if ($this->hasName($name)) {
-            throw new AvroSchemaParseException(sprintf('Name "%s" is already in use', $name));
-        }
-    }
 }
diff --git a/lang/php/lib/Schema/AvroPrimitiveSchema.php b/lang/php/lib/Schema/AvroPrimitiveSchema.php
index 895b26fbc4..94686d8ec0 100644
--- a/lang/php/lib/Schema/AvroPrimitiveSchema.php
+++ b/lang/php/lib/Schema/AvroPrimitiveSchema.php
@@ -22,6 +22,7 @@ namespace Apache\Avro\Schema;
 
 /**
  * Avro schema for basic types such as null, int, long, string.
+ * @package Avro
  */
 class AvroPrimitiveSchema extends AvroSchema
 {
@@ -30,7 +31,7 @@ class AvroPrimitiveSchema extends AvroSchema
      * @throws AvroSchemaParseException if the given $type is not a
      *         primitive schema type name
      */
-    public function __construct(string $type)
+    public function __construct($type)
     {
         if (!self::isPrimitiveType($type)) {
             throw new AvroSchemaParseException(sprintf('%s is not a valid primitive type.', $type));
@@ -38,88 +39,16 @@ class AvroPrimitiveSchema extends AvroSchema
         parent::__construct($type);
     }
 
-    public static function decimal(int $precision, int $scale): self
-    {
-        $self = new self(AvroSchema::BYTES_TYPE);
-        $self->logicalType = AvroLogicalType::decimal($precision, $scale);
-
-        return $self;
-    }
-
-    public static function uuid(): self
-    {
-        $self = new self(AvroSchema::STRING_TYPE);
-        $self->logicalType = AvroLogicalType::uuid();
-
-        return $self;
-    }
-
-    public static function date(): self
-    {
-        $self = new self(AvroSchema::INT_TYPE);
-        $self->logicalType = AvroLogicalType::date();
-
-        return $self;
-    }
-
-    public static function timeMillis(): self
-    {
-        $self = new self(AvroSchema::INT_TYPE);
-        $self->logicalType = AvroLogicalType::timeMillis();
-
-        return $self;
-    }
-
-    public static function timeMicros(): self
-    {
-        $self = new self(AvroSchema::LONG_TYPE);
-        $self->logicalType = AvroLogicalType::timeMicros();
-
-        return $self;
-    }
-
-    public static function timestampMillis(): self
-    {
-        $self = new self(AvroSchema::LONG_TYPE);
-        $self->logicalType = AvroLogicalType::timestampMillis();
-
-        return $self;
-    }
-
-    public static function timestampMicros(): self
-    {
-        $self = new self(AvroSchema::LONG_TYPE);
-        $self->logicalType = AvroLogicalType::timestampMicros();
-
-        return $self;
-    }
-
-    public static function localTimestampMillis(): self
-    {
-        $self = new self(AvroSchema::LONG_TYPE);
-        $self->logicalType = AvroLogicalType::localTimestampMillis();
-
-        return $self;
-    }
-
-    public static function localTimestampMicros(): self
-    {
-        $self = new self(AvroSchema::LONG_TYPE);
-        $self->logicalType = AvroLogicalType::localTimestampMicros();
-
-        return $self;
-    }
-
-    public function toAvro(): string|array
+    /**
+     * @returns mixed
+     */
+    public function toAvro()
     {
         $avro = parent::toAvro();
-
-        // This check has been added (I guess) to avoid printing something like this for primitive types:
-        // {"name": "something", "type": {"type": "string"}}
-        if (1 === count($avro)) {
+        // FIXME: Is this if really necessary? When *wouldn't* this be the case?
+        if (1 == count($avro)) {
             return $this->type;
         }
-
         return $avro;
     }
 }
diff --git a/lang/php/lib/Schema/AvroRecordSchema.php b/lang/php/lib/Schema/AvroRecordSchema.php
index 5987ee90a4..354aebd2a8 100644
--- a/lang/php/lib/Schema/AvroRecordSchema.php
+++ b/lang/php/lib/Schema/AvroRecordSchema.php
@@ -21,33 +21,37 @@
 namespace Apache\Avro\Schema;
 
 /**
- * @phpstan-import-type AvroAliases from AvroAliasedSchema
+ * @package Avro
  */
 class AvroRecordSchema extends AvroNamedSchema
 {
     /**
-     * @var array<int, AvroField> array of AvroNamedSchema field definitions of
+     * @var AvroNamedSchema[] array of AvroNamedSchema field definitions of
      *                   this AvroRecordSchema
      */
-    private array $fields;
+    private $fields;
     /**
-     * @var null|array<string, AvroField> map of field names to field objects.
+     * @var array map of field names to field objects.
      * @internal Not called directly. Memoization of AvroRecordSchema->fieldsHash()
      */
-    private ?array $fieldsHash = null;
+    private $fieldsHash;
 
     /**
-     * @param null|array<string, mixed> $fields
-     * @param null|AvroAliases $aliases
+     * @param AvroName $name
+     * @param string $namespace
+     * @param string $doc
+     * @param array $fields
+     * @param AvroNamedSchemata &$schemata
+     * @param string $schema_type schema type name
      * @throws AvroSchemaParseException
      */
     public function __construct(
-        AvroName $name,
-        ?string $doc,
-        ?array $fields,
-        AvroNamedSchemata $schemata,
-        string $schemaType = AvroSchema::RECORD_SCHEMA,
-        ?array $aliases = null
+        $name,
+        $doc,
+        $fields,
+        &$schemata = null,
+        $schema_type = AvroSchema::RECORD_SCHEMA,
+        $aliases = null
     ) {
         if (is_null($fields)) {
             throw new AvroSchemaParseException(
@@ -55,104 +59,127 @@ class AvroRecordSchema extends AvroNamedSchema
             );
         }
 
-        if (AvroSchema::REQUEST_SCHEMA === $schemaType) {
-            parent::__construct($schemaType, $name);
+        if (AvroSchema::REQUEST_SCHEMA == $schema_type) {
+            parent::__construct($schema_type, $name);
         } else {
-            parent::__construct($schemaType, $name, $doc, $schemata, $aliases);
+            parent::__construct($schema_type, $name, $doc, $schemata, $aliases);
         }
 
-        [, $namespace] = $name->nameAndNamespace();
+        [$x, $namespace] = $name->nameAndNamespace();
         $this->fields = self::parseFields($fields, $namespace, $schemata);
     }
 
     /**
-     * @param array<string, mixed> $fieldsDefinitions
-     * @param null|string $defaultNamespace namespace of enclosing schema
+     * @param mixed $field_data
+     * @param string $default_namespace namespace of enclosing schema
+     * @param AvroNamedSchemata &$schemata
+     * @returns AvroField[]
      * @throws AvroSchemaParseException
-     * @return array<int, AvroField>
      */
-    public static function parseFields(
-        array $fieldsDefinitions,
-        ?string $defaultNamespace,
-        AvroNamedSchemata $schemata
-    ): array {
-        $fields = [];
-        $fieldNames = [];
-        $aliasNames = [];
-        foreach ($fieldsDefinitions as $fieldDefinition) {
-            $name = $fieldDefinition[AvroField::FIELD_NAME_ATTR] ?? null;
-
-            if (in_array($name, $fieldNames)) {
+    public static function parseFields($field_data, $default_namespace, &$schemata)
+    {
+        $fields = array();
+        $field_names = array();
+        $alias_names = [];
+        foreach ($field_data as $index => $field) {
+            $name = $field[AvroField::FIELD_NAME_ATTR] ?? null;
+            $type = $field[AvroSchema::TYPE_ATTR] ?? null;
+            $order = $field[AvroField::ORDER_ATTR] ?? null;
+            $aliases = $field[AvroField::ALIASES_ATTR] ?? null;
+
+            $default = null;
+            $has_default = false;
+            if (array_key_exists(AvroField::DEFAULT_ATTR, $field)) {
+                $default = $field[AvroField::DEFAULT_ATTR];
+                $has_default = true;
+            }
+
+            if (in_array($name, $field_names)) {
                 throw new AvroSchemaParseException(
                     sprintf("Field name %s is already in use", $name)
                 );
             }
 
-            $newField = AvroField::fromFieldDefinition($fieldDefinition, $defaultNamespace, $schemata);
+            $is_schema_from_schemata = false;
+            $field_schema = null;
+            if (
+                is_string($type)
+                && $field_schema = $schemata->schemaByName(
+                    new AvroName($type, null, $default_namespace)
+                )
+            ) {
+                $is_schema_from_schemata = true;
+            } else {
+                $field_schema = self::subparse($type, $default_namespace, $schemata);
+            }
 
-            $fieldNames[] = $name;
-            if ($newField->hasAliases() && array_intersect($aliasNames, $newField->getAliases())) {
+            $new_field = new AvroField(
+                $name,
+                $field_schema,
+                $is_schema_from_schemata,
+                $has_default,
+                $default,
+                $order,
+                $aliases
+            );
+            $field_names[] = $name;
+            if ($new_field->hasAliases() && array_intersect($alias_names, $new_field->getAliases())) {
                 throw new AvroSchemaParseException("Alias already in use");
             }
-            if ($newField->hasAliases()) {
-                array_push($aliasNames, ...$newField->getAliases());
+            if ($new_field->hasAliases()) {
+                array_push($alias_names, ...$new_field->getAliases());
             }
-            $fields[] = $newField;
+            $fields[] = $new_field;
... 7173 lines suppressed ...