This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 268556

Summary: Incorrect formatting of nested PHP arrays
Product: php Reporter: josef.sabl
Component: Formatting & IndentationAssignee: Tomas Mysik <tmysik>
Status: RESOLVED DUPLICATE    
Severity: normal CC: junichi11
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description josef.sabl 2016-10-17 12:13:12 UTC
Nested arrays are indented incorrectly when autoformatting PHP files.

Expected:

<?php

$myArray = [
	[
		'hello' => 'world',
	],
	[
		'goodbye' => 'cruel world',
	],
];


Actual:

<?php

$myArray = [
		[
		'hello' => 'world',
	],
		[
		'goodbye' => 'cruel world',
	],
];
Comment 1 Tomas Mysik 2016-10-17 12:21:28 UTC
IMHO duplicate of issue #268171 which is already fixed in the dev build - could you please verify it? Once verified, it can be part of the patch for NB 8.2.

Thanks!

*** This bug has been marked as a duplicate of bug 268171 ***
Comment 2 josef.sabl 2016-10-17 12:32:54 UTC
Sorry, I won't install dev just to test this as it looks like exactly the same problem :-) Thank you.
Comment 3 Tomas Mysik 2016-10-17 12:58:31 UTC
(In reply to josef.sabl from comment #2)
> Sorry, I won't install dev just to test this as it looks like exactly the
> same problem :-) Thank you.

In such a case, you can hardly verify that the issue is already fixed which needs to be done in order to be a part of the patch for NB 8.2.

Thanks.
Comment 4 josef.sabl 2016-10-17 15:42:01 UTC
Your users need to verify bugfixes prior to their release? Funny :) Anyway, I wanted to do that and donwloaded full NB dev as PHP version is not available. And I found out that I also need to install JDK. I am really sorry about that but I am not gonna do it. Hopefully somebody from the other duplicate will verify. Cheers!
Comment 5 Tomas Mysik 2016-10-18 08:03:40 UTC
(In reply to josef.sabl from comment #4)
> Your users need to verify bugfixes prior to their release? Funny :)

Not sure why you think so. It is normal that reporter verifies that the issue is fixed, using a dev build. Waiting for the next release is possible but (a) it usually takes a looong time and (b) the issue can still be there since it has not been verified, ideally by reporter ;)

> Anyway,
> I wanted to do that and donwloaded full NB dev as PHP version is not
> available.

Strange, I can see it [1].

Thanks.
[1] http://bits.netbeans.org/dev/nightly/latest/
Comment 6 josef.sabl 2016-10-19 07:45:59 UTC
I can see it now as well, strange.
http://bits.netbeans.org/download/trunk/nightly/latest/

Somebody already confirmed it though. Anyway, thanks for your time.