Repository navigation
Smooth the upgrade from 1.7 - #265
Merged
Merged
Conversation
1.7 has the API of 2.0 that can be added without breaking 1.x, and deprecates what 2.0 replaces: 2.0 introduces no deprecation of its own, they are all deprecated since 1.7. So the lines of a hunk and the entries of a tree get the methods 1.7 has: FileChange::getDiffLines(), iterating a Tree, Tree::getBlobs(), getTrees() and getSubmodules(). The methods returning arrays are deprecated, and keep returning the arrays of 1.x until 3.0, instead of objects readable as arrays. UnexpectedValueException, which 2.0 no longer throws, has nothing to replace it in 1.7: it isn't deprecated. UPGRADE-2.0.md explains how to support 1.x and 2.x with a single code path, and the branch alias lets "^2.0@dev" install main.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
v1.7.0 is out (#264). It has the API of 2.0 that can be added without breaking 1.x, and it deprecates what 2.0 replaces.
1.xis merged intomainwith the strategy "ours", so 1.7 is now an ancestor ofmain.This pull request aligns 2.0 with 1.7.
No deprecation of its own in 2.0
Like a Symfony major, 2.0 introduces no deprecation: all of them are deprecated since 1.7.
trigger_deprecation()and@deprecatedof what 1.7 deprecates now say "1.7".FileChange::getDiffLines(), which returnsDiffLineobjects;Tree, which givesTreeEntryobjects;Tree::getBlobs(),getTrees()andgetSubmodules().FileChange::getLines(),Tree::getEntries(),getBlobEntries(),getTreeEntries()andgetCommitReferenceEntries()are deprecated. Until 3.0, they keep returning the arrays of 1.x. Before, they returned objects you could read as arrays, with a deprecation;DiffLineandTreeEntryno longer implementArrayAccess.FileChangeand theLINE_*constants are deprecated since 1.7. So is the argument ofRepository::getReferences().getSubmoduleEntries(), never released, is replaced bygetSubmodules().UnexpectedValueExceptionis no longer deprecated: 2.0 no longer throws it, but 1.7 has nothing to replace it with.UPGRADE-2.0.md
^1.7 || ^2.0with a single code path:ProcessExceptionreads;run()runs git in.Composer
The branch alias
dev-main: 2.0.x-devlets^2.0@devinstallmainbefore 2.0.0 is tagged.Checks