Skip to content

review-again and Merge branch 'clear-code-before' into clear-code #1096

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

Closed
wants to merge 1 commit into from

Conversation

ReenExe
Copy link
Contributor

@ReenExe ReenExe commented May 20, 2016

No description provided.

@ReenExe ReenExe mentioned this pull request May 20, 2016
@ReenExe
Copy link
Contributor Author

ReenExe commented May 20, 2016

@ruflin, Something wrong again, but with build, because I review code again with diff

if (!isset($this->_params[$key])) {
$this->_params[$key] = array();
}
/**
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this note. Lets keep the logic the same in this PR, so I suggest to uncomment the below again (especially as the tests fail).

Copy link
Contributor Author

@ReenExe ReenExe May 23, 2016

Choose a reason for hiding this comment

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

@ruflin, I check this in 5.4 http://sandbox.onlinephpfunctions.com/code/8dc8d94b0ccf05c77dffaf2c3b69bda702463f29

error_reporting(E_ALL);

$a = [];

$a['a']['b']['c'][] = 'value'; 

echo $a === ['a' => ['b' => ['c' => ['value']]]]; // 1

Copy link
Collaborator

Choose a reason for hiding this comment

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

Its not the change thats the problem, its that there is no need to have it commented out with a TODO comment.

@ruflin
Copy link
Owner

ruflin commented May 23, 2016

In general LGTM. I don't think something is wrong with the build as the error is consistent across all 4 builds: https://travis-ci.org/ruflin/Elastica/jobs/131748215#L4437

Could it be related to the changes you made / commented out? There seems to be a true / false mix somewhere potentially. I didn't check in detail yet.

if (!array_key_exists('aggs', $this->_params)) {
$this->_params['aggs'] = array();
}
/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Another one here.

If this is an issue, aggs should be set in the constructor.

@merk
Copy link
Collaborator

merk commented May 23, 2016

Please remove the code rearrangement (exceptions being thrown elsewhere) to a separate PR so it can be discussed independently of the array syntax changes.

I'd also like to see the true/false changes as another separate PR since it doesnt relate to the syntax changes either, making it easier to discuss and track.

@ruflin
Copy link
Owner

ruflin commented May 23, 2016

@ReenExe I like the suggestion from @merk Lets do in a first PR that array conversion. This is about 95% of the changes and should not change any logic. Then we can have a second PR with the other changes to discuss. This also prevents too many merge conflicts.

@ruflin
Copy link
Owner

ruflin commented May 26, 2016

I tried to investigate further into the composer issue, and I'm not sure what happens. It uses now composer 1.1.1 but the 5.4 build still fails. See https://travis-ci.org/ruflin/Elastica/jobs/133096440#L1777 The strange part is that if I test it locally with PHP 5.6 the --no-dev works as expected, there on travis it seems it doesn't? I need to test it with 5.4 it seems. Any other ideas what the issue is?

@ReenExe
Copy link
Contributor Author

ReenExe commented May 26, 2016

Compare with https://travis-ci.org/ruflin/Elastica/jobs/128814644 - see only

...
Problem 1
...
Installation request for aws/aws-sdk-php ~3.0 -> satisfiable by aws/aws-sdk-php
...

@ruflin
Copy link
Owner

ruflin commented Jun 9, 2016

@ReenExe Sorry for the late answer. Not sure what you try to say with the above? Any idea how we could fix it?

@ReenExe
Copy link
Contributor Author

ReenExe commented Jun 9, 2016

@ruflin I think problems with 5.4 begin after changes in composer.json after #1065 that requires PHP 5.5 in AWS (aws/aws-sdk-php)

@ReenExe
Copy link
Contributor Author

ReenExe commented Jun 9, 2016

@ruflin, Sorry my mistake in previous comment.
The problem stay in composer - because composer try require-dev aws/aws-sdk-php

@ruflin
Copy link
Owner

ruflin commented Jun 14, 2016

@ReenExe Yep, it seems like the version didn't change in the PR linked. I'm currently trying to find a work around for this issue (again) :-)

@ruflin
Copy link
Owner

ruflin commented Jun 14, 2016

Ok, I think I managed to find a work around for the PHP 5.4 issue.

@ReenExe I did also apply linting and interesting it converts all [] into array(...): See #1113 So I assume changing everything to the short syntax would only changing the entry here and apply linting? https://github.com/ruflin/Elastica/blob/master/.php_cs#L19 No manual work needed hopefully :-)

@ReenExe
Copy link
Contributor Author

ReenExe commented Jun 15, 2016

@ruflin, I see, so sorry - but for me to resolve conflict need make new fork - and merge my changes to review it before make new PR - so i do it, and close this to reopen new.
It's good that build PHP 5.4 are success.

@ruflin
Copy link
Owner

ruflin commented Jun 15, 2016

@ReenExe Ok, but try to make it the automated way (no manual work). Please push the array changes separate.

That means I can close this PR?

@ReenExe
Copy link
Contributor Author

ReenExe commented Jun 15, 2016

@ruflin, Yes, close. I try find how automate or some like

if ($condition) {
  throw new \Exception('some');
} else {
  return $b
}

to

if ($condition) {
  throw new \Exception('some');
}
return $b

But think - for this automated need contribute to CS

@ruflin
Copy link
Owner

ruflin commented Jun 15, 2016

@ReenExe Yeah, for automation I was only referring to the array stuff.

@ruflin ruflin closed this Jun 15, 2016
@ReenExe ReenExe deleted the clear-code branch June 17, 2016 16:06
@ReenExe ReenExe mentioned this pull request Jun 17, 2016
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