Este tutorial utiliza PHPUnit 9, pero funciona perfectamente con PHPUnit 10.
// composer.json
{
"require": {
"php": ">=8.1.0",
"ext-ctype": "*",
"ext-iconv": "*",
"doctrine/doctrine-bundle": "^2.8", // 2.10.2
"doctrine/doctrine-migrations-bundle": "^3.2", // 3.2.4
"doctrine/orm": "^2.14", // 2.16.2
"symfony/asset": "6.3.*", // v6.3.0
"symfony/console": "6.3.*", // v6.3.4
"symfony/dotenv": "6.3.*", // v6.3.0
"symfony/flex": "^2", // v2.3.3
"symfony/framework-bundle": "6.3.*", // v6.3.5
"symfony/http-client": "6.3.*", // v6.3.5
"symfony/mailer": "6.3.*", // v6.3.5
"symfony/messenger": "6.3.*", // v6.3.5
"symfony/monolog-bundle": "^3.0", // v3.8.0
"symfony/runtime": "6.3.*", // v6.3.2
"symfony/security-csrf": "6.3.*", // v6.3.2
"symfony/twig-bundle": "6.3.*", // v6.3.0
"symfony/yaml": "6.3.*" // v6.3.3
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4", // 3.4.4
"phpunit/phpunit": "^9.5", // 9.6.13
"symfony/browser-kit": "6.3.*", // v6.3.2
"symfony/css-selector": "6.3.*", // v6.3.2
"symfony/debug-bundle": "6.3.*", // v6.3.2
"symfony/maker-bundle": "^1.48", // v1.51.1
"symfony/phpunit-bridge": "^6.2", // v6.3.2
"symfony/stopwatch": "6.3.*", // v6.3.0
"symfony/web-profiler-bundle": "6.3.*", // v6.3.2
"zenstruck/foundry": "^1.35", // v1.35.0
"zenstruck/mailer-test": "^1.3", // v1.3.0
"zenstruck/messenger-test": "^1.7" // v1.7.3
}
}
6 Comments
Hi,
I've got this strange error after setting up the environment. Docker is up, server is up, but when I go to 127.0.0.1:800, got this strange message:
"# unable to fetch the response from the backend: unexpected EOF"
From the server's logs, I can see these two errors:
SERVER issue with server callback error="unable to fetch the response from the backend: unexpected EOF"
SERVER GET (502) / ip="127.0.0.1"
I'm on mac running php 8.2 locally.
Any clue how I can solve this?
thanks
Hey @Felipe-L
That's a bit odd. How are you starting the web server? Try re-installing your vendors directory and upgrade Symfony CLI to the latest version
If you try with
localhost:800does it work?Cheers!
Brilliant, it worked.
I guess I had an outdated version of the Symfony Cli, I had 5.5.8 and I upgraded to 5.7.8.
Started the server as said on the Readme file and it's everything up and running now.
thanks
Cool! Happy to help!
Hello. Maybe you can explain how to mock "cache" with different pools in functional tests?
Hey @Vaceslav-L
An easy way to mock the cache service is to create a mock from the cache interface
CacheItemPoolInterface(I believe that's the one), and then you can add a few assertions on the methods you expect to be called. The only downside is that you may need to mock the return value of thegetItem()method.Cheers!
"Houston: no signs of life"
Start the conversation!