1
0
Fork 0
Commit Graph

225 Commits (a3f9d300f3ec0be2150d53be0e4f814460800346)

Author SHA1 Message Date
Gabriel Caruso afc9a7643e Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 2017-11-30 13:44:43 -02:00
Robert Lu 3ce71a55bf fix unittest 2017-11-07 13:54:52 +08:00
Martin Hasoň 88ec172bd8 Fix CS 2017-05-19 15:14:47 +02:00
Jordi Boggiano c917c52f81 Message tweak, refs #6341 2017-05-16 22:45:47 +02:00
AjiYakin 8858b27ced Warn identical names w/ different capitalization - extract zip archive
Warn about identical names with different capitalization on zip archive
extract failure (Not a directory)

Issue #5938
2017-05-16 22:43:04 +02:00
Jordi Boggiano 61511cfed6 Fix CS issues, refs #6159 2017-03-30 09:29:48 +02:00
Jordi Boggiano 0a337e7c75 Merge remote-tracking branch 'gza/fix_unzip_on_win_php56' 2017-03-30 09:15:26 +02:00
Guillaume ZITTA f89e01d622 switch first / fallback order 2017-03-14 23:43:48 +01:00
Jordi Boggiano 122e422682 CS fixes 2017-03-08 15:16:44 +01:00
Guillaume ZITTA abf06913a2 remove useless expect (already done by docstring) 2017-02-14 17:37:40 +01:00
Guillaume ZITTA 921ffe741f Cleaner fallback Algorithm 2017-02-13 15:54:55 +01:00
AnrDaemon 1d2a949e3e Properly fix git excludes.
Mindless copy-paste never gets old. Sorry. This is fixed proper this time.
2016-12-24 03:19:50 +03:00
AnrDaemon ab70601700 Skip git-related tests if no git found. 2016-12-22 20:14:57 +03:00
Richard Heelin c2f6c61f56 Updated the tests to match the new command that is executed 2016-10-21 15:49:27 +01:00
Jordi Boggiano 788f32ac93 Allow running test suite with osx tar, fixes #5662 2016-09-10 11:38:52 +02:00
Jordi Boggiano 334d0cce6b Make sure we do not clone from local mirror if mirroring failed 2016-07-02 23:52:10 +01:00
Jordi Boggiano 4998ee27b3 Re-use mirror code from the git driver, refs #5384 2016-07-02 17:20:51 +01:00
Jordi Boggiano 55e90093a4 Merge remote-tracking branch 'marvil07/faster-git-clones-using-cache' 2016-07-02 16:43:19 +01:00
bohwaz be013e5572 Fossil VCS tests 2016-06-25 13:09:49 +12:00
Marco Villegas 869b3ef954 New test to check git download behavior with cache. 2016-06-18 19:39:09 -05:00
Marco Villegas cb6cfa9635 Isolate config setup to make it reusable at GitDownloaderTest. 2016-06-18 19:39:09 -05:00
Marco Villegas b5c55d5167 Adjust GitDownloaderTest to include for the new getVersion() method in Git. 2016-05-30 11:58:25 -05:00
Luis Faceira 1d733ba21a GitDownloaderTest uses temp dir as composer home config
When creating a DownloaderMock a home config dir is
ensured to exist, so that no test fails for lack of it
that on a regular run would be set by the Factory
2016-05-29 12:36:19 -05:00
Jordi Boggiano 73139a59bf Update origin remote URL when package URL changed and origin still uses the same url as the composer remote, fixes #3874 2016-04-18 10:10:12 +01:00
Jordi Boggiano b93b73e836 Rewrite git unpushed status checks, fixes #4987 2016-03-02 13:00:20 +00:00
Jordi Boggiano fea99bcb1b Clarify the fetch/push URL selection for github repos and various protocols, fix regression 2016-03-01 13:43:59 +00:00
Jordi Boggiano b080a73840 Fix broken test on windows, fixes #4973 2016-03-01 13:25:39 +00:00
Jordi Boggiano 6f42b9c865 Disable git, svn, http protocols for VCS downloaders, fixes #4968 2016-03-01 13:20:35 +00:00
Jordi Boggiano 0ed5b541a9 Fix CS 2016-02-29 15:05:11 +00:00
Jordi Boggiano f2e2dd8f86 Merge pull request #4972 from curry684/code-quality
Code quality
2016-02-29 14:14:49 +00:00
Niels Keurentjes a409e158b8 Disabled unit test breaking on some platforms. Ref #4973 2016-02-28 01:08:25 +01:00
Niels Keurentjes 3a66d1b9bb Fixed unit test explicitly depending on erroneous method invocation. 2016-02-27 23:42:55 +01:00
Jordi Boggiano 2f638c7d96 Fix test 2016-02-25 21:16:48 +00:00
Jordi Boggiano be4d385942 Fix uncommitted change detection, refs #3633 2016-02-25 20:59:26 +00:00
Jordi Boggiano 9f4f8a9578 Merge remote-tracking branch 'greg0ire/improve-status-for-unpushed-branches' 2016-02-25 19:43:20 +00:00
Jordi Boggiano 06be9b88c2 Merge remote-tracking branch 'slbmeh/feature/gh-2787' 2016-02-25 19:03:36 +00:00
Magnus Nordlander 4689d836fe Fixed (and added a test for) a regression introduced in a77e2fb, which causes package Git package updates to fail when the package has two or more URLs and the last URL is the only one that actually works. 2016-02-17 17:42:48 +01:00
Niels Keurentjes 0dab63e050 Unified all Windows tests throughout the code. 2016-02-03 22:39:16 +01:00
Jordi Boggiano 1818b95149 CS fixes 2016-01-26 13:07:18 +00:00
Jordi Boggiano 783e0aec8a Merge remote-tracking branch 'alcohol/unique-test-directories' 2016-01-26 12:35:29 +00:00
Rob Bast adf3b956d0 try to use unique test directories
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
2016-01-26 09:41:21 +01:00
Rob Bast 446f1b3e31 fix zip test 2016-01-21 10:22:12 +01:00
Jordi Boggiano e6f1c13d00 xz test tweak 2016-01-10 20:45:40 +00:00
Jordi Boggiano 5214620f05 Fix xz tests 2016-01-10 20:26:23 +00:00
Jordi Boggiano 5d015defb8 Merge remote-tracking branch 'origin/master' into tls-config 2016-01-10 16:10:22 +00:00
Jordi Boggiano 969263944c Rename var 2016-01-09 18:39:18 +00:00
Alexander Loutsenko 397ae2d7c8 review fixes 2015-12-14 18:50:04 +03:00
Alexander Loutsenko fa5de786ff clean garbage dirs in tmp after composer tests #4694 2015-12-14 17:52:37 +03:00
Pierre Rudloff 879d34589b XzDownloader test 2015-11-03 23:29:20 +01:00
Jordi Boggiano ce08582671 Fix CS 2015-09-28 10:53:24 +01:00
James Titcumb d85bad29d6 Warn about unpushed changes
`composer status` now prevents overwriting Git package if changes have not been pushed.
2015-08-30 00:30:16 +02:00
Wim Vandersmissen 1ff2a02517 fix to download correct Bitbucket archive reference when using --prefer-dist 2015-06-19 15:07:16 +02:00
Rob Bast d59115d7fa make unit tests assume a disabled entity loader 2015-06-03 10:19:40 +02:00
Jordi Boggiano 0081964428 Merge remote-tracking branch 'colinodell/fix-tag-ambiguity'
Conflicts:
	src/Composer/Downloader/GitDownloader.php
	tests/Composer/Test/Downloader/GitDownloaderTest.php
2015-05-31 12:52:27 +01:00
Steve Buzonas b44c3bee52 add tests to cover different use cases of package install preferences 2015-04-18 20:59:51 -04:00
hakre 7077803aa4 Git Checkout Branch / File Differentiation
This fixes a minor inaccuracy issue when creating git checkout commands
for branches.

The git checkout command used within `GitDownloader::updateToCommit()`
does not use the "`--`" sequence to separate branch from file parameters.

This leads to an inaccuary as git tries as well the branch name as file
name. If the non-existent branch is actually the name of a file, the file
is checked out. If the non-existent branch is not the name of a file, an
error message is given:

> error: pathspec 'non-existent-branch' did not match any file(s) known to
git.

Both cases are not expected for the program flow in
`GitDownloader::updateToCommit()`.

The only thing that is expected is a non-existent branch to fail to
checkout - but with a different error message:

> // reference was not found (prints "fatal: reference is not a tree:
 $ref")

This can be easily fixed by adding the missing separator when constructing
the command which is applied with this commit.
2015-03-19 12:50:06 +01:00
Rob Bast cb336a5416 Implement writeError throughout Composer 2015-02-25 11:00:35 +01:00
Padraic Brady 19e24c5804 Merge branch 'master' into tls-config
Conflicts:
	.travis.yml
	doc/03-cli.md
	src/Composer/Command/ConfigCommand.php
	src/Composer/Command/CreateProjectCommand.php
	src/Composer/Command/DiagnoseCommand.php
	src/Composer/Command/InstallCommand.php
	src/Composer/Command/RequireCommand.php
	src/Composer/Command/SelfUpdateCommand.php
	src/Composer/Command/ShowCommand.php
	src/Composer/Command/UpdateCommand.php
	src/Composer/Config.php
	src/Composer/Downloader/FileDownloader.php
	src/Composer/Factory.php
	src/Composer/Repository/ComposerRepository.php
	src/Composer/Repository/PearRepository.php
	src/Composer/Repository/Vcs/VcsDriver.php
	src/Composer/Util/GitHub.php
	src/Composer/Util/RemoteFilesystem.php
2015-01-29 20:31:56 +00:00
Colin O'Dell f304611014 Fix Git failures due to tag ambiguity (issue #3417) 2014-11-14 10:31:52 -05:00
Jordi Boggiano a309e1d89d Fix tests and run it before the push url updater 2014-10-20 20:16:14 +01:00
Jordi Boggiano 94926218e8 CS fixes 2014-10-17 18:57:27 +01:00
Jordi Boggiano ac497feaba CS fixes 2014-06-10 16:13:12 +02:00
Jordi Boggiano 97873a27af Update perforce code 2014-05-07 19:34:41 +02:00
Jordi Boggiano 77163f66fc Add support for mirrors in composer repos 2014-05-07 19:34:35 +02:00
Jordi Boggiano 32cd883daa Rename options to transport-options, refs #2189 2014-05-07 18:25:28 +02:00
Jordi Boggiano 016a016455 Merge remote-tracking branch 'lcobucci/master'
Conflicts:
	src/Composer/Downloader/FileDownloader.php
2014-05-07 18:02:46 +02:00
Clark Stuth a12c4e2a17 Removed getWindowsFlag and setWindowsFlag methods from Perforce object. 2014-03-25 08:30:44 -05:00
Clark Stuth dd1fd0e306 fixed perforce to reference labels instead of invalid tags 2014-03-24 15:19:35 -05:00
Clark Stuth 24dd42267f almost all unit tests passing after IOInterface dependency refactor. no longer passing IOInterface into any Perforce methods 2014-03-21 13:51:18 -05:00
Clark Stuth 0f7b078d6c added new dependency to Perforce object, updating some tests. 2014-03-21 13:51:18 -05:00
Pádraic Brady 306ba77e93 Implement the RemoteFilesystem Factory everywhere...
- also fixes impacted test
2014-03-01 17:01:44 +00:00
Nils Adermann 5ed18d9aa2 Fail over from source to dist and vice versa when downloads fail
Any RuntimeException descendent will be caught and cause another
download attempt using either source or dist depending on what was
attempted first.
2014-02-24 18:40:33 +01:00
Jordi Boggiano 5d4900e79d Add --no-checkout flag to avoid checking out the default branch first, fixes #2717 2014-02-18 13:28:46 +01:00
Julius Beckmann ed5da804dd Fixed handling of Metapackages in DownloadManager.
The "getDownloaderForInstalledPackage" returns null for "metapackage" and the download(), update() and remove() methods did not handle this return value correctly.
2014-02-06 10:50:06 +01:00
Luís Otávio Cobucci Oblonczyk 0f2c0ab389 Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/Composer/Downloader/FileDownloader.php
2013-12-29 00:37:08 +00:00
mwhittom a8084e46ff Added error handling and error messages around missing perforce driver, invalid username/password 2013-12-02 13:34:47 -06:00
user a956ce9bb1 Use 'cache-files-ttl' for cache gc, fixes #2441
The configuration option 'cache-ttl' was used instead of 'cache-files-ttl' to determine
whether or not a cache gc should be performed.

* changed 'cache-ttl' to 'cache-files-ttl' to determine if a gc should be performed
* refactored FileDownloader to allow for easier testing
* added test to ensure that the gc is called with the proper config option
2013-11-24 10:55:25 +01:00
Jordi Boggiano 7148b22414 Add github-domains config value for GitHub Enterprise setups, fixes #728
Signed-off-by: Gennady Feldman <gena01@gmail.com>
2013-10-28 12:40:20 -04:00
Jordi Boggiano f5df1d6a9b Fix cs 2013-10-19 17:59:56 +02:00
Jordi Boggiano 0fbb4cbd16 CS fixes and renaming a few methods, refs #2184 2013-10-11 20:21:34 -03:00
Jordi Boggiano 11a0d16ccc CS fixes 2013-10-11 20:12:45 -03:00
Jordi Boggiano 9a806658d6 Merge remote-tracking branch 'vuhl/master'
Conflicts:
	src/Composer/Factory.php
2013-10-11 20:06:34 -03:00
mwhittom 2e737ac439 updated to replace double-quotes with single quotes 2013-09-09 14:48:24 -05:00
mwhittom f7d9f3d8b4 Fixed Test method setUp to be protected instead of private. 2013-09-06 12:31:04 -05:00
mwhittom 07d46aa3c3 Fixed spacing issues for PSR-2 2013-09-06 12:14:22 -05:00
mwhittom 774a55befd Updated to match psr-2 spec, fixed header comments 2013-09-04 09:24:49 -05:00
matt-whittom 8379985166 Updated/Standardized header comments 2013-09-04 09:10:44 -05:00
matt-whittom dd81449998 Updated to remove vfsStreams (no longer needed by tests)
Updated Perforce to cleanup, modified VcsRepository to call cleanup on Driver class
Updated tests, perforce constructor to make tests cleaner/easier
2013-09-04 09:10:44 -05:00
matt-whittom 1015957659 Added tests and code for tests 2013-09-04 09:10:43 -05:00
Nils Adermann 2ca07add97 Merge remote-tracking branch 'github-composer/master' into plugins
* github-composer/master:
  Correct FileDownloaderTest for invalid checksum

Conflicts:
	tests/Composer/Test/Downloader/FileDownloaderTest.php
2013-08-31 15:58:31 +02:00
Nils Adermann 72919e04b0 Correct FileDownloaderTest for invalid checksum 2013-08-31 15:55:12 +02:00
Nils Adermann 3960edd64e Turn EventDispatcher into generic solution handling plugins as well 2013-08-30 12:51:41 +02:00
Luís Otávio Cobucci Oblonczyk d4043b6b9a Package options must be passed as argument to downloader 2013-08-19 04:38:25 -03:00
Jordi Boggiano 7912253df6 Retry downloading when a corrupt zip is found, fixes #2133, fixes #2128, fixes #2125 2013-07-31 20:33:20 +02:00
Jordi Boggiano 7252078508 Attempt to fix travis build 2013-07-26 15:44:52 +02:00
Jordi Boggiano 771233a5a0 Make it clear what is going on when a vcs folder is missing, fixes #2108 2013-07-26 12:25:05 +02:00
Jordi Boggiano ab731b1197 Oops 2013-07-05 00:47:18 +02:00
Jordi Boggiano be235ffc19 Fix 5.3.3 build 2013-07-05 00:44:29 +02:00
Jordi Boggiano 0822683706 Fix tests 2013-06-28 20:42:06 +02:00
Jordi Boggiano 7f2b321044 Fix tests 2013-06-19 10:05:21 +02:00