cpliakas / git-wrapper

A PHP wrapper around the Git command line utility.
MIT License
506 stars 68 forks source link

Process::run override is deprecated #147

Closed soullivaneuh closed 6 years ago

soullivaneuh commented 6 years ago

While running git commands:

User Deprecated: The "Symfony\Component\Process\Process::run()" method is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "GitWrapper\GitProcess".
TomasVotruba commented 6 years ago

Probably related to https://github.com/cpliakas/git-wrapper/pull/144

soullivaneuh commented 6 years ago

It indeed solves the issue about the deprecation message, but your code still override the run method.

When the vendor method will be really final, you will have this error:

Fatal error: Cannot override final method Symfony\Component\Process\Process::run() in /code/vendor/cpliakas/git-wrapper/src/GitProcess.php on line 10

In GitProcess.php line 10:

  [Symfony\Component\Debug\Exception\FatalErrorException]                               
  Compile Error: Cannot override final method Symfony\Component\Process\Process::run()                                                                                      

It may be better to remove inheritance?

soullivaneuh commented 6 years ago

The other solution would be to override the start method instead, which is called by run.

TomasVotruba commented 6 years ago

Could you send PR to make it work?