@@ -30,7 +30,7 @@ public function tearDown(): void
3030
3131    public  function  testDocString (): void 
3232    {
33-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
33+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
3434        $ filename  = sprintf ('%s/enum/TestEnum.php ' , $ this  ->fixtureDir );
3535        try  {
3636            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
@@ -48,7 +48,7 @@ public function testDocString(): void
4848    }
4949    public  function  test_enum_getDescription (): void 
5050    {
51-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
51+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
5252        $ filename  = sprintf ('%s/enum/TestEnum.php ' , $ this  ->fixtureDir );
5353        try  {
5454            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
@@ -66,7 +66,7 @@ public function test_enum_getDescription(): void
6666
6767    public  function  testDocStringMultiLines (): void 
6868    {
69-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
69+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
7070        $ filename  = sprintf ('%s/enum/TestEnum.php ' , $ this  ->fixtureDir );
7171        try  {
7272            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
@@ -87,7 +87,7 @@ public function testDocStringMultiLines(): void
8787
8888    public  function  test_getDescription (): void 
8989    {
90-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
90+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
9191        $ filename  = sprintf ('%s/enum/TestEnum.php ' , $ this  ->fixtureDir );
9292        try  {
9393            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
@@ -109,7 +109,7 @@ public function test_getDescription(): void
109109
110110    public  function  test_getVarType (): void 
111111    {
112-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
112+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
113113        $ filename  = sprintf ('%s/phpdoc/product/Product.php ' , $ this  ->fixtureDir );
114114        try  {
115115            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
@@ -127,7 +127,7 @@ public function test_getVarType(): void
127127    }
128128    public  function  test_getParamType (): void 
129129    {
130-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
130+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
131131        $ filename  = sprintf ('%s/php8/product/Product.php ' , $ this  ->fixtureDir );
132132        try  {
133133            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
@@ -144,7 +144,7 @@ public function test_getParamType(): void
144144    }
145145    public  function  test_getReturnType (): void 
146146    {
147-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
147+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
148148        $ filename  = sprintf ('%s/php8/product/Product.php ' , $ this  ->fixtureDir );
149149        try  {
150150            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
@@ -162,7 +162,7 @@ public function test_getReturnType(): void
162162    }
163163    public  function  test_getVarType_array_expression (): void 
164164    {
165-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
165+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
166166        $ filename  = sprintf ('%s/array-expression-in-doc/product/Product.php ' , $ this  ->fixtureDir );
167167        try  {
168168            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
@@ -180,7 +180,7 @@ public function test_getVarType_array_expression(): void
180180    }
181181    public  function  test_getReturnType_array_expression (): void 
182182    {
183-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
183+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
184184        $ filename  = sprintf ('%s/array-expression-in-doc/product/Product.php ' , $ this  ->fixtureDir );
185185        try  {
186186            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
@@ -198,7 +198,7 @@ public function test_getReturnType_array_expression(): void
198198    }
199199    public  function  test_getClassComment (): void 
200200    {
201-         $ parser  = (new  ParserFactory )->create (ParserFactory:: PREFER_PHP7 );
201+         $ parser  = (new  ParserFactory )->createForNewestSupportedVersion ( );
202202        $ filename  = sprintf ('%s/php8/product/Product.php ' , $ this  ->fixtureDir );
203203        try  {
204204            $ ast  = $ parser ->parse (file_get_contents ($ filename ));
0 commit comments