Skip to content

Fix array expectation via cast.#383

Merged
ADmad merged 2 commits intomasterfrom
revert-382-ADmad-patch-1
Nov 25, 2017
Merged

Fix array expectation via cast.#383
ADmad merged 2 commits intomasterfrom
revert-382-ADmad-patch-1

Conversation

@dereuromark
Copy link
Copy Markdown
Member

Reverts #382

as I explained already to @ADmad in the comment to the original and valid change to add the typehint, the internal code expects the array, thus this revert here was invalid and a bad idea.
BC has nothing to do with this :)

See if (in_array($fieldName, $primaryKey)) { usage.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 25, 2017

Codecov Report

Merging #383 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #383   +/-   ##
=========================================
  Coverage     92.19%   92.19%           
  Complexity      672      672           
=========================================
  Files            25       25           
  Lines          2205     2205           
=========================================
  Hits           2033     2033           
  Misses          172      172
Impacted Files Coverage Δ Complexity Δ
src/Shell/Task/ModelTask.php 95.02% <100%> (ø) 156 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6893ffe...d6750b2. Read the comment docs.

@ADmad
Copy link
Copy Markdown
Member

ADmad commented Nov 25, 2017

And I already explained to you why maintaining the same signature is necessary to avoid PHP from complaining about signature mismatch, in an existing userland class which extends ModelTask and has overridden this method.

Hopefully @markstory or someone else can explain the same to you again.

@dereuromark
Copy link
Copy Markdown
Member Author

I think you are a bit pedantic here on the bc issue which is highly theoretical.
The actual issue remains..

@dereuromark
Copy link
Copy Markdown
Member Author

I adjusted to code to ahere to the BC issue (which is really not that big of deal IMO on that require-dev plugin).
But I would prefer if this was fixed properly instead of just reverting code that was put there for a reason :)

@dereuromark dereuromark changed the title Revert "Remove argument typehint." Fix array expectation via cast. Nov 25, 2017
@ADmad ADmad merged commit fd7b991 into master Nov 25, 2017
@dereuromark dereuromark deleted the revert-382-ADmad-patch-1 branch November 25, 2017 12:31
@markstory markstory added this to the 1.5.x milestone Nov 25, 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.

4 participants