Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Enable short array syntax by default #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snapshotpl
Copy link

As we support php >= 5.6, we can enable short array syntax in configuration by default.

@weierophinney
Copy link
Member

Except that it breaks existing applications. Not in a functional way, but in a "why is my configuration completely rewritten on this change?" way.

What will happen is users will have long array syntax in configuration files managed by Apigiliy. When they update to a version of zf-configuration that enables short array by default, and then use Apigility to manipulate their API, these files will switch to short array notation — and something that might have been a single line of changes previously now affects several dozen lines in the file.

As such, until we do a new major version of zf-configuration, we cannot enable short array syntax by default.

We can, however, enable it by default in the skeleton in a new version, and we're planning that for the 1.4 release.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-configuration; a new issue has been opened at laminas-api-tools/api-tools-configuration#4.

@weierophinney
Copy link
Member

This repository has been moved to laminas-api-tools/api-tools-configuration. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas-api-tools/api-tools-configuration to another directory.
  • Copy the files from the second bullet point to the clone of laminas-api-tools/api-tools-configuration.
  • In your clone of laminas-api-tools/api-tools-configuration, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants