eclipse-pdt / pdt

PHP Development Tools project (PDT)
https://eclipse.org/pdt
Eclipse Public License 2.0
189 stars 46 forks source link

Any roadmap or planning for PHP 8 support ? #95

Closed pounard closed 1 year ago

pounard commented 3 years ago

Hello,

Is there any plans/planned date for supporting PHP 8 ?

Best regards, and thank you for all the hard work.

pounard commented 3 years ago

I should add that I'm very interested in having it, since I'm going to use it from approximately now for client projects.

zulus commented 3 years ago

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 ;)

pounard commented 3 years ago

@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 Identifier class, but with union type, you'll need to a case in the type:: grammar, case in which you'll need to parse an IdentifierList or some sort, I started reading the code, they are thousands of references of the Identifier class, seems hard to grasp where you use it for types and where you use it for other expressions, are you planning on specializing a bit more parsed tokens in the AST ?

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.

zulus commented 3 years ago

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.

pounard commented 3 years ago

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.

As far as I remember PHP8 require from us a lot of AST and model changes

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.

zulus commented 3 years ago

We also have two ASTs:

  1. Advance, as legacy form JDT, with basic binding, cache etc. Used by semantic colouring (like deprecated) and by some content assist features (like ctrl/cmd+2 L)
  2. Compiler, based od DLTK required for inferencing, validation, navigation etc...

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.

pounard commented 3 years ago

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.

zulus commented 3 years ago

In general, what I want/plan:

  1. Drop DLTK - copy/migrate lucene search and code inference
  2. Drop WTP - use WildWebDeveloper only
  3. Use GenericEditor (LSP ready)
  4. Merge Doctrine/Twig/Symfony plugins into core as example howto extend PDT
  5. In future deliver LSP server based on PDT, similar as JDT doing

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 $em->getRepository()

pounard commented 3 years ago

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 :)

zulus commented 3 years ago

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 ;)

pounard commented 3 years ago

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 :full_moon_with_face:

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.

pounard commented 3 years ago

Is this still alive ?

ghost commented 3 years ago

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.

stanolacko commented 3 years ago

I'm also in.

ghost commented 3 years ago

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)

pounard commented 3 years ago

@rickyrocker I'm using 8.x also, but there is no PHP 8 support.

ghost commented 3 years ago

eish - thanks @pounard

@zulus is there any way I can help move this forward? having named parameters is literally game changing for me.

ghost commented 3 years ago

@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

blackjyn commented 3 years ago

PHP 8 support please.... Its a shame why there are no clear info on this. at least , show the roadmap and give some words y committee!

zulus commented 3 years ago

OK, I finally grab some time...

ghost commented 3 years ago

@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

tbl0605 commented 3 years ago

OK, I finally grab some time...

@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 ;) Since I'm not using PHP 8.0 (yet), it would be nice to list all new language features that should go in our parsers&lexers (and code formater), so at least users could use PHP 8.0 syntax. What do you think? Maybe in some separate issue(s)?

ghost commented 3 years ago

@zulus @tbl0605 any updates - named parameter code completion remains game changing for us!

pounard commented 3 years ago

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.

tbl0605 commented 3 years ago

@zulus @tbl0605 any updates - named parameter code completion remains game changing for us!

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 ;) Anyway we're only 2 developers left on PDT for now, so we wll sadly be less responsive than one or two years ago.

pounard commented 3 years ago

@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 ?

ghost commented 3 years ago

@tbl0605 @zulus we are also willing to look at helping fund development but I can't see any way to achieve this

tbl0605 commented 3 years ago

@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 ?

Not yet for PHP 8.0, we already have done feature roadmaps for previous versions of PHP, so it should not be a big deal. Our "time deadline" was (until recently) based on Eclipse's release cycles (every 3 months at best or 6 months at worst). Maybe full support for PHP 8.0 will be made accross multiple versions of eclipse. Again, it's only a supposition, I really don't know what Dawid is planning (or has already done) ;)

tbl0605 commented 3 years ago

@tbl0605 @zulus we are also willing to look at helping fund development but I can't see any way to achieve this

Thank you, that's great to know! :) Personaly I never worked on open source projects using helping funds, so I'm pretty new in this area. I know it can be done through github sponsoring. For sure we should do that for PDT, it would maybe attract new developers, or maybe help Dawid on its PDT work.

zulus commented 3 years ago

Unfortunately Handly based model is still in experiment phase :/

I'll introduce PHP 8 parser for current model in next week

o-alquimista commented 3 years ago

Did any of the PHP 8 features ship with the version 2021-06 that was released this month? My distro (Fedora) is still on 2021-03, so I need to decide whether to ditch this and get the latest.

Named parameters, maybe? This one would be really nice, because currently the IDE thinks it's an error in the code.

pounard commented 3 years ago

@o-alquimista I just upgraded, still no PHP 8 support.

pounard commented 3 years ago

Hello, believe me, I really don't want to be rude or anything and I do highly respect the work you do, but is PHP 8 support going to land soon, or one day, is there at least an approximate timeline for this ?

ghost commented 3 years ago

Message to the project team.

I understand completely that development when no being paid is not a cake walk and I certainly give thanks for the effort so far, however the reality is this:

  1. It would be simple to keep end-users realistically updated as to intention: Your communication completely sucks.
  2. Point 1 has a very real cost to businesses depending on the IDE: it removes the ability to determine a strategy and reduces the ability to take advantage of new language features, resulting in longer times to create suboptimal code.

So, please do the right thing and make a clear statement regarding what the intention is to support PHP 8, and in what timeframe.

ghost commented 3 years ago

From the complete lack of response after nearly a month, I can only assume this project has gone the way of the dodo and we will need to migrate to visual studio code.

rimace commented 3 years ago

@zulus maybe a crowd-founding campaign could help? I mean I am willing to pay for PHP 8 support and I thing at least a few would spend a few bucks on that feature. Just an idea if someone steps up and would like to do it for some pocket money.

ghost commented 3 years ago

A few bugs aside PDT is such a great PHP IDE and it is a tragedy that there is no apparent intention to support PHP 8.

VS Code does, but as far as I'm concerned it isn't a patch on the Eclipse IDE and we are really loathe to move. We're not a huge company but we would happily contribute an amount each month to keep developers on this project if we had some understanding that there was commitment.

I simply can't believe there aren't more people upset about this. And I simply can't believe that funding is not possible to get for the developers.

We just need to know how.

zulus commented 3 years ago

I’m sorry. I finished worst and longest crunch ever. I’ll refresh tasks soon :/

ghost commented 3 years ago

I’m sorry. I finished worst and longest crunch ever. I’ll refresh tasks soon :/

@zulus - can we not help fund in some way? I would need to confirm this internally but we have 5 developers currently using the project, and I'm fine to pay an annual amount for each developer that would roughly equate with what paid tools such as say PHPstorm charges (I would like 50% of our funding to go directly to this project) - this could be win:win as the problem for us with the free model is that the project is always "second" as long as developers are unpaid

pounard commented 3 years ago

@zulus you've been the missing person that made me the most anxious of the year :) Just kidding, I'm really pleased to see you back. If we can help in any way, please just ask !

ghost commented 2 years ago

@zulus - is there anything happening here?

pounard commented 2 years ago

I'm sorry if I'm annoying, but is it planned sometime soon ? Now we have PHP 8.1 released, I'm so excited being able to use those features without breaking my editor someday ^^

zulus commented 2 years ago

For now I fixed compatibility issue between PDT and upcoming Eclipse 2021-12. Together with 2021-12, PDT 7.2.1 will be released (couple fixes).

After that I'll continue my work on 8.0/8.1. Have to be done for 2022-03

blackjyn commented 2 years ago

thank you @zulus for the confirmation! Best luck!

ghost commented 2 years ago

Hope this is still on track @zulus - I'm so looking forward to named parameters!

zulus commented 2 years ago

Yeah, work in progress ;)

pounard commented 2 years ago

@rickyrocker union types, mixed, match expression, attributes and null coalesce operator :D !!!

pounard commented 2 years ago

And now that 8.1 us here, readonly properties !

ghost commented 2 years ago

March 16, 2022 !!

mlocati commented 2 years ago

March 16, 2022 !!

What's this date?