DDC-3548: [GH-1291] Conversion to PHP 5.4's short array syntax #4366

Closed
opened 2026-01-22 14:40:19 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 28, 2015).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/doctrine2/pull/1291

Message:

Now that the minimum PHP version is 5.4, it would be good to encourage the use of the short array syntax [].
Converting the existing codebase to this syntax will promote this good practice and encourage everyone to follow it.

I have converted the codebase with a tool I wrote for personal projects:

find doctrine2 -type f -name '*.php' -exec php short-array-syntax-converter.php {} \;

The number of changes is quite large, but I'm confident that nothing is broken, and the passing tests confirm this.

Originally created by @doctrinebot on GitHub (Jan 28, 2015). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of BenMorel: Url: https://github.com/doctrine/doctrine2/pull/1291 Message: Now that the minimum PHP version is 5.4, it would be good to encourage the use of the short array syntax `[]`. Converting the existing codebase to this syntax will promote this good practice and encourage everyone to follow it. I have converted the codebase with [a tool](https://gist.github.com/BenMorel/6994483) I wrote for personal projects: ``` find doctrine2 -type f -name '*.php' -exec php short-array-syntax-converter.php {} \; ``` The number of changes is quite large, but I'm confident that nothing is broken, and the passing tests confirm this.
admin added the ImprovementWon't Fix labels 2026-01-22 14:40:19 +01:00
admin closed this issue 2026-01-22 14:40:19 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 28, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1291] was assigned:
https://github.com/doctrine/doctrine2/pull/1291

@doctrinebot commented on GitHub (Jan 28, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1291] was assigned: https://github.com/doctrine/doctrine2/pull/1291
Author
Owner

@doctrinebot commented on GitHub (Jan 28, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1291] was labeled:
https://github.com/doctrine/doctrine2/pull/1291

@doctrinebot commented on GitHub (Jan 28, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1291] was labeled: https://github.com/doctrine/doctrine2/pull/1291
Author
Owner

@Ocramius commented on GitHub (Dec 13, 2015):

Won't fix for now - see #1291

@Ocramius commented on GitHub (Dec 13, 2015): Won't fix for now - see #1291
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4366