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

Fix: last error from stream_socket_enable_crypto #122

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

zaerl
Copy link
Contributor

@zaerl zaerl commented Dec 18, 2024

What does this PR do?

Fix: #120

What problem does it fix?

See issue.

How to test if it works?

Working unit tests is ok for this. ./vendor/bin/phpunit

@zaerl zaerl self-assigned this Dec 18, 2024
@zaerl zaerl requested a review from adamziel December 18, 2024 13:58
@brandonpayton
Copy link
Member

This is interesting... we're getting the same unit test failures as you saw here, @zaerl. I'm also not able to reproduce those locally.

From the logs:

Run phpunit tests --testdox
  phpunit tests --testdox
  shell: /usr/bin/bash -e {0}
  env:
    LOCAL_PHP: 8.1-fpm
    PHPUNIT_CONFIG: phpunit.xml.dist
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
PHP Fatal error:  Uncaught Error: Call to undefined method PHPUnit\Util\Filesystem::classNameToFilename() in /home/runner/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:495
Stack trace:
#0 /home/runner/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php(408): PHPUnit\TextUI\Command->handlePrinter()
#1 /home/runner/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php(114): PHPUnit\TextUI\Command->handleArguments()
#2 /home/runner/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\TextUI\Command->run()
#3 /home/runner/.composer/vendor/phpunit/phpunit/phpunit(107): PHPUnit\TextUI\Command::main()
#4 /home/runner/.composer/vendor/bin/phpunit(122): include('...')
#5 {main}

@zaerl
Copy link
Contributor Author

zaerl commented Dec 23, 2024

This is interesting... we're getting the same unit test failures as you saw here, @zaerl. I'm also not able to reproduce those locally.

From the logs:

Run phpunit tests --testdox
  phpunit tests --testdox
  shell: /usr/bin/bash -e {0}
  env:
    LOCAL_PHP: 8.1-fpm
    PHPUNIT_CONFIG: phpunit.xml.dist
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
PHP Fatal error:  Uncaught Error: Call to undefined method PHPUnit\Util\Filesystem::classNameToFilename() in /home/runner/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:495
Stack trace:
#0 /home/runner/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php(408): PHPUnit\TextUI\Command->handlePrinter()
#1 /home/runner/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php(114): PHPUnit\TextUI\Command->handleArguments()
#2 /home/runner/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\TextUI\Command->run()
#3 /home/runner/.composer/vendor/phpunit/phpunit/phpunit(107): PHPUnit\TextUI\Command::main()
#4 /home/runner/.composer/vendor/bin/phpunit(122): include('...')
#5 {main}

I think is just a matter of phpunit version.

@brandonpayton
Copy link
Member

I think is just a matter of phpunit version.

@zaerl, this turned out to be a conflict between a global phpunit version and the deps composer installs under ./vendor. I created a PR to explicitly use the vendor/bin/phpunit, and those errors went away.

#123

Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks reasonable, but I don't have any experience with this code yet. Is there any place we are clearly testing or exercising the AsyncHttp Client?

tests/unit/steps/UnzipStepRunnerTest.php Outdated Show resolved Hide resolved
@zaerl
Copy link
Contributor Author

zaerl commented Dec 23, 2024

The fix looks reasonable, but I don't have any experience with this code yet. Is there any place we are clearly testing or exercising the AsyncHttp Client?

It is crashing on local with fatal errors sometimes. I don't think we need a unit test for this, just be sure we do not treat a null as an array.

@zaerl zaerl force-pushed the fix/stream-socket-last-error branch from 380f673 to 5ce86d1 Compare December 23, 2024 20:47
@zaerl zaerl requested a review from brandonpayton December 23, 2024 20:51
Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thank you!

@brandonpayton brandonpayton merged commit 05e9645 into trunk Dec 27, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Last error occurred not populated by stream_socket_enable_crypto
2 participants