11.
The Great Hateoas PHP Library
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.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
7 Comments
Is there a similar bundle for Symfony 3?
Yo Chris!
The bundle should work just fine with Symfony 3 as well :). Their composer.json supports Symfony 2 and 3: https://github.com/willdura...
If you're having any issues, let us know!
Cheers!
in composer I have:
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"jms/serializer-bundle": "^1.1.0",
"white-october/pagerfanta-bundle": "^1.0",
"lexik/jwt-authentication-bundle": "^1.4",
"willdurand/hateoas": "^2.11"
},
In AppKernel.php:
$bundles = array(
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle()
)
Even I put in composer.json:
"autoload": {
"psr-4": {
"": "src/",
"App\\Behat\\": "features/",
"Bazinga\\Bundle\\HateoasBundle\\": ""
},
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
The net result when I run testPostCreateBattle test is:
PHP Fatal error: Uncaught Error: Class 'Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle' not found in restSymfony/app/AppKernel.php:22
Hey Diaconescu!
Hmmm. I see willdurand/hateoas in your composer.json, but you actually need
willdurand/hateoas-bundle. Maybe that was just a little typo? Try runningcomposer require willdurand/hateoas-bundle. I think (hope) it will fix the issue!Cheers!
Unfortunately Is not a typo. In the link you provided as response for months ago(https://github.com/willdura... is the same string in require section for hateoas. And doesn't work.
Hey Diaconescu!
Hmm. But in the tutorial, we say to install the bundle: https://knpuniversity.com/screencast/symfony-rest5/hateoas-php-library#installing-bazingahateoasbundle
Is there somewhere else that we recommend installing the library, instead of the bundle? I think there could be a bug somewhere, but I don't see it yet :).
Cheers!
Scuse me. I was stupid. It was a typo.
"Houston: no signs of life"
Start the conversation!