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

JsonLD #1645

Merged
merged 8 commits into from
Nov 15, 2017
Merged

JsonLD #1645

merged 8 commits into from
Nov 15, 2017

Conversation

JohnnyMcWeed
Copy link
Contributor

@JohnnyMcWeed JohnnyMcWeed commented Nov 14, 2017

WIP #1551

@coveralls
Copy link

Coverage Status

Coverage decreased (-13.1%) to 58.836% when pulling 8ff01bc on JohnnyMcWeed:master into e18c70c on luyadev:master.

{
use OrganizationTrait;

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move the private vars into the OrganizationTrait?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure :)

@nadar nadar self-assigned this Nov 14, 2017
@nadar
Copy link
Contributor

nadar commented Nov 14, 2017

@JohnnyMcWeed The unit tests seems to fail.

@JohnnyMcWeed JohnnyMcWeed changed the title JsonLD JsonLD - Issue #1551 Nov 14, 2017
@JohnnyMcWeed JohnnyMcWeed changed the title JsonLD - Issue #1551 JsonLD Nov 14, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-13.1%) to 58.836% when pulling 36a56e5 on JohnnyMcWeed:master into e18c70c on luyadev:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.5%) to 68.433% when pulling cc4de31 on JohnnyMcWeed:master into e18c70c on luyadev:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-6.2%) to 65.707% when pulling eaeee9b on JohnnyMcWeed:master into e18c70c on luyadev:master.

Copy link
Contributor

@nadar nadar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! We are very close to the final decisions. Why have you moved the fields() into the Trait? What was the idea behind?

/**
* Return the fields
*/
public function fields();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JohnnyMcWeed fields should not be part of the interface i assume. It should be an abstract method of BaseThing instead.

trait PersonTrait
{
use ThingTrait {
fields as thingFields;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as field() should not be part of the trait or interface, fields are applied in the object itself this allows us not to rename trait methods, which would lead into not clear design.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it would be easier to maintain like that, cause we can avoid the "no single inheritance"-problem...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g.
In LocalBusinessTrait we'll merge in PlaceTrait->fields() and OrganisationTrait->fields()

Like this we always have only one place where the code belongs to, so if once schema get's changed or so, there's only one trait we have to do something and not fields everywhere we have to think about...

That was my idea behind it...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, its right it could be more easy to maintain the fields. Maybe we could also find getter methods in BaseThing and auto build the fields. This would

  1. fixed the problem with renaming
  2. easy to maintain.

As every jsonld element MUST implement BaseThing.

@nadar nadar merged commit 7ea5efb into luyadev:master Nov 15, 2017
nadar added a commit that referenced this pull request Nov 15, 2017
nadar added a commit that referenced this pull request Nov 15, 2017
nadar added a commit that referenced this pull request Nov 15, 2017
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.

3 participants