-
Notifications
You must be signed in to change notification settings - Fork 347
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
[develop] Serializers #47
[develop] Serializers #47
Conversation
Okay fixed rogue commits. You may want to look over it again and make sure everything is where it should be (gotta love Git sometimes). 😁 |
@@ -102,7 +102,8 @@ public function testProcessEmbeddedResourcesInvalidAvailableEmbed() | |||
$manager = new Manager; | |||
$manager->parseIncludes('book'); | |||
|
|||
$scope = new Scope($manager, m::mock('League\Fractal\Resource\ResourceInterface')); | |||
$scope = new Scope($manager, m::mock('League\Fractal\Resource\ResourceAbstract')); | |||
$transformer->setManager($manager); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fail. If it doesnt then its a merge problem. Transformers no longer have direct access to the manager, as they do that via the "setCurrentScope()" method, which then has access to the manager. Scopes have manager passed in their constructor, so this seemed like a reasonably useful way to cut down dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good pick up, flying under the radar since it's throwing a BadMethodCallException
as well. Bloody thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks perfect so far. I’m gonna play locally with some sample code instead of just relying on unit tests.
TDD is great and all BUT ITS SCARY AND I DONT TRUST IT.
--
Phil Sturgeon
On May 11, 2014 at 11:55:27 AM, Jason Lewis (notifications@github.com) wrote:
In tests/TransformerAbstractTest.php:
@@ -102,7 +102,8 @@ public function testProcessEmbeddedResourcesInvalidAvailableEmbed()
$manager = new Manager;
$manager->parseIncludes('book');
$scope = new Scope($manager, m::mock('League\Fractal\Resource\ResourceInterface'));
$scope = new Scope($manager, m::mock('League\Fractal\Resource\ResourceAbstract'));
Good pick up, flying under the radar since it's throwing a BadMethodCallException as well. Bloody thing.$transformer->setManager($manager);
—
Reply to this email directly or view it on GitHub.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
Okay all fixed, hopefully. Regarding you outdated diff comment: no worries. I think I'll add a basic HAL serializer soon and push that up. Also there's no meta yet even though the |
This is now merged to develop, but does have an outstanding issue relating to allow Serializers to sideload or embed their relationships. Add that as a new PR and we'll be good to go. |
Same as #45 except now targeting the
develop
branch.Got some rogue commits. Not sure why. 😦