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 PluggableDataType #3903

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add PluggableDataType #3903

wants to merge 1 commit into from

Conversation

mwjames
Copy link
Contributor

@mwjames mwjames commented Apr 7, 2019

This PR is made in reference to: #

This PR addresses or contains:

  • Until recently (Allow to use a callable to construct a DV instance #3899) it was not possible for custom types to control the construction of corresonding DV instances leaving out any possibility for dependency injection or the necessity to rely on global state. The new PluggableDataType allows for custom types to define relevant fields together with how a DV instance should be constructed.

This PR includes:

  • Tests (unit/integration)
  • CI build passed

@mwjames mwjames added the enhancement Alters an existing functionality or behaviour label Apr 7, 2019
@mwjames mwjames added this to the SMW 3.1.0 milestone Apr 7, 2019
@mwjames
Copy link
Contributor Author

mwjames commented Apr 7, 2019

*
* @since 3.1
*
* @return []
Copy link
Member

Choose a reason for hiding this comment

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

string[]


$pluggableDataType = $this->getMockBuilder( '\SMW\PluggableDataType' )
->disableOriginalConstructor()
->getMock();
Copy link
Member

Choose a reason for hiding this comment

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

$this->createMock( PluggableDataType::class );

*
* @return string|callable
*/
public function getClass();
Copy link
Member

Choose a reason for hiding this comment

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

I'm having some problems understanding what this is about, which suggests the naming is not super.

@JeroenDeDauw
Copy link
Member

Kinda painful to see new extension interfaces without scalar and return types. Maybe worth waiting till 3.2 so these can be used. Unfortunately you can't add them after the fact without creating a breaking change.

@JeroenDeDauw
Copy link
Member

@mwjames what do you think? Can we push this to 3.2? (That release can be in a few months rather than in a year if we want)

@mwjames
Copy link
Contributor Author

mwjames commented Aug 11, 2019

what do you think? Can we push this to 3.2?

Fine by me.

@JeroenDeDauw JeroenDeDauw modified the milestones: SMW 3.1.0, SMW 3.2.0 Aug 11, 2019
@JeroenDeDauw
Copy link
Member

Hehe, 3.2 will be released in 5 days anyway :D

image

@kghbln kghbln removed this from the SMW 3.2.0 milestone Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Alters an existing functionality or behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants