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
Any roadmap or planning for PHP 8 support ? #95
Comments
I should add that I'm very interested in having it, since I'm going to use it from approximately now for client projects. |
It was planned during holiday, but second covid wave happen... I'll grab some time during Christmas and prepare a least basic PHP8 support (syntax checker). I'll also need this version soon ;) |
@zulus I have a question about contributing, are you modifying the CUP parser files manually for upgrading the parser ? And also, are you are parsing types using the I stopped at this point on sunday night, I read thousands of lines of code in PDT, I'm interesting in helping is that's possible, I'll probably ask many questions thought. |
If you modify CUP file, eclipse regenerate parser during build. You can even find eclipse plugin with basic colouring/validation. As far as I remember PHP8 require from us a lot of AST and model changes, or multiple string reparsing during code analysis (performance degradation). Due this, in last year I started working on completely fresh model based on eclipse handly, without DLTK garbage. But due world madness I haven't time to finish this. For example DLTK model require return type as simple string. So, to support union during inference, validation, code assist etc..., split string has to be done in many different places. |
Ouch.
That's what I thought when I saw your current parser, I guess union types is the most invasive change, you'll need to adapt your AST too, if not for performance, at least it must be done for maintainability. |
We also have two ASTs:
Most of things we can adopt here, main problem is DLTK. Lot of thing have to be override and/or re-parsed later. This madness has to be stopped, this is why I started playing with handly. |
In an ideal world, PHP core would ship with a language server using its own parser, but we can only dream of it :) Just out of curiosity, did you consider switching over a LSP based editor ? There's a few PHP LSP implementations existing, some editors use those, but I have no idea how advanced they are. |
In general, what I want/plan:
PDT have one leg in WTP (old times), second in DLTK. ~20-30% of coding now is workaround between two worlds I didn't plan to use existing LSP, because protocol in general wasn't designed to create extensions, (for example introduce code assist for |
OK, it seems a very nice plan, not so sure I can help in anything in those conditions I don't know the Eclipse platform and tooling enough for anything here... But, once the huge refactor is done, I'll probably be able to fix some bugs here and there :) |
In many cases it's rewrite ;) |
Hey that said, I'm OK for being a beta tester of yours, if you wish, I'm very eager to test and help, and report bugs, that's what I do best 🌝 I really did write some Eclipse plugins, 14 years ago (fun story, some eclipse modeling maintainers were my teachers and mentors during my school time 14 years ago), and I guess I could after some time put my hands back in this, I'll need some time, but beta testing and debugging on unstable code would be a very good mine field to practice, I'd be glad to do that, and I'll be nice with you, I know that refactoring legacy tools is not an easy task, did that myself a lot of times in my day job. |
Is this still alive ? |
yip @zulus - I'm with @pounard - is there any activity here or has the project stalled? If so, is there any way I can help move it forward as it is such a great tool and PHP 8 brings such long awaited functionality to the table (eg. named parameters) which I for one would love to be able to take advantage of! I'm a PHP developer so not sure if useful but happy to help any way I can. |
I'm also in. |
Have just received PHP Development Tools (PDT) 8.0.0.202007171531 org.eclipse.php.feature.group Eclipse PDT How epic is that!! thank you! (now if I can just manage to work out how to get my project language library from PHP 7.4 to PHP 8.0) |
@rickyrocker I'm using 8.x also, but there is no PHP 8 support. |
@zulus - i really don't want to hassle but it would be incredibly good if you could provide at least some form of status here. This project is I'm sure of value to a great many PHP developers and it really doesn't seem right just to leave everyone hanging regarding the way forward. Really looking forward to hearing from you! thanks in advance |
PHP 8 support please.... Its a shame why there are no clear info on this. |
OK, I finally grab some time... |
@zulus excellent- I'm very very happy to help if I can, but would appreciate some guidance as to how best to go about getting involved |
@zulus, I'll also try to grab some time the second semester, we could start by adding support for PHP 8.0 in our parsers&lexers ;) |
Actually all features of PHP 8 are game changing, I can't wait having a proper support of union types, match expression and attributes. We are starting migrating some of client projects to PHP 8, and frameworks are starting using those abundantly. Attributes mostly, as being a framework user, attributes are very import to have. |
On my side, I can have a deeper look only end of June. But without any answer of @zulus I won't be able to be a big help ;) |
@tbl0605 I understand that, being a contributor to open source is hard. But the question we all have on our list is do you have a clear roadmap if not a deadline for this ? |
Because Eclipse PDT is a IDE, not a compiler or VM ? If developer can run 7.x source code (maximum used 7.x syntax/functions) on PHP 8.1 environment, but he/she can't maintenace source code by some PHP IDE. Or, some PHP IDE will break if a project included some 7.x packages from composer. Is not it sound strange ? |
Maybe.
But there is PHP 8 in production for 2 years for testers more.
8.0 is now in security fixes only and reaching EOL.
8.2 is now current PHP version.
And backward compatibility is something which is a "brake" to implement PHP
8.x into PDT.
So my practice is. If some library is not working in requested PHP version,
I will make own fork and fix it.
Maybe this will speed up that update process, which I remember from 5.6 to
7.x :)
…On Fri, Dec 16, 2022 at 9:05 AM Dragon ***@***.***> wrote:
Because Eclipse PDT is a IDE, not a compiler or VM ?
If developer can run 7.x source code (maximum used 7.x syntax/functions)
on PHP 8.1 environment, but he/she can't maintenace source code by some PHP
IDE.
Or, some PHP IDE will break if a project included some 7.x packages from
composer.
Is not it sound strange ?
—
Reply to this email directly, view it on GitHub
<#95 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOSNOGYINK6GLFTBURNP3TWNQPDTANCNFSM4UNVIQWQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Maybe Language Server Protocol is a optional solution ? (not sure, I am not familiar with PDT source code.) |
Hi,
If source code can run without issues in both 7.x and 8.1 environments, how could it not be compatible to a PHP 8.1 parser in PDT?
I don't understand. You would not set up your project's vendor packages to be interpreted/parsed as your project source code, so why would they break a PHP 8+ parser in PDT? I would add my vote for dropping parsers for officially unsupported PHP versions. It's still possible to revert to older PDT versions if you need to maintain code that is not compatible with PHP 8+. |
I may have misunderstood some things. (I thought single parser support base syntax (7.0) + 7.1 syntax (incremental) + 7.2 syntax (incremental) + ...) |
Happy holidays everyone 🎄🎄🎄 Hope we'll see PDT in 2023 with PHP 8 on board 🙏🙏🙏 |
I will need some help in upcoming months in testing if anyone is still interested |
sure don't hesitate to reach me if needed. Not sure how much time I can allow you but I'll do my best ! |
what should we do? |
I am interested as well, I'm not afraid using Eclipse in a broken state (git will always save my life anyway) ! |
For now I upgraded my machine, and updated everything to make sure PDT is working correctly with recent Eclipse (2022-12) and all tests passes. Next step is to finalize my experiments (from time before my ADHD + own company freezes me completely) and push to repository one by one. After that I'll ask You to test ;) |
If there's anything releng-related for which you need help, please reach out to be personally. |
Cool! Thanks @zulus ! |
Looking forward release 🚀 I also can participate in testing release |
Count me in, I'll be happy to test. |
Thanks! I would be glad to help testing as well :) |
Happy to help. |
I recently uploaded nearly final version of PHP 8.0 compiler parser, so basic syntax validation should be fine now. Semantic highlighting and code formatting not working correctly Supported 8.0 syntax:
Some smaller PHP8.0 syntax changes have to be still implemented/verified on compiler parser first before I move code to DOM parser:
|
Bravo.
Dňa po 17. 4. 2023, 21:24 Dawid Pakuła ***@***.***>
napísal(a):
… I recently uploaded nearly final version of PHP 8.0 compiler parser, so
basic syntax validation should be fine now. Semantic highlighting and code
formatting not working correctly
Supported 8.0 syntax:
1. UnionTypes
2. Match expression
3. Named parameters
4. Attributes
5. Nullsafe operator
6. Static return type
7. Constructor property promotion
Some smaller PHP8.0 syntax changes have to be still implemented/verified
on compiler parser first before I move code to DOM parser:
1. Throw expressions
2. Non capturing catches
3. Variable syntax consistency
4. Namespaced names consistency
—
Reply to this email directly, view it on GitHub
<#95 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOSNOF3SJ2RHWPP74MENBLXBWKGNANCNFSM4UNVIQWQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@zulus Can we get it using something like a nightly update site or such ? |
Yeah, builds are done via: https://ci.eclipse.org/pdt/view/PDT/job/pdt-master/ And available under: https://download.eclipse.org/tools/pdt/updates/latest-nightly/ Recent updates in compiler parser:
One last thing on compiler parser level: Namespace names consistency. This is will by tricky, to keep backward compatibility with old tests |
Hi,
|
For now im working on parsers, first for 8.0 (enum is from 8.1) ;) : https://www.php.net/releases/8.0/en.php Validation will be, once I finish all parsers (8.0, 8.1, 8.2) |
Great!! |
@zulus Excellent job! Made some few tests and 8.0 works nice. |
Thank's @zulus |
I made basic infa for all recent PHP versions: fef3299 Once I finish DOM parser for PHP8.0 I'll incrementally continue on 8.1 |
I made umbrella tasks for each PHP version for easier tracking I've done PHP8.0 compiler parser : 3de174d Once I finish DOM AST nodes (they are much more complicated than compiler by design), I'll prepare DOM AST parser I'm closing this task for now |
Hello,
Is there any plans/planned date for supporting PHP 8 ?
Best regards, and thank you for all the hard work.
The text was updated successfully, but these errors were encountered: