212 Commits (abdc6893a6da0980b07343005f5807ecb73f3150)

Author SHA1 Message Date
Jordi Boggiano a5b178084c
Merge branch 'master' into 2.0 5 years ago
Jordi Boggiano a2dadb91bf
Return two packages in PathRepository when on a feature branch, one for feature branch and one for the source branch it came from, fixes #8498, fixes #8477 5 years ago
Matthew Brown 65903aacfd Fix type issues (#7996)
* Fix type issues found by Psalm
5 years ago
CZechBoY a062cd1a31
added phpstan on level 0 5 years ago
Jordi Boggiano f946d8eb5a More RemoteFilesystem usage removals and some repository/vcs driver refactorings 6 years ago
Nils Adermann 6ef65e5319 Add a new RepositorySet class and restrict pool usage to the solver
Breaking change for the plugin interface so bumping the version of
composer-plugin-api to 2.0.0

First step for a refactoring of the package metadata loading mechanism
6 years ago
Jordi Boggiano ef7252b358 Avoid relying on internal usort behavior 6 years ago
Jordi Boggiano c917865fe9 Fix handling of dev versions and consolidate logic, refs #7119 6 years ago
Jordi Boggiano 9041622b86 Fix version guessing regression and a few other issues, fixes #7127 6 years ago
Jordi Boggiano 842a7ea922 Fix dev-master not being normalized correctly for the root package, fixes #7007 7 years ago
闫兴茂 1c0a494c72 Update findBestVersionForPackage method to support return package name 7 years ago
闫兴茂 354bd7f7e2 Update parse name version parirs name to lower 7 years ago
Alessandro Lai fc6c12bd0a Fix pretty version guessing when non-dev branch 7 years ago
Jordi Boggiano 5ba6d7d436 Fix pretty guessed versions to show nicely on numeric branches, refs #6845 7 years ago
Jordi Boggiano 40f4f6bf86 Fix docblock 7 years ago
Jérôme Vasseur 71c2ecbace Fix platform package detection in VersionParser 7 years ago
Jordi Boggiano c52e8e5656 Update comment 7 years ago
Jordi Boggiano b07be842a0 Remove feature-branches option as it is misnamed and duplicates the non-feature-branches option, refs #6475 7 years ago
Claus Due 965f1f42d1 Add support for feature-branches setting
A negative list of non-feature-branches names
is already supported - this patch adds a list of
branches names which *will* be considered as
feature branches.

Allows changing the currently hardcoded set of
expected feature branch names, from:

* master|trunk|default|develop

To any set of names or patterns that you desire.
7 years ago
Nicole Cordes 313e6b914d Fix Git branch parsing for detached HEAD on a commit
Current versions of Git output the commit hash as detached HEAD instead
of FETCH_HEAD. The VersionGuesser should be able to handle commit hashes
as well as FETCH_HEAD to detect the correct branch of a commit.
7 years ago
Jordi Boggiano 843877cd6d Fix hg version guessing, fixes #6236, fixes #6235 7 years ago
Jordi Boggiano c0b03d0d34 Force exact tag checks when we are in a detached head state 7 years ago
James Buncle 9be13783a3 Updated VersionGuesser to check if we actually have a version in the returned array (fixes bug originating from f6899e5 when array was first introduced) - as SVN Versions not being guessed as it would previously stop at Git check.
Fixes #6178
7 years ago
Jordi Boggiano e54c7478ee Attempt at fixing support for git 2.11, refs #5942 8 years ago
Rob Bast 710bb0d008
fix based on test, fixes #5724 8 years ago
Jordi Boggiano e53119f806 Make use of pretty version for new references, refs #5328 8 years ago
Jordi Boggiano 44ddcf4da7 Merge remote-tracking branch 'slbmeh/feature/version-status' 8 years ago
bohwaz abcbef4a67 Add Fossil support to Composer 8 years ago
Steve Buzonas 8d766c8eb2 cleaner implementation of status output with support for path repositories 8 years ago
Jordi Boggiano 0ed5b541a9 Fix CS 8 years ago
Niels Keurentjes b059cbe37c Removed unused variables and includes, fixed functions being called with more arguments than declared. 8 years ago
Jordi Boggiano 5b65221523 Reverse order of version guessing for git, fixes #4673 8 years ago
Jordi Boggiano bad80878bc Merge remote-tracking branch 'sashman/master' 8 years ago
Rob Bast a245c4618b php-cs-fixer 8 years ago
Jordi Boggiano fff0aed3a6 Allow Semver VersionParser in input hints 8 years ago
Jordi Boggiano c9436438ff Add memoization to parseConstraints, saves some (6-7% here) RAM and marginal CPU time 8 years ago
Sash f6899e5c38 #4828 Using version guesser to pull out the commit has for git repositories. The return value is now an array with version and commit values. 8 years ago
Jordi Boggiano 966a982738 CS fixes 9 years ago
Jordi Boggiano 4b269f4ded Follow stability option in create-project to select the best possible version, refs #4563 9 years ago
Jordi Boggiano 507415e404 Make VersionSelector prefer stable by default and allow specifying a PHP version that must be matched, fixes #4318 9 years ago
Jordi Boggiano ce08582671 Fix CS 9 years ago
Rob Bast 1328d9c3b2 rename baseversionparser to semverversionparser
and fix docblock as per @stof request
9 years ago
Rob Bast a1ad7fc435 fix classname clashing cause of existing class in current namespace 9 years ago
Rob Bast a1427d7fd6 replace all occurences in code and comments 9 years ago
Rob Bast 1ccfc8eb96 add semver, deprecated existing classes 9 years ago
Jordi Boggiano 89c6a68a76 Updates to path repository and path downloader, refs #4365 9 years ago
Samuel ROZE 4ab123291d Add missing licence in VersionGuesser 9 years ago
Samuel ROZE 623f31fcc4 Use version guesser to get local package version 9 years ago
Samuel ROZE 5261a5fa03 Move version guessing in `VersionGuesser` class 9 years ago
Jordi Boggiano c36d2a2e50 Merge pull request #4214 from legoktm/parse-links
Move VersionParser::parseLinks() to ArrayLoader::parseLinks()
9 years ago
Nils Adermann 3fd4672382 VersionParser: Append elements directly instead of array_merge 9 years ago
Nils Adermann e88df7429f Remove a few hundred/thousand array_merge calls 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 0ad9e98a59 Don't use BasePackage::$stabilities in VersionParser
Working towards #3545.

This adds VersionParser::$stabilities, which is an array of the
supported stability levels. This adds a little bit of duplication,
however we were already hardcoding the various stabilities in regular
expressions and functions like parseStability().
9 years ago
Kunal Mehta c5afb8f23a Mark VersionParser::formatVersion() as deprecated
With 1753c275ff, this will be handled nicely.
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
Jordi Boggiano 6a64041055 CS fixes 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 4fd9a3ceee compare against correct format 9 years ago
nevvermind 3032f0a538 Refactor based on code review
- Move the version api getter to the PluginManager And make it such that it can be mocked, but not pollute the public interface. That means "protected" visibility.
- The plugin api version constant should still be used throughout the code.
- Use different fixtures class names
- Use regex possessive quantifiers for performance
- Use full words for readability
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 a0ca1d4d96 Consider 0 as part of a version 9 years ago
Jordi Boggiano 4ce0adb23c Use the caret operator for all require operations 9 years ago
Jordi Boggiano 43c1caad0d Merge remote-tracking branch 'Seldaek/caret-op-for-semver'
Conflicts:
	tests/Composer/Test/Package/Version/VersionSelectorTest.php
9 years ago
Jordi Boggiano f41c1217f5 Merge pull request #3913 from hannesvdvreken/patch-2
Remove unused variable
9 years ago
Rob Bast 117b7ea033 Fixes #3900 9 years ago
Hannes Van De Vreken b85cb7df82 Remove unused variable 9 years ago
Chris Brand 87b7de4d0a Add the P character to the regex pattern
According to http://php.net/manual/en/function.preg-match.php and some other sources named groups should contain a 'P' character after the '?'

Without this, I receive the following error when running an update:

[ErrorException]
  preg_match(): Compilation failed: unrecognized character after (?< at offset 4

Exception trace:
 () at phar:///var/www/git/smmqa/app/admin/composer.phar/src/Composer/Package/Version/VersionParser.php:181
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 94926218e8 CS fixes 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
François Pluchino 8b5c00bff0 Fix phpdoc 10 years ago
Pascal Borreli 2f4df9d459 Fixed typos 11 years ago
Jordi Boggiano 80499bb024 Detect ~> misuse and suggest fix, fixes #2476 11 years ago
Jordi Boggiano 11a0d16ccc CS fixes 11 years ago
Jordi Boggiano f59f443fce CS fixes and one more test for safety, fixes #1855 11 years ago
Jordi Boggiano 533512879e Merge remote-tracking branch 'sminnee/fix-tilde-constraint-stabililty' 11 years ago
Jordi Boggiano 8d0b7f278e CS fixes 11 years ago
Pavel Savinov 831bd844bd Almost PHPDoc problems fixed 11 years ago
Sam Minnee 324ef0f9bb Fixed upper bound of wildcard matches.
Follow-on from 95b4348afa
11 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.
11 years ago
Sam Minnee be9aae5bab Formatting updates for PSR-2 compliance. 11 years ago
Sam Minnee b25457a8c1 Refactor wildcard matching to use manipulateVersionString 11 years ago