diff -pruN 6.6.0-1/.github/workflows/code-cov.yml 6.6.2-1/.github/workflows/code-cov.yml
--- 6.6.0-1/.github/workflows/code-cov.yml	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/.github/workflows/code-cov.yml	2025-11-28 15:24:03.000000000 +0000
@@ -3,10 +3,10 @@ name: "Code Coverage"
 on:
   push:
     branches:
-      - master
+      - main
   pull_request:
     branches:
-      - master
+      - main
 
 env:
   COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
diff -pruN 6.6.0-1/.github/workflows/continuous-integration-32-bits.yml 6.6.2-1/.github/workflows/continuous-integration-32-bits.yml
--- 6.6.0-1/.github/workflows/continuous-integration-32-bits.yml	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/.github/workflows/continuous-integration-32-bits.yml	2025-11-28 15:24:03.000000000 +0000
@@ -3,10 +3,10 @@ name: "Continuous Integration - 32-bits"
 on:
   push:
     branches:
-      - master
+      - main
   pull_request:
     branches:
-      - master
+      - main
 
 env:
   COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
diff -pruN 6.6.0-1/.github/workflows/continuous-integration.yml 6.6.2-1/.github/workflows/continuous-integration.yml
--- 6.6.0-1/.github/workflows/continuous-integration.yml	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/.github/workflows/continuous-integration.yml	2025-11-28 15:24:03.000000000 +0000
@@ -3,10 +3,10 @@ name: "Continuous Integration"
 on:
   push:
     branches:
-      - master
+      - main
   pull_request:
     branches:
-      - master
+      - main
 
 env:
   COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
@@ -21,12 +21,12 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
+        php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
         dependencies: [highest]
         include:
           - php-version: "7.2"
             dependencies: lowest
-          - php-version: "8.5"
+          - php-version: "8.6"
             dependencies: ignore
             experimental: true
 
diff -pruN 6.6.0-1/.github/workflows/lint.yml 6.6.2-1/.github/workflows/lint.yml
--- 6.6.0-1/.github/workflows/lint.yml	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/.github/workflows/lint.yml	2025-11-28 15:24:03.000000000 +0000
@@ -3,10 +3,10 @@ name: "PHP Lint"
 on:
   push:
     branches:
-      - master
+      - main
   pull_request:
     branches:
-      - master
+      - main
 
 jobs:
   lint:
diff -pruN 6.6.0-1/.github/workflows/phpstan.yml 6.6.2-1/.github/workflows/phpstan.yml
--- 6.6.0-1/.github/workflows/phpstan.yml	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/.github/workflows/phpstan.yml	2025-11-28 15:24:03.000000000 +0000
@@ -3,10 +3,10 @@ name: "PHPStan"
 on:
   push:
     branches:
-      - master
+      - main
   pull_request:
     branches:
-      - master
+      - main
 
 env:
   COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
diff -pruN 6.6.0-1/.github/workflows/style-check.yml 6.6.2-1/.github/workflows/style-check.yml
--- 6.6.0-1/.github/workflows/style-check.yml	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/.github/workflows/style-check.yml	2025-11-28 15:24:03.000000000 +0000
@@ -3,10 +3,10 @@ name: "Style Check"
 on:
   push:
     branches:
-      - master
+      - main
   pull_request:
     branches:
-      - master
+      - main
 
 jobs:
   style-check:
diff -pruN 6.6.0-1/CHANGELOG.md 6.6.2-1/CHANGELOG.md
--- 6.6.0-1/CHANGELOG.md	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/CHANGELOG.md	2025-11-28 15:24:03.000000000 +0000
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Ve
 
 ## [Unreleased]
 
+## [6.6.2] - 2025-11-28
+### Changed
+- Move PHP 8.5 to default add PHP 8.6 as experimental ([#852](https://github.com/jsonrainbow/json-schema/pull/852))
+### Fixed
+- Allow underscore and tilde in URI hostnames as per RFC 3986 ([#853](https://github.com/jsonrainbow/json-schema/pull/853))
+
+## [6.6.1] - 2025-11-07
+### Changed
+- Rename master to main ([#848](https://github.com/jsonrainbow/json-schema/pull/848))
+### Fixed
+- Don't skip ref expanding for property called enum when child of property called properties ([#851](https://github.com/jsonrainbow/json-schema/pull/851))
+
 ## [6.6.0] - 2025-10-10
 ### Added
 - Add lint check for class autoloading PSR compliance ([#845](https://github.com/jsonrainbow/json-schema/pull/845))
diff -pruN 6.6.0-1/debian/changelog 6.6.2-1/debian/changelog
--- 6.6.0-1/debian/changelog	2025-10-12 11:07:51.000000000 +0000
+++ 6.6.2-1/debian/changelog	2025-12-02 09:14:07.000000000 +0000
@@ -1,3 +1,23 @@
+php-json-schema (6.6.2-1) unstable; urgency=medium
+
+  [ Dave Long ]
+  * Allow underscore and tilde in URI hostnames as per RFC 3986 (#853)
+
+  [ Danny van der Sluijs ]
+  * build: Move PHP 8.5 to default add PHP 8.6 as experimental (#852)
+  * docs: Prepare 6.6.2 release
+
+ -- David Prévot <taffit@debian.org>  Tue, 02 Dec 2025 10:14:07 +0100
+
+php-json-schema (6.6.1-1) unstable; urgency=medium
+
+  [ Danny van der Sluijs ]
+  * Don't skip ref expanding for property called enum when child of property
+    called properties (#851)
+  * docs: Prepare 6.6.1 release
+
+ -- David Prévot <taffit@debian.org>  Sun, 09 Nov 2025 10:03:04 +0100
+
 php-json-schema (6.6.0-1) unstable; urgency=medium
 
   [ Viktor Djupsjöbacka ]
diff -pruN 6.6.0-1/debian/patches/0003-Modernize-PHPUnit-syntax.patch 6.6.2-1/debian/patches/0003-Modernize-PHPUnit-syntax.patch
--- 6.6.0-1/debian/patches/0003-Modernize-PHPUnit-syntax.patch	2025-10-12 11:02:56.000000000 +0000
+++ 6.6.2-1/debian/patches/0003-Modernize-PHPUnit-syntax.patch	2025-12-02 09:06:42.000000000 +0000
@@ -288,7 +288,7 @@ index 8292b9b..d9bf404 100644
      {
          $t = new TypeConstraint();
 diff --git a/tests/Drafts/Draft3Test.php b/tests/Drafts/Draft3Test.php
-index 1edee6b..f56d4a7 100644
+index d0fb90f..30f67d9 100644
 --- a/tests/Drafts/Draft3Test.php
 +++ b/tests/Drafts/Draft3Test.php
 @@ -8,6 +8,7 @@ use JsonSchema\Constraints\Factory;
@@ -454,7 +454,7 @@ index 7b46e23..ade3788 100644
      {
          self::assertFalse(RelativeReferenceValidator::isValid($ref));
 diff --git a/tests/Tool/Validator/UriValidatorTest.php b/tests/Tool/Validator/UriValidatorTest.php
-index 13e99b8..56e6f8a 100644
+index 7eedaca..61eaddc 100644
 --- a/tests/Tool/Validator/UriValidatorTest.php
 +++ b/tests/Tool/Validator/UriValidatorTest.php
 @@ -5,17 +5,18 @@ declare(strict_types=1);
diff -pruN 6.6.0-1/src/JsonSchema/SchemaStorage.php 6.6.2-1/src/JsonSchema/SchemaStorage.php
--- 6.6.0-1/src/JsonSchema/SchemaStorage.php	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/src/JsonSchema/SchemaStorage.php	2025-11-28 15:24:03.000000000 +0000
@@ -81,9 +81,10 @@ class SchemaStorage implements SchemaSto
     /**
      * Recursively resolve all references against the provided base
      *
-     * @param mixed $schema
+     * @param mixed        $schema
+     * @param list<string> $propertyStack
      */
-    private function expandRefs(&$schema, ?string $parentId = null): void
+    private function expandRefs(&$schema, ?string $parentId = null, array $propertyStack = []): void
     {
         if (!is_object($schema)) {
             if (is_array($schema)) {
@@ -100,8 +101,9 @@ class SchemaStorage implements SchemaSto
             $schema->{'$ref'} = (string) $refPointer;
         }
 
+        $parentProperty = array_slice($propertyStack, -1)[0] ?? '';
         foreach ($schema as $propertyName => &$member) {
-            if (in_array($propertyName, ['enum', 'const'])) {
+            if ($parentProperty !== 'properties' && in_array($propertyName, ['enum', 'const'])) {
                 // Enum and const don't allow $ref as a keyword, see https://github.com/json-schema-org/JSON-Schema-Test-Suite/pull/445
                 continue;
             }
@@ -112,7 +114,9 @@ class SchemaStorage implements SchemaSto
                 $childId = $this->uriResolver->resolve($schemaId, $childId);
             }
 
-            $this->expandRefs($member, $childId);
+            $clonedPropertyStack = $propertyStack;
+            $clonedPropertyStack[] = $propertyName;
+            $this->expandRefs($member, $childId, $clonedPropertyStack);
         }
     }
 
diff -pruN 6.6.0-1/src/JsonSchema/Tool/Validator/UriValidator.php 6.6.2-1/src/JsonSchema/Tool/Validator/UriValidator.php
--- 6.6.0-1/src/JsonSchema/Tool/Validator/UriValidator.php	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/src/JsonSchema/Tool/Validator/UriValidator.php	2025-11-28 15:24:03.000000000 +0000
@@ -12,7 +12,7 @@ class UriValidator
         $hierarchicalPattern = '/^
             ([a-z][a-z0-9+\-.]*):\/\/                # Scheme (http, https, ftp, etc.)
             (?:([^:@\/?#]+)(?::([^@\/?#]*))?@)?      # Optional userinfo (user:pass@)
-            ([a-z0-9.-]+|\[[a-f0-9:.]+\])            # Hostname or IPv6 in brackets
+            ([a-z0-9._~-]+|\[[a-f0-9:.]+\])          # Hostname or IPv6 in brackets
             (?::(\d{1,5}))?                          # Optional port
             (\/[a-zA-Z0-9._~!$&\'()*+,;=:@\/%-]*)*   # Path (valid characters only)
             (\?([^#]*))?                             # Optional query
diff -pruN 6.6.0-1/tests/Drafts/Draft3Test.php 6.6.2-1/tests/Drafts/Draft3Test.php
--- 6.6.0-1/tests/Drafts/Draft3Test.php	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/tests/Drafts/Draft3Test.php	2025-11-28 15:24:03.000000000 +0000
@@ -78,14 +78,7 @@ JSON
 
     public function getInvalidTests(): \Generator
     {
-        $skip = [
-            'ref.json / $ref prevents a sibling id from changing the base uri / $ref resolves to /definitions/base_foo, data does not validate'
-        ];
-
         foreach (parent::getInvalidTests() as $name => $testcase) {
-            if (in_array($name, $skip, true)) {
-                continue;
-            }
             yield $name => $testcase;
         }
     }
@@ -107,15 +100,7 @@ JSON
 
     public function getValidForAssocTests(): \Generator
     {
-        $skip = [
-            'type.json / object type matches objects / an array is not an object',
-            'type.json / array type matches arrays / an object is not an array',
-        ];
-
         foreach (parent::getValidForAssocTests() as $name => $testcase) {
-            if (in_array($name, $skip, true)) {
-                continue;
-            }
             yield $name => $testcase;
         }
     }
@@ -129,8 +114,6 @@ JSON
             // Optional
             'bignum.json',
             'ecmascript-regex.json',
-            'format.json',
-            'jsregex.json',
             'zeroTerminatedFloats.json'
         ];
     }
diff -pruN 6.6.0-1/tests/Drafts/Draft4Test.php 6.6.2-1/tests/Drafts/Draft4Test.php
--- 6.6.0-1/tests/Drafts/Draft4Test.php	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/tests/Drafts/Draft4Test.php	2025-11-28 15:24:03.000000000 +0000
@@ -23,13 +23,8 @@ class Draft4Test extends BaseDraftTestCa
     public function getInvalidTests(): \Generator
     {
         $skip = [
-            'id.json / id inside an enum is not a real identifier / no match on enum or $ref to id',
-            'ref.json / $ref prevents a sibling id from changing the base uri / $ref resolves to /definitions/base_foo, data does not validate',
-            'ref.json / Recursive references between schemas / invalid tree',
-            'ref.json / refs with quote / object with strings is invalid',
             'ref.json / Location-independent identifier / mismatch',
             'ref.json / Location-independent identifier with base URI change in subschema / mismatch',
-            'ref.json / empty tokens in $ref json-pointer / non-number is invalid',
             'ref.json / id must be resolved against nearest parent, not just immediate parent / non-number is invalid',
             'refRemote.json / Location-independent identifier in remote ref / string is invalid',
             'refRemote.json / base URI change - change folder / string is invalid'
@@ -46,7 +41,6 @@ class Draft4Test extends BaseDraftTestCa
     public function getInvalidForAssocTests(): \Generator
     {
         $skip = [
-            'ref.json / Recursive references between schemas / valid tree',
             'type.json / object type matches objects / an array is not an object',
             'type.json / array type matches arrays / an object is not an array',
         ];
@@ -62,13 +56,8 @@ class Draft4Test extends BaseDraftTestCa
     public function getValidTests(): \Generator
     {
         $skip = [
-            'ref.json / $ref prevents a sibling id from changing the base uri / $ref resolves to /definitions/base_foo, data validates',
-            'ref.json / Recursive references between schemas / valid tree',
-            'ref.json / refs with quote / object with numbers is valid',
             'ref.json / Location-independent identifier / match',
             'ref.json / Location-independent identifier with base URI change in subschema / match',
-            'ref.json / empty tokens in $ref json-pointer / number is valid',
-            'ref.json / naive replacement of $ref with its destination is not correct / match the enum exactly',
             'ref.json / id must be resolved against nearest parent, not just immediate parent / number is valid',
             'refRemote.json / Location-independent identifier in remote ref / integer is valid',
             'refRemote.json / base URI change - change folder / number is valid',
diff -pruN 6.6.0-1/tests/Tool/Validator/UriValidatorTest.php 6.6.2-1/tests/Tool/Validator/UriValidatorTest.php
--- 6.6.0-1/tests/Tool/Validator/UriValidatorTest.php	2025-10-10 11:34:09.000000000 +0000
+++ 6.6.2-1/tests/Tool/Validator/UriValidatorTest.php	2025-11-28 15:24:03.000000000 +0000
@@ -32,6 +32,8 @@ class UriValidatorTest extends TestCase
         yield 'Data URI' => ['uri' => 'data:text/plain;charset=utf-8,Hello%20World!'];
         yield 'ISBN URN URI' => ['uri' => 'urn:isbn:0451450523'];
         yield 'OASIS URN URI' => ['uri' => 'urn:oasis:names:specification:docbook:dtd:xml:4.1.2'];
+        yield 'Custom URI with underscore' => ['uri' => 'custom://reg_name/path/file.json'];
+        yield 'Custom URI with tilde' => ['uri' => 'custom://reg~name/path/file.json'];
     }
 
     public function invalidUriDataProvider(): \Generator
