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

Add support for PHP 8.4 #106

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Add support for PHP 8.4 #106

merged 1 commit into from
Nov 6, 2024

Conversation

lyrixx
Copy link
Contributor

@lyrixx lyrixx commented Oct 21, 2024

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
Copy link
Contributor Author

lyrixx commented Oct 28, 2024

Hello @freekmurze ; This PR is quite small, and we need it to unlock some projects on PHP 8.4. Could you have a look ? And a release would be quite useful 💛 Thanks

@Nielsvanpach
Copy link
Member

Sorry for the wait. Thanks!

@Nielsvanpach Nielsvanpach merged commit 49bc291 into spatie:main Nov 6, 2024
8 checks passed
@lyrixx lyrixx deleted the php8-4 branch November 7, 2024 09:52
@lyrixx
Copy link
Contributor Author

lyrixx commented Nov 7, 2024

Could you make a release? Thanks

@Nielsvanpach
Copy link
Member

Done!

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

Successfully merging this pull request may close these issues.

2 participants