Allow the latest package:analyzer

Closes #681

PiperOrigin-RevId: 553733481
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5657515..7da3cb8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
 ## 5.4.3-wip
 
-* Require analyzer 5.12.0.
+* Require analyzer 5.12.0, allow analyzer version 6.x;
 * Add example of writing a class to mock function objects.
 
 ## 5.4.2
diff --git a/pubspec.yaml b/pubspec.yaml
index 6d27e78..6d9c556 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -9,7 +9,7 @@
   sdk: '>=2.19.0 <4.0.0'
 
 dependencies:
-  analyzer: '>=5.12.0 <6.0.0'
+  analyzer: '>=5.12.0 <7.0.0'
   build: '>=1.3.0 <3.0.0'
   code_builder: ^4.5.0
   collection: ^1.15.0