ssh icon indicating copy to clipboard operation
ssh copied to clipboard

Add support for PHP 8.4

Open lyrixx opened this issue 1 year ago • 0 comments

I cannot update the CI, since the tooling this project uses does not support PHP 8.4.

I patched my vendor to be able to run the tests.

I was able to run the tests, but there is one failing test. It's not related!

L  Tests\SshTest                                                                                                                                                                      
  ✓ it can run a single command                                                                                                                                                             
  ✓ it can run multiple commands                                                                                                                                                            
  ✓ it can use a specific private key                                                                                                                                                       
  ✓ it can set the port via the constructor                                                                                                                                                 
  ✓ it can set the port via the dedicated function                                                                                                                                          
  ✓ it can set the multiplex path via the dedicated function                                                                                                                                
  ✓ it can instantiate via the create method                                                                                                                                                
  ✓ it can enable strict host checking                                                                                                                                                      
  ✓ it can enable quiet mode                                                                                                                                                                
  ✓ it can disable password authentication                                                                                                                                                  
  ✓ it it can enable password authentication                                                                                                                                                
  ✓ zero is a valid port number                                                                                                                                                             
  ✓ it throws an exception if a port is negative                                                                                                                                            
  ✓ it can download a file                                                                                                                                                                  
  ✓ it can upload a file                                                                                                                                                                    
  ⨯ it can run a command locally                                                                                                                                                            
  ✓ it can configure the used process                                                                                                                                                       
  ✓ it can handle ipv4 addresses on execute                                                                                                                                                 
  ✓ it can handle ipv4 addresses on upload                                                                                                                                                  
  ✓ it can handle ipv6 addresses on execute                                                                                                                                                 
  ✓ it can handle ipv6 addresses on upload                                                                                                                                                  
  ✓ it can remove bash command                                                                                                                                                              
  ✓ it does not alter ssh command when setting timeout                                                                                                                                      
  ✓ it does not alter scp command when setting timeout                                                                                                                                      
  ✓ it can login without user                                                                                                                                                               
                                                                                                                                                                                            
  ---                                                                                                                                                                                       
                                                                                                                                                                                            
  • Tests\SshTest > it can run a command locally                                                                                                                                            
  Failed asserting that two strings are equal.                                                                                                                                              
                                                                                                                                                                                            
  at tests/SshTest.php:104                                                                                                                                                                  
    100▕ it('can run a command locally', function () {                                                                                                                                      
    101▕     $local = new Ssh('user', '127.0.0.1');                                                                                                                                         
    102▕     $command = $local->execute('whoami');                                                                                                                                          
    103▕                                                                                                                                                                                    
  ➜ 104▕     expect(get_current_user())->toEqual(trim($command->getOutput()));                                                                                                              
    105▕ });                                                                                                                                                                                
    106▕                                                                                                                                                                                    
    107▕ it('can configure the used process', function () {                                                                                                                                 
    108▕     $command = $this->ssh->configureProcess(function (Process $process) {                                                                                                          
                                                                                                                                                                                            
  --- Expected                                                                                                                                                                              
  +++ Actual                                                                                                                                                                                
  @@ @@                                                                                                                                                                                     
  -'root'                                                                                                                                                                                   
  +''                                                                                                                                                                                       
                                                                                                                                                                                            
  Tests:  1 failed, 24 passed                                                                                                                                                               
  Time:   0.03s                                                                                                                                                                             

lyrixx avatar Oct 21 '24 11:10 lyrixx