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

Type error on executing functional tests for typo3DatabasePort, must be integer #631

Open
kanow opened this issue Oct 14, 2024 · 1 comment

Comments

@kanow
Copy link

kanow commented Oct 14, 2024

What are you trying to achieve?

Execute functional tests.

What do you get instead?

Error:

TypeError: mysqli::real_connect(): Argument #5 ($port) must be of type ?int, string given

How to reproduce the issue?

Not sure about a specific environment settings to reproduce that error. We ware executing functional tests in our local dev environment. Tests are excuted in docker container with:

vendor/bin/phpunit -c vendor/undkonsorten/our-package-folder/Tests/FunctionalTests.xml

We are settings typo3DatabasePort=3306 as environment variable in our test container.

Additional information you would like to provide?

If I cast $databasePort to int in line 476 of project/vendor/typo3/testing-framework/Classes/Core/Testbase.php then the error is gone.

Specify some data of the environment

  • TYPO3 testing framework version: 8.2.3
  • TYPO3 version: 13.3-dev-main
  • TYPO3 installation type: composer
  • PHP version: 8.2
  • Web server used + version: apache
@sbuerk
Copy link
Collaborator

sbuerk commented Oct 14, 2024

Thanks for the report. Can you plese provide more insights like a stack trace leading to this ? TYPO3 Connection Pool converts the port to an integer. Stacktrace would help to identify things.

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

2 participants