Updated require version and my earlier errors dissolved

As stated, the tutorial was written for 2.4.x, but the composer.json settings proffered would install 2.3.4, which has a different enough API that basic parts of the tutorial code would fail.