Chapters
29 Chapters
|
2:54:09
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!Compatible PHP versions: ^7.0, <7.4
Subscribe to download the code!Compatible PHP versions: ^7.0, <7.4
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Subtitles
Subscribe to download the subtitles!
Subscribe to download the subtitles!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
24.
DomCrawler: Epic Beast of the Night
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
While the fundamentals of PHPUnit haven't changed, this tutorial *is* built on an older version of Symfony and PHPUnit.
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": "^7.0, <7.4",
"composer/package-versions-deprecated": "^1.11", // 1.11.99
"doctrine/doctrine-bundle": "^1.6", // 1.10.3
"doctrine/orm": "^2.5", // v2.7.2
"incenteev/composer-parameter-handler": "^2.0", // v2.1.2
"sensio/distribution-bundle": "^5.0.19", // v5.0.21
"sensio/framework-extra-bundle": "^3.0.2", // v3.0.28
"symfony/monolog-bundle": "^3.1.0", // v3.1.2
"symfony/polyfill-apcu": "^1.0", // v1.6.0
"symfony/swiftmailer-bundle": "^2.3.10", // v2.6.7
"symfony/symfony": "3.3.*", // v3.3.13
"twig/twig": "^1.0||^2.0" // v2.4.4
},
"require-dev": {
"doctrine/data-fixtures": "^1.3", // 1.3.3
"doctrine/doctrine-fixtures-bundle": "^2.3", // v2.4.1
"liip/functional-test-bundle": "^1.8", // 1.8.0
"phpunit/phpunit": "^6.3", // 6.5.2
"sensio/generator-bundle": "^3.0", // v3.1.6
"symfony/phpunit-bridge": "^3.0" // v3.4.30
}
}
11 Comments
I have problem with running server after updating composer.json according to "Versions" tab and running "composer update". I get: [Symfony\Component\Console\Exception\LogicException]
An option named "connection" already exists.
What can I do? I didn't find much in Google.
Hey Angelika,
Difficult to say, I haven't seen a similar error before. It sounds like some possible incompatibility in newest versions you upgraded. Did you download the course code and started from the start/ directory? Or do you follow this course on your personal project or from scratch?
How exactly did you upgrade your dependencies? Did you change anything in composer.json or just ran "composer update" command? If you changed "composer.json", what exactly did you change? Could you try to upgrade the dependencies one more time? Probably it's a known bug that was already fixed.
Also, looks closer to the error stack, it can give you some hints about the error. If you still have this error - please, share the full error stack so we have more information about this error.
I hope this helps!
Cheers!
I don't know how to debug this command (to get the full stack of the error), I copied all I got. I get this error when running php bin/console server:run or any command with bin/console in my console. I started with the start directory and edited it according to the course, it used to work for some time, I had the invitation page, then I had some conflicts between dependencies, so I copied dependencies from the "versions" tab and run composer update. I am not sure what changed in the file, I guess many things (versions). I tried rerunning composer.json, it doesn't help. I get the same error on ScriptHandler::clearCache (this time two times). I will try with the start composer.json and all the installation commands.
Hey Angelika,
This sounds like you have some version conflicts in your project, probably you solved the conflicts between dependencies not perfectly. I'd recommend you to replace your composer.json and composer.lock files with the ones from the start/ directory of the course downloads. Then, run "composer install" to install all the dependencies, and then run "composer require" to install any dependencies you're missing on the current step. This should help
Cheers!
Thanks. That helped.
Hey Angelika,
Great, thank you for letting us know that it helped!
Cheers!
I still have this error with the start composer.json.
it is interesting that you are repeating this "think before you test if you actually need it". I have never seen such testing tutorials which would tell this :) but that is good probably that you do it, because those other tutorials which do not say this, made us less productuve programmers :( and productivity is super good skill and often valued more than quality by those who pay money. And without this it feels like the more you learn, the less valued you get which is annoying really.
Hey Lijana Z.!
I'm really glad you have this perspective! Testing is just a tool - it's a *cool* tool, but it's not everything, and (like anything) can be used too much! Everyone will find their own balance and I want people to realize this - to realize that there *is* a way to do "too much testing" and to, hopefully, think critically like obviously have done :).
Cheers!
there is no commenting box for this https://knpuniversity.com/s... video.
Hey Coder,
Hm, try to open this page again: https://knpuniversity.com/s... and click on "Conversation" tab - it should be there :)
Cheers!
"Houston: no signs of life"
Start the conversation!