Skip to content
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

No PHP 8 Support #187

Open
leandroembu opened this issue Jul 6, 2021 · 6 comments
Open

No PHP 8 Support #187

leandroembu opened this issue Jul 6, 2021 · 6 comments

Comments

@leandroembu
Copy link

leandroembu commented Jul 6, 2021

Hi. I'm tryin to use phpcd with PHP 8, but these errors occured:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires lvht/msgpack-rpc ^0.2.1 -> satisfiable by lvht/msgpack-rpc[v0.2.1].
    - lvht/msgpack-rpc v0.2.1 requires php ^5.3||^7.0 -> your php version (8.0.8) does not satisfy that requirement.
  Problem 2
    - roave/better-reflection[3.0.0, ..., 3.1.1] require php >=7.1.0,<7.3.0 -> your php version (8.0.8) does not satisfy that requirement.
    - roave/better-reflection[3.2.0, ..., 3.3.0] require php >=7.1.0,<7.4.0 -> your php version (8.0.8) does not satisfy that requirement.
    - roave/better-reflection 3.4.0 requires php >=7.2.0,<7.4.0 -> your php version (8.0.8) does not satisfy that requirement.
    - roave/better-reflection 3.5.0 requires php >=7.2.0,<7.5.0 -> your php version (8.0.8) does not satisfy that requirement.
    - Root composer.json requires roave/better-reflection ^3.0 -> satisfiable by roave/better-reflection[3.0.0, ..., 3.5.0].

I'm using PHP 7.4 until I can solve it. Thank you very much :)

@taoso
Copy link
Owner

taoso commented Jul 6, 2021

Yes, phpcd does not support php 8 yet. It is because the dependence BetterReflection does not support php 8 now.

Please see Roave/BetterReflection#701

@hirofumi-yaoita
Copy link

Hi!
phpcd.vim is a very useful tool. I heavy use it, thank you.

BetterReflection seems to be compatible with php 8 now.
I hope phpcd.vim support php 8 too.

@taoso
Copy link
Owner

taoso commented Dec 3, 2021

Hi! phpcd.vim is a very useful tool. I heavy use it, thank you.

BetterReflection seems to be compatible with php 8 now. I hope phpcd.vim support php 8 too.

Hi @hirofumi-yaoita , I am following the recently changes of BetterReflection, and willing to make phpcd support php 8.x. However, I have switched to golang, and I do not have too much spare time to do such upgrade.

When I developed phpcd in 2014, I rewrite the core logic of phpcomplete.vim into php code as much as I can. And I wish the PHP developer who are willing to use phpcd could have the ability to understand the php code of phpcd and they can change or improve phpcd by themself.

So I wish you to make your own try to add php 8 supports for phpcd. And I will try my best to offer any help.

Thanks.

@taoso
Copy link
Owner

taoso commented Dec 3, 2021

When phpcd.vim was developed, the language server protocol is not widely used as now days. And phpcd.vim lacks many critical features offered by language server protocol, for example, find symbol references.

So what is the roadmap for phpcd?

In my opinion, phpcd has no advantage than any php language server. phpcd is just a little better than the orignal phpcomplete.vim. In the early date of phpcd, there is no need to create any index data or file. All information needed for completions or jumps are fetched by the Reflection of PHP. As a result, phpcd is very simple. And elegant as well.

However, during my daily usage, I found it is needed to jump to the implementations of certain interface. And this feature could not be implemented without index. So I added the phpid to index all php classes or interfaces. With this changes, phpcd lost its elegant.

Maybe in the future, phpcd will become a lightweight language server, without any index data. And drop the phpid feature.

@taoso
Copy link
Owner

taoso commented Dec 3, 2021

@leandroramos @hirofumi-yaoita

It seems easy to support php 8. Please test the php8 branch https://github.com/epii1/phpcd.vim/commits/php8

Thanks.

@hirofumi-yaoita
Copy link

Hi @epii1

Thank you for your reply.
You are great!

So I wish you to make your own try to add php 8 supports for phpcd.

Indeed, I also believe that this is the spirit of open source.
And in this day, I should consider using the language server protocol.

Please test the php8 branch

OMG!
I will test this branch. and I will feed back.

golang is so good language. Have a nice golang programing life.
Thank you very much.

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

3 participants