Samuel ROZE
bb81e3721a
Move the `proc_open` test in setUp
9 years ago
Samuel ROZE
dfccb686ce
Replace usage of brackets by legacy array notation
9 years ago
Samuel ROZE
5261a5fa03
Move version guessing in `VersionGuesser` class
9 years ago
Kunal Mehta
14d1f0f3f6
Move VersionParser::parseLinks() to ArrayLoader::parseLinks()
...
Working towards #3545 .
parseLinks is a wrapper around VersionParser::parseConstraints() that
creates Link objects, and better belongs in ArrayLoader.
9 years ago
Kunal Mehta
f634c6946d
Update callers of VersionParser::formatVersion()
...
Tests were moved to BasePackageTest.
9 years ago
Kunal Mehta
99dab8aebd
Move VersionParser::formatVersion() to BasePackage::getFullPrettyVersion()
...
Working towards #3545 .
formatVersion() does not belong in VersionParser since it depends upon a
Package object, and is creating a more complete pretty formatted
version, not parsing anything.
The new getFullPrettyVersion() method can be seen as an extension to
getPrettyVersion(), and is located in BasePackage as a result.
Callers to VersionParser::formatVersion() were not updated in this
commit to demonstrate that no functionality was changed in this
refactor. They will be updated in a follow up commit.
9 years ago
Sam Minnee
2cd698874f
Include pre-releases in >=2.3.0 comparison. Fixes #4080 .
...
This is a change to the >=2.3.0 comparison. Without this change, such a
comparison will exclude pre-release versions.
The rationale is that this makes the comparison more consistent with
<2.3.0 (which excludes all pre-releases) and ~2.3.0 (which includes
pre-releases).
9 years ago
nevvermind
12c833864c
Revert converting `1.0.0` to `^1.0`.
9 years ago
nevvermind
eb2aa14830
Make plugins have actual constraints instead of fixed versions
...
Instead of developing plugins against a single, fixed Plugin API version - `"composer-plugin-api": "1.0.0"`, this change will allow plugin developers to use versions like `"composer-plugin-api": "~1.1"` or `"composer-plugin-api": ">=2.1 <3.0"`, aka actual Composer-compatible constraints.
Only the "1.0", "1.0.0" and "1.0.0" Plugin API versions will be regarded as BC versions, and internally converted to "^1.0"; every other declared version string will be kept as it is.
Because of this new constraint flexibility, plugin version mismatches will be skipped, which means those plugin will NOT be registered to the system. Previously, a mismatch triggered a warning, but plugins were still registered.
9 years ago
Rob Bast
46e0a506b9
Added another testcase + fix
9 years ago
Rob Bast
a256f3dfca
Added one failing testcase and one successful
...
Demonstrates that it handles x.y.z properly as long as z !== 0
9 years ago
Jordi Boggiano
4ce0adb23c
Use the caret operator for all require operations
10 years ago
Jordi Boggiano
43c1caad0d
Merge remote-tracking branch 'Seldaek/caret-op-for-semver'
...
Conflicts:
tests/Composer/Test/Package/Version/VersionSelectorTest.php
10 years ago
Jordi Boggiano
cd38d1e096
Tweaks to also support 1.0-dev style aliases, refs #3480
10 years ago
Damian Mooyman
7bb85ff21e
Support aliases for numeric branches. Fixes #3461
10 years ago
Jordi Boggiano
d4523119ea
Use caret operator for 0.x releases when guessing versions, fixes #3518
10 years ago
Jordi Boggiano
06e96a78e2
Update ranges for 0.N versions, refs #3518
10 years ago
Jordi Boggiano
9438f3a58f
Use better semver ranges for 0.x versions, fixes #3518
10 years ago
Jordi Boggiano
92f4c1fb35
Allow and ignore semver build metadata, fixes #2422
10 years ago
Jordi Boggiano
f363f9d370
Add support for caret (^) operator
10 years ago
Jordi Boggiano
ebab9db27a
Add support for hyphen ranges
10 years ago
Jordi Boggiano
69ef80124f
Add support for capital X in 3.X and || for OR
10 years ago
Jordi Boggiano
4c713978e9
Add more tests and validate that there is only one comma
10 years ago
Jordi Boggiano
ca168d478b
Spaces are now equivalent to comma in constraints and mean AND
10 years ago
Jordi Boggiano
029f709300
Fix parsing stability suffixes in multi constraints, fixes #1732
10 years ago
Jordi Boggiano
95d49ce638
Add additional test for beta without dash separator support, fixes #3331
10 years ago
Jordi Boggiano
e6165e6495
Tweak rules to allow guessing based on branch aliases and avoid greedy constraints on alpha/beta/RC packages, refs #3096
10 years ago
Jordi Boggiano
cf75ec7763
Merge remote-tracking branch 'weaverryan/require-version-select'
10 years ago
François Pluchino
6c6a623229
Fix invalid version format
10 years ago
Ryan Weaver
895e62e859
Refactoring selection of the "recommended" version (e.g ~1.2) and adding some tests
...
This also modifies the behavior slightly (from a recommendation by seldaek) to always
propose the minor version of the recommendation (e.g. ~1.2 instead of ~1.2.1).
10 years ago
Ryan Weaver
aea2e901a9
Extracting logic into a new class related to selecting the latest version
...
Also refactored InitCommand slightly so that you can use this "latest version"
functionality when searching for a package as well.
10 years ago
Jordi Boggiano
ac497feaba
CS fixes
10 years ago
Jordi Boggiano
80499bb024
Detect ~> misuse and suggest fix, fixes #2476
11 years ago
Jordi Boggiano
f59f443fce
CS fixes and one more test for safety, fixes #1855
11 years ago
Sam Minnee
324ef0f9bb
Fixed upper bound of wildcard matches.
...
Follow-on from 95b4348afa
12 years ago
Sam Minnee
95b4348afa
Fixed lower bound of tilde and wildcard matches.
...
The lower bound of ~1.2 and 1.2.* style version requirements now uses >= 1.2.0.0-dev instead of
> 1.1.9999999.9999999. This is more straightforward to read, and behaves equivalently.
12 years ago
Sam Minnee
34a21516c8
Fix tilde constraints without a stability suffix to work like wildcard constraints.
...
With this fix, a tilde constraint such as ~3.1 won't match unstable versions of 3.1,
but a wildcard constraint such as 3.1.* would. This seems like a confusing
inconsistency, and so I have corrected it.
12 years ago
Jordi Boggiano
9d948eb795
Merge branch 'disjunctive'
12 years ago
Jordi Boggiano
0cccafbe81
Add disjunctive multi-constraints with |, refs #643 , fixes #1342
12 years ago
Jordi Boggiano
e16caa9bd7
Add EmptyConstraint
12 years ago
Jordi Boggiano
1f79f36227
Add a couple version parser tests
12 years ago
Christian Riesen
6f5ab3ed5c
Add other valid versions to test for stability
12 years ago
Jordi Boggiano
97dfbefa72
Add support for arbitrary values for the references in version constraints
12 years ago
Jordi Boggiano
908d2d91da
Fix case insensitive matching
12 years ago
Jordi Boggiano
cea4c05021
Fix parsing of ~ version constraint with unstable versions, fixes #1476
12 years ago
Jordi Boggiano
a59a5c4581
Merge remote-tracking branch 'simensen/sem-version-support'
12 years ago
Beau Simensen
081ead1635
Version Parsing: Consider <x.y.z to be <x.y.z-dev
...
> Consider `<x.y.z` to be `<x.y.z-dev.` Because in 99%
> of the cases that's what the intent is. Could be
> overriden with `<x.y.z-stable`.
- @Seldaek
refs #643
12 years ago
Beau Simensen
96a76eeffc
Semantic Version Parsing: ~version
...
Implemented `~` according to #643 and used the following versions
as a test case as defined by @Seldaek:
* "~1.2.3.4" = ">=1.2.3.4 <1.2.4.0-dev"
* "~1.2.3" = ">=1.2.3 <1.3.0-dev"
* "~1.2" = ">=1.2.0 <2.0.0-dev"
* "~1" = ">=1.0.0 <2.0.0-dev"
Refs #643
12 years ago
Jordi Boggiano
62bb5b339b
Allow parsing of stability modifiers combined with multi-constraints
12 years ago
Jordi Boggiano
0932f65a17
Return 7 chars and not 6 for short git hashes, formatting fixes
12 years ago
Jordi Boggiano
338730b19b
Merge remote-tracking branch 'zczapran/issue/1043_wrong_output_for_versions_when_updating'
12 years ago
Jordi Boggiano
e01a9c564d
Fix parsing of stability for lowercased RC versions
12 years ago
Zbigniew Czapran
730f206cea
removed unneccesary PackageMock and trailing whitespaces
12 years ago
Zbigniew Czapran
80c2736021
in VersionParser only truncate the version if hash
12 years ago
Jordi Boggiano
fe15c6a827
Make dev version matches preserve the proper case, fixes #935
12 years ago
Alexey Prilipko
75d3d57117
Version parser stability regexp update
12 years ago
Alexey Prilipko
e130386612
Add '<>' operator for Version Parser
12 years ago
Nils Adermann
41215a0e47
Require first version of a root package alias, rather than alias
...
This makes sure that the alias will always be installed, even if it isn't
technically needed.
13 years ago
Jordi Boggiano
c10eb66ac4
Ignore references when parsing dev versions
13 years ago
Jordi Boggiano
ef28f3b067
Basic handling of stability flags
13 years ago
Jordi Boggiano
70a3c68f73
Add package stability
13 years ago
Jordi Boggiano
595182aec0
Add/fix tests
13 years ago
Jordi Boggiano
8654c43c62
Fix version parser regression, fixes #550
13 years ago
Jordi Boggiano
f604ca5762
Allow .x in version constraints as alias for .*
13 years ago
Martin Hasoň
736ea800e3
Added isDev method to the VersionParser class
13 years ago
Jordi Boggiano
1213067d96
Add test
13 years ago
Jordi Boggiano
59d2b1145c
Add lock file alias support and a bunch of fixes
13 years ago
Jordi Boggiano
82054f2060
Add aliasing: `foo as bar` will require foo and automatically make it replace the bar version
13 years ago
Jordi Boggiano
ae7107fc22
Add more test requirements
13 years ago
Jordi Boggiano
882496b926
Adjust version parser tests
13 years ago
Jordi Boggiano
22858e81ef
Fix .* version constraints parsing to include nonstable versions
13 years ago
Jordi Boggiano
deb6ecd49b
Fix tests
13 years ago
Jordi Boggiano
e09f6900da
Fix up version parsing
13 years ago
Jordi Boggiano
19f89069a4
Add some more version normalization and support for branch names
13 years ago
Jordi Boggiano
fda206400a
Fix constraint parsing
13 years ago
Jordi Boggiano
da6566b343
Minor improvements to VersionParser
13 years ago
Jordi Boggiano
2e10b5c17e
Expand normalization feature and adjust tests
13 years ago
Jordi Boggiano
46a67733f8
Adjust codebase to the new VersionParser
13 years ago
Jordi Boggiano
f761cfe525
Refactored VersionParser
13 years ago