Skip to content

Publish a new release supporting php 8.2 syntax? #376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TysonAndre opened this issue Aug 20, 2022 · 10 comments
Closed

Publish a new release supporting php 8.2 syntax? #376

TysonAndre opened this issue Aug 20, 2022 · 10 comments

Comments

@TysonAndre
Copy link
Contributor

TysonAndre commented Aug 20, 2022

See #370 #374 #375 and #382 , in addition to changes that were already merged to support php 8.2 syntax or other improvements

@TysonAndre
Copy link
Contributor Author

@roblourens could you take a look? Also, thoughts on whether this should be 0.2.0 or 0.1.2? Applications should be largely unaffected if they parse the same valid snippets they did in the past, so 0.1.2 probably makes sense

This adds a brand new type for ParenthesizedIntersectionType which existing applications using this may not have supported, as well as some new modifiers, but those have been 0.0.x+1 releases in the past and don't seem major

(applications using this library to parse out union types shouldn't be affected as long as they don't start using dnf types)


Aside: This would be less of an issue once there was a 1.x release, where new features could be minor releases

@TysonAndre
Copy link
Contributor Author

@roblourens fyi - I think the latest main commit should be fine to release, though #382 would be nice to have

@TysonAndre
Copy link
Contributor Author

@roblourens - pinging again about publishing a release since it's easy to lose track of notifications on the weekend.

PHP 8.2.0RC2 is out https://www.php.net/ - https://wiki.php.net/todo/php82 will be out in November

@roblourens
Copy link
Member

I got to this last - everything I merged should be fine to go out in a 0.1.2 right?

@TysonAndre
Copy link
Contributor Author

Yes - everything merged is fine to go out in a 0.1.2 release

  • Tests of tolerant-php-parser pass in ci in 8.2.0beta2 and locally in a recent 8.2-dev build
  • Tests of Phan pass in 8.2/7.4 (e.g. the component that converts Microsoft\PhpParser to php-ast ast\Node with/without error tolerance) after replacing vendor/microsoft/tolerant-php-parser/src with a35ec03
  • I looked over recent changes and they all looked good

@TysonAndre
Copy link
Contributor Author

I realized one thing - the way HaltCompilerStatement is parsed could use some work for easily inferring __HALT_COMPILER_OFFSET__ and testing edge cases - #389

If a release is created before that I can just keep the property name of semicolon for ; or ?> or ?>\n

@TysonAndre
Copy link
Contributor Author

TysonAndre commented Sep 26, 2022

I realized one thing - the way HaltCompilerStatement is parsed could use some work for easily inferring __HALT_COMPILER_OFFSET__ and testing edge cases - #389

But other than #389, there were no issues with extracting the needed information from new parsed nodes (e.g. exact same computed offset for AST_HALT_COMPILER) when I started using tolerant-php-parser main to test. phan/phan#4730 has tests passing for converting them to ast\Node with the same fields

@TysonAndre
Copy link
Contributor Author

@roblourens #389 continues to be the only PR with fixes I'd want before creating a release with the other changes - could you review that?

  • If you want to keep the existing semicolon name instead then feel free to make that change

@TysonAndre
Copy link
Contributor Author

#391 should also be included to fix a regression

@roblourens
Copy link
Member

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants