Skip to content
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

Add setMeta to ResourceAbstract #176

Merged
merged 3 commits into from
Apr 28, 2015
Merged

Add setMeta to ResourceAbstract #176

merged 3 commits into from
Apr 28, 2015

Conversation

deefour
Copy link
Contributor

@deefour deefour commented Apr 28, 2015

The setMetaValue() method has a complementary getMetaValue(), but getMeta() did not have a complementary setMeta() method.

This allows a set of meta data to be applied to the resource at once, preventing the need to do something like the following in application code.

foreach ($someMetaData as $metaKey => $metaValue) {
  $theResource->setMetaValue($metaKey, $metaValue);
}

I went with overwriting existing meta instead of merging because that's what setMetaValue() is doing for individual keys.

@philsturgeon
Copy link
Member

Tests and scrutinizer are failing. Can you fix travis?

@deefour
Copy link
Contributor Author

deefour commented Apr 28, 2015

@philsturgeon I'd love to. The suite fails on hhvm with this:

Fatal error: Class already declared: PHPUnit_Framework_Error in phar://phpunit-4.6.4.phar/phpunit/Util/../Framework/Error.php on line 22

Looks like others are having a similar issue.

@philsturgeon
Copy link
Member

It’s ok I found a workaround from another league member. Travis deployed a new HHVM which falls over on phpunit, it’s a whole pile of f**ked.

Waiting on travis to confirm my workaround, then I’ll ask you to pull changes.

-- 
Phil

From: Jason Daly notifications@github.com
Reply: thephpleague/fractal reply@reply.github.com>
Date: April 28, 2015 at 1:27:07 PM
To: thephpleague/fractal fractal@noreply.github.com>
Cc: Phil Sturgeon me@philsturgeon.uk>
Subject:  Re: [fractal] Add setMeta to ResourceAbstract (#176)

@philsturgeon I'd love to. The suite fails on hhvm with this:

Fatal error: Class already declared: PHPUnit_Framework_Error in phar://phpunit-4.6.4.phar/phpunit/Util/../Framework/Error.php on line 22

Looks like others are having a similar issue.


Reply to this email directly or view it on GitHub.

@philsturgeon
Copy link
Member

Ok, pull from master and you should get a green build.

@deefour
Copy link
Contributor Author

deefour commented Apr 28, 2015

I don't know what the issue is now. The build is passing but Scrutinizer says it was told otherwise.

philsturgeon added a commit that referenced this pull request Apr 28, 2015
Add setMeta to ResourceAbstract
@philsturgeon philsturgeon merged commit cd0d689 into thephpleague:master Apr 28, 2015
@deefour deefour deleted the feature/setMeta branch April 28, 2015 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants