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

fix: splat operator for PHP 7.4 #487

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

pnal
Copy link
Contributor

@pnal pnal commented Jun 24, 2024

fixes error on PHP below 8.1:
Fatal error: Cannot unpack array with string keys in ...

Copy link

Version

Target Version 14.22.1
Last version 14.22.0

There are 0 BREAKING CHANGE, 0 feature, 1 fix

Copy link

Front-end summary Node 18

💯 Total ✅ Passed ⏭️ Skipped ❌ Failed
13 13 0 0

@tikhanovichA tikhanovichA self-requested a review June 25, 2024 09:09
Copy link
Contributor

@tikhanovichA tikhanovichA left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@bartlomiejmarszal bartlomiejmarszal left a comment

Choose a reason for hiding this comment

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

This is unusual to try catch in test. Why do you need this?

try {
$subject = $this->subject;
$subject([
['resourceId' => $mockDelivery->getUri(), 'fileSystemId' => 'dataStore'], // check assoc array
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
['resourceId' => $mockDelivery->getUri(), 'fileSystemId' => 'dataStore'], // check assoc array
[
'resourceId' => $mockDelivery->getUri(),
'fileSystemId' => 'dataStore'
], // check assoc array

Copy link
Contributor Author

@pnal pnal Jun 26, 2024

Choose a reason for hiding this comment

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

to fail the same case on PHP 7.4, otherwise it is not obvious why I'm making instance of $subject twice with different input
what do you suggest?

Copy link
Contributor

@Karol-Stelmaczonek Karol-Stelmaczonek left a comment

Choose a reason for hiding this comment

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

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code is respecting code style rules
  • New code is respecting best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful

@pnal pnal merged commit 73c3527 into develop Jun 27, 2024
5 checks passed
@pnal pnal deleted the fix/AUT-3700/spalt-operator-for-assoc-array branch June 27, 2024 09:45
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