This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Sorted arrays #33
Open
waltertamboer
wants to merge
8
commits into
zfcampus:develop
Choose a base branch
from
waltertamboer:feature/sorted-arrays
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sorted arrays #33
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8756ae4
Sorted the data by key.
waltertamboer b8b2716
Made it possible to disable sorting
waltertamboer 8161663
Updated the changelog
waltertamboer 5242101
Updated the documentation
waltertamboer e5ca2ee
Casted the parameter to a boolean.
waltertamboer 1e16442
Changed the description to make it more clear
waltertamboer 273cbdd
Added a docblock to sortKeysRecursively. Also changed the return type…
waltertamboer 7a51e12
Renamed unit test methods to be more descriptive.
waltertamboer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still a problem here: where does the user call this method, exactly? Particularly as this is primarily an implementation detail for the admin API/UI. In scanning zf-apigility-admin, we generally create
ConfigResource
instances within factories for the various models; as such, this would require providing alternatives for each and every one of these factories. I'm beginning to think we may need a configuration switch that any factory that creates aConfigResource
would look at when creating an instance. For BC purposes, this would be disabled by default (to ensure that a minimal set of changes is made to existing configuration files), and users would opt-in to the new behavior.Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see what you mean now. Yes this does sound like a challenge. As far as I understand the changes made here are ok. The question is just how to properly use it in Apigility.
I'm not familiar enough with the architecture behind this but could it be as simple as reducing all the places where an instance of
ConfigResource
is created, to just 1 place by introducing a new class that handles the writing of config resources? Either way this feels like a BC break.Thinking out of the box. Maybe
setSortingEnabled
should not even exist, or maybe it's not the responsibility of aConfigResource
to toggle sorting.