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.
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.
commit 3994b556dcffcde7b1801c8bc712f3127e8f8e7c
Author: John Whitley <john.whitley@berea.eu>
Date: Tue Aug 16 09:02:53 2016 +0100
https://github.com/composer/composer/issues/5600
This alters the default flag for loadOptions in
\Composer\Package\Loader\ArrayLoader to true; and alters the assumption
of the test to reflect this change.
**Rationale**
The `\Composer\Package\Loader\ArrayLoader` test (defined in
tests/Composer/Test/Package/Loader/ArrayLoaderTest.php) assumed that a
new `\Composer\Package\Loader\ArrayLoader` instance would be always
created with the optional flag loadOptions set to true.
```php
$this->loader = new \Composer\Package\Loader\ArrayLoader(null, true);
```
This change alters the general case to reflect the default assumption as
defined in the test.
commit b75fc4ad7238bc50f724bd29446ccbc33e82c34c
Author: John Whitley <john.whitley@berea.eu>
Date: Mon Aug 15 16:55:27 2016 +0100
Altered the test for ArrayLoader to use the default loadConfig flag, and to test the true and false states for the loadConfig flag
commit 3994b556dcffcde7b1801c8bc712f3127e8f8e7c
Author: John Whitley <john.whitley@berea.eu>
Date: Tue Aug 16 09:02:53 2016 +0100
https://github.com/composer/composer/issues/5600
This alters the default flag for loadOptions in
\Composer\Package\Loader\ArrayLoader to true; and alters the assumption
of the test to reflect this change.
**Rationale**
The `\Composer\Package\Loader\ArrayLoader` test (defined in
tests/Composer/Test/Package/Loader/ArrayLoaderTest.php) assumed that a
new `\Composer\Package\Loader\ArrayLoader` instance would be always
created with the optional flag loadOptions set to true.
```php
$this->loader = new \Composer\Package\Loader\ArrayLoader(null, true);
```
This change alters the general case to reflect the default assumption as
defined in the test.
commit b75fc4ad7238bc50f724bd29446ccbc33e82c34c
Author: John Whitley <john.whitley@berea.eu>
Date: Mon Aug 15 16:55:27 2016 +0100
Altered the test for ArrayLoader to use the default loadConfig flag, and to test the true and false states for the loadConfig flag
any tests that use the filesystem should have their own unique directory, as we run our test suite in parallel and
cleanup of tests (removing directories) should not interfere with currently running tests
Extend RootPackageInterface with setter functions used by
composer-merge-plugin and implement them for RootAliasPackage. This will
allow composer-merge-plugin and similar code that manipulates the root
package at runtime to ignore the difference between a RootPackage and
a RootAliasPackage.
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.
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).
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.
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).
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.
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.
On OSX the temp dir is within /var, which is a symlink to /private/var.
If this is not resolved, the comparison will fail when comparing to the result of `git archive` in testGitExcludes().
* extends BaseDumper, implements interface
* put $keys into BaseDumper
* WIP WIP WIP WIP
* BaseDumper for utilities
* interface to enforce 'dump()'
* feature:
* supports git
* supports zip output
* basic test to cover feature
* add @todo for later
* add vendor namespace to package name
* add extension to getFilename() so we don't need to switch in there (HT, @naderman)
* add extension (obviously 'zip' in ZipDumper)
* create archive in destination dir (provided by __construct())
* condensed ZipDumper
* moved code to BaseDumper (hopefully easier re-use)
* use ProcessExecutor from BaseDumper
* fix assignments in __construct()
* allow injection of ProcessExecutor
* fix parameters
* fix regex
* write in 'system temp dir'
* update test case (oh look, a duplicate regex)
* move working directory related to BaseDumper
* add quotes
* place holder for these methods
* use PharData to create zip/tar when necessary
* add placeholder calls
* add call to package() using PharData
* finish downloadHg(), downloadSvn()
* put to use
* make BaseDumper abstract (to force extension)
* make BaseDumper implement Interface (makes for less code in the implementation)
new functionality for dumping as .tar.gz
tar instead of tar.gz, new abstract dumpertest class
creates a local git repo instead of fetching a remote one
more oo-ish version of it
no constructor
* refactor tests to be less linux-specific (used Composer\Util to wrap calls)
* make filename only the version
* various cs fixes (idention, tabs/spaces, doc blocks, etc.)
* fixed a typo'd exception name
* refactored downloading:
* removed download*() methods
* added dep on Composer\Factory to setup a DownloadManager instance
* update CS with feedback from @stof
* ArrayDumper doesn't extend BaseDumper anymore (hence no conflict on the interface)
* move keys from BaseDumper back to ArrayDumper
* interface now declares dump() to always return void
Apparently I had to update the lock.
CS fixes (tabs for spaces)
Bugfix: sprintf() was missing.
Fix docblock for @stof. ;)
Pull in lock from master.
Update lock one more time (hope it still merges).
whitespace
Revert ArrayDumper static keys
> 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
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