1
0
Fork 0
Commit Graph

747 Commits (6bbd2b280336e5b2d9539fc6408f732ae60385ab)

Author SHA1 Message Date
Matthieu Moquet c248115e04 Fix how download manager is constructed
This fixes tests due to upstream changes.
The createDownloadManager in the Factory now takes the config as extra
parameter.
2013-03-28 12:49:52 +01:00
Matthieu Moquet 60b1cc7d24 Create ArchiveManager with the Factory 2013-03-28 12:49:52 +01:00
Matthieu Moquet a733d76b33 Merged zip & tar archivers 2013-03-28 12:49:52 +01:00
Matthieu Moquet bfd2275cb0 Update interface to merge vcs with basic archivers 2013-03-28 12:49:52 +01:00
Matthieu Moquet 2fd17ecff8 Changed Package class due to upstream changes 2013-03-28 12:49:52 +01:00
Matthieu Moquet 20e717f975 Refactored the archiver package 2013-03-28 12:49:52 +01:00
Matthieu Moquet 3d0ce85db2 Moved archive Dumpers into its own Archiver package 2013-03-28 12:49:52 +01:00
Till Klampaeckel 2acb033057 Initial feature-dist
* 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
2013-03-28 12:49:52 +01:00
Jordi Boggiano 3cc5698e7b Allow PHP 5.2 autoloaders to consume namespace, classmap and include path files, fixes #1730 2013-03-27 18:45:33 +01:00
Jordi Boggiano d929a0813a Prepend the ClassLoader autoloader to avoid calling other previously registered autoloaders, fixes #1699 2013-03-16 16:14:55 +01:00
Jordi Boggiano ee60df708d Handle stability changes correctly, fixes #877
On update, packages that are less stable than the minimum-stability allows will
now be downgraded to their correct versions, even if they were installed as
unstable already.
2013-03-10 19:55:26 +01:00
Jordi Boggiano cfc8bf0730 Make phar build fails more debuggable 2013-03-10 13:58:49 +01:00
Jordi Boggiano be861f090a Remove filterPackages and add RepositoryInterface::search, refactor all commands to use new methods and remove all usage of the full package list for Composer repositories that support providers, fixes #1646 2013-03-10 13:40:52 +01:00
Jordi Boggiano 636aa965f7 Fix tests 2013-03-07 09:40:22 +01:00
Jordi Boggiano ea7d79ab03 Make sure platform requirements of the root package are enforced when installing from lock, fixes #1611 2013-03-03 20:05:46 +01:00
Jordi Boggiano c32470c7df Update docs, fix tests 2013-03-03 17:59:07 +01:00
Jordi Boggiano 4207fc3b19 Refactor require-dev handling to use one single repository and a one pass solving, fixes #719, fixes #1185, fixes #1330, fixes #789, fixes #640 2013-03-03 00:41:12 +01:00
Jordi Boggiano c29f3c698e Fix support of aliases combined with reference locked packages, fixes #1631 2013-02-28 10:51:21 +01:00
Markus Tacker 821f57f443 A bug in PHP prevents the headers from correctly beeing sent when a content-type header is present and
NOT at the end of the array

https://bugs.php.net/bug.php?id=61548

This updates fixes the array by moving the content-type header to the end
2013-02-27 17:07:13 +01:00
Jordi Boggiano 259a25344d Use the api to get file contents instead of raw.github.com
raw.github does not like the access_token query param
2013-02-27 14:10:28 +01:00
Christian Riesen 6f5ab3ed5c Add other valid versions to test for stability 2013-02-25 16:51:01 +01:00
Jordi Boggiano 7b4d1251cb Fix test suite 2013-02-24 18:21:16 +01:00
Jordi Boggiano 8d55b9cced Merge remote-tracking branch 'ronnylt/script-event-post-dump-autoload'
Conflicts:
	tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
2013-02-22 18:42:29 +01:00
Jordi Boggiano 5f48d5277d Fix tests 2013-02-21 17:45:03 +01:00
Jordi Boggiano b4c2347b24 Test fixes 2013-02-20 16:50:26 +01:00
Jordi Boggiano 3ca22f9ef1 Fix class name 2013-02-20 15:27:11 +01:00
Jordi Boggiano 27898c4c31 Suppress errors from mkdir calls that are checked for failure 2013-02-20 14:51:15 +01:00
Jordi Boggiano 5a484cb3a9 Make sure target-dir plays well with classmap and files autoload, for root and deps, refs #1550 2013-02-19 15:23:43 +01:00
Jordi Boggiano ab1256e135 Merge remote-tracking branch 'cmodijk/master' 2013-02-19 14:21:31 +01:00
Jordi Boggiano b4d691e46d Add test for escape sequences 2013-02-18 22:13:54 +01:00
Jordi Boggiano e348642aa7 Fix json manipulator handling of escaped backslashes, fixes #1588 2013-02-18 17:27:43 +01:00
Jordi Boggiano 1e15edc43d Fix repository test 2013-02-18 08:34:23 +01:00
Jordi Boggiano 940c2a079d Show failures more clearly in test setup 2013-02-16 00:15:18 +01:00
Cliff Odijk 5127fe8359 added type check to autoloader fixes #1504 2013-02-14 00:10:18 +01:00
Jordi Boggiano 97dfbefa72 Add support for arbitrary values for the references in version constraints 2013-02-13 13:26:27 +01:00
Jordi Boggiano 80c18db694 Fix tests 2013-02-13 12:59:16 +01:00
Jordi Boggiano 5165008be7 Merge remote-tracking branch 'pierredup/master' 2013-02-12 10:17:49 +01:00
Jordi Boggiano 908d2d91da Fix case insensitive matching 2013-02-11 11:52:50 +01:00
Jordi Boggiano 432955e0ae Fix github url escaping, raw.github.com doesnt like escaped slashes 2013-02-11 09:34:50 +01:00
Pierre du Plessis 255c0be7fc Added tests for include path flag 2013-02-04 10:12:41 +02:00
perprogramming 704837c574 - Sort links and keywords in ArrayDumper result (fixes issue #1499)
- Adapt ArrayDumperTest
2013-01-31 09:55:19 +01:00
Filippo Tessarotto 470adc47df Switched rand() to mt_rand() 2013-01-30 10:44:07 +01:00
Jordi Boggiano a7c950cddd Add support for github-oauth in config command 2013-01-16 16:19:22 +01:00
Pierre du Plessis 84b34b70e0 Add config option to set if the PHP include path should automatically be used when generating the autoloader 2013-01-14 11:15:06 +02:00
Jordi Boggiano dea4bdf8f0 Expand {} into a new line before manipulating json, fixes #1481 2013-01-13 17:06:35 +01:00
Jordi Boggiano cea4c05021 Fix parsing of ~ version constraint with unstable versions, fixes #1476 2013-01-13 16:36:40 +01:00
Ronny López e5cbf83185 Added post-autoload-dump script event. 2013-01-10 15:04:20 +01:00
Jordi Boggiano c80cb76b9b Always prepend autoloaders to avoid tools (i.e. phpunit) taking precedence over the project autoloader 2013-01-08 17:34:37 +01:00
Jordi Boggiano c31f4be112 Add test to verify url and and hash are updated, fixes #1460 2013-01-07 20:27:52 +01:00
Jordi Boggiano 78290945b8 Make sure there is a class to find in the file that must be ignored 2013-01-05 23:40:06 +01:00
Jordi Boggiano 514a3cde77 CS fixes 2013-01-05 20:01:58 +01:00
Jordi Boggiano 6ce285b70c Merge remote-tracking branch 'galymzhan/add-cache-files-maxsize' 2013-01-05 19:51:54 +01:00
Jordi Boggiano 1beccf9f0f Fix access of the static loader property 2012-12-25 16:08:36 +01:00
Martin Hasoň 45d7eb5b53 Fixed generating packageMap in AutoloaderGenerater (fixes generating include_paths.php file) 2012-12-17 11:13:07 +01:00
Galymzhan 219b489d01 add size-based limit for files cache, fixes #1321 2012-12-17 01:19:16 +06:00
Galymzhan 69f2230a4c add public method Filesystem#size 2012-12-17 01:04:39 +06:00
Martin Hasoň 03e355f063 Fixed topological sorting of packages in AutoloadGenerator 2012-12-14 15:21:40 +01:00
Jordi Boggiano 51eca2cdfc Fix matching of classes in trailing non-php text, fixes #1409 2012-12-13 17:39:17 +01:00
Aurélien Thieriot e264282ac7 Allowed only * wildcard 2012-12-13 14:06:06 +00:00
Aurélien Thieriot 159badb06b Add ability to use a Regexp when updating packages 2012-12-13 12:24:42 +00:00
Jordi Boggiano aefe3a0b11 Add support for .inc files in classmap, fixes #1396 2012-12-08 21:54:51 +01:00
Jordi Boggiano 6d2b4354f4 Fix test 2012-12-08 21:51:52 +01:00
Jordi Boggiano 23d45f67c1 Fix config merging for arrays 2012-12-08 21:45:21 +01:00
Jordi Boggiano eef64d1189 Update test 2012-12-06 10:26:16 +01:00
Jordi Boggiano b04d938319 Fix test to reduce cross-platform issues 2012-12-06 10:07:57 +01:00
Jordi Boggiano 7d7eb3b2e8 Fix shell command output, fixes #1295 2012-12-06 09:56:27 +01:00
Jordi Boggiano 224934831d Change all github archive URLs to API URLs and handle fallback for those to nodeload 2012-12-05 19:20:52 +01:00
Chris Smith e3838bbc1f Update tests to expect correct URLs for private dist downloads 2012-12-05 18:55:25 +01:00
Jordi Boggiano da1cc39cfd Fix tests 2012-11-29 09:33:51 +01:00
Jordi Boggiano a8f74a0983 Allow notification from locked installs, fixes #1368, fixes #1372, fixes #1369 2012-11-29 09:24:28 +01:00
Jordi Boggiano c5f3a6febd Fix optimized autoloader generation for PSR-0 configs that include non-existent dirs, fixes #1286 2012-11-27 14:23:10 +01:00
Jordi Boggiano de3235a2a4 Add tests to prevent regressions on strings/nowdoc/comment stripping 2012-11-25 14:10:58 +01:00
Jordi Boggiano 5a01ada383 Restrict unicode chars allowed to what php core allows, refs #1361 2012-11-25 14:07:06 +01:00
Jordi Boggiano 2d7c3c9d27 Tweak #1361 to re-enable support for unicode classnames 2012-11-25 13:52:42 +01:00
Igor Wiedler 530991217b Support classmap generation for classes without space after class name
Class names with multi-byte characters are not supported.

Closes #1360.
2012-11-25 12:08:50 +01:00
Jordi Boggiano f1f1ddb66b Fix updates when dev packages have new dependencies (no more double updates needed), fixes #1105 2012-11-22 22:47:19 +01:00
Jordi Boggiano b641f9ea68 Fix tests 2012-11-22 20:03:26 +01:00
Benjamin Eberlei d26932cc7e Fallback to PHP early if proc_open not allowed. 2012-11-19 10:29:32 +01:00
Jordi Boggiano 2719fb7e20 Merge remote-tracking branch 'christeredvartsen/script-dev-aware' 2012-11-18 12:04:19 +01:00
Christer Edvartsen 4b8813269c Pass the current dev mode to the event dispatcher, which in turn passes it to the events fired. This can be fetched in scripts to check which mode we are currently in 2012-11-15 17:16:25 +01:00
Beau Simensen 752fa64704 Added addLink and removeLink to Configuration Source Interface
* Added addLink() and removeLink() to `ConfigSourceInterface`
 * Added addLink() and removeLink() implementations to `JsonConfigSource`
 * Added tests (+ a ton of fixtures) for `JsonConfigSource`
 * Added additional docblocks
 * Minor PSR-1/PSR-2 fixes here and there
2012-11-14 09:03:11 -08:00
Jordi Boggiano de3188ca7d Remove target dir for classmap autoloads of the root package, fixes #1308 2012-11-13 17:09:22 +01:00
Jordi Boggiano 24963fb4c8 Fix handling of arrays in json manipulator 2012-11-13 12:49:23 +01:00
Jordi Boggiano 75da832cd3 Fix parsing of large files that go over the PCRE limits 2012-11-12 12:33:46 +01:00
Victor Berchet 86bb1be61f [ClassMapGeneratot] Filter out non php code
Otherwise files like https://github.com/propelorm/Propel/blob/master/generator/lib/behavior/i18n/templates/queryUseI18nQuery.php
would fail ("class" keyword would not be filtered out by php_strip_whitespace())
2012-11-12 09:15:35 +01:00
Victor Berchet ab48114531 [ClassMapGenerator] Improve error message when the path does not exist
i.e. the composer.json has a typo
2012-11-12 07:33:15 +01:00
Victor Berchet ff5c428d60 [ClassMapGenerator] Refine the findClasses method
The code could not throw
2012-11-12 07:32:47 +01:00
Jordi Boggiano 5f3814bd05 Add test building phar and run functional tests with the phar, refs #1155 2012-11-11 17:09:57 +01:00
Jordi Boggiano 5a763cf010 Fix scanning of empty namespace{} blocks 2012-11-11 16:29:49 +01:00
Jordi Boggiano 62d0ea7656 Circumvent cache in functional tests 2012-11-11 15:52:37 +01:00
Jordi Boggiano 374e16beec Merge branch 'autoloadmulti' 2012-11-11 15:35:28 +01:00
Jordi Boggiano 5a9d986e67 Implement cache GC and fix keys 2012-11-10 23:17:36 +01:00
Jordi Boggiano 487e66d0a9 Allow loading of multiple composer autoloaders concurrently, fixes #1248 2012-11-10 21:54:23 +01:00
Jordi Boggiano 6d38709fe8 Fix create project test 2012-11-10 19:42:29 +01:00
Jordi Boggiano 6a9215012d Merge remote-tracking branch 'igorw/dep-manager-consistent-naming' 2012-11-08 15:05:46 +01:00
Jordi Boggiano 4f5d08e2ad Add InvalidRepositoryException 2012-11-08 15:05:00 +01:00
Igor Wiedler 4959c2bdc6 Replace references of a11n with a12n where appropriate
Authorization => Authentication.
2012-11-07 13:34:31 +01:00
Igor Wiedler e7c7e2f70d Consistently describe composer as dep mgr as opposed to package mgr
Closes #1207.
2012-11-07 13:16:47 +01:00
Jordi Boggiano bb685d9c7f Fix license validation and add feedback of values to ease reading 2012-11-05 20:04:29 +01:00
Jordi Boggiano cbd91b5952 Fix FILTER_VALIDATE_URL not supporting IDNs 2012-11-05 15:39:43 +01:00
Jordi Boggiano e05391dc44 Improve validating array loader to avoid false positives 2012-11-05 14:18:04 +01:00
Jordi Boggiano 967c771b26 Add warnings to ValidatingArrayLoader that are simply stripped by default, add reporting of warnings when loading branches 2012-11-05 12:08:02 +01:00
Jordi Boggiano 1682532b80 Update code to use new github archive URLs 2012-11-04 14:01:22 +01:00
Jordi Boggiano 0878c6deab Fix nodeload fallback URLs 2012-11-04 11:19:28 +01:00
Jordi Boggiano 4b531771bd Add validators for package links and minimum-stability 2012-11-02 15:14:09 +01:00
Jordi Boggiano 1c39ad779b Fix wording 2012-10-31 18:34:27 +01:00
Jordi Boggiano 5d78fa6ce6 Report typos in package name if no version matches 2012-10-31 18:20:54 +01:00
Chris Smith 7681b4cc85 Add test covering the new and old repository formats 2012-10-22 22:44:56 +01:00
Jordi Boggiano 083ca464b3 Merge remote-tracking branch 'johnkary/cliEvents' 2012-10-22 18:57:51 +02:00
Jordi Boggiano bebd1ce9c7 Always check for OAuth token in git config, fixes #1243 2012-10-22 17:11:34 +02:00
Jordi Boggiano 7aab7c6297 Fix StreamContextFactory tests 2012-10-21 17:57:16 +02:00
Jordi Boggiano 39e69a3b12 Refactor OAuth acquisition code to generalize it 2012-10-21 17:56:57 +02:00
Jordi Boggiano 573e4b2a7c Merge branch 'newrepo' 2012-10-21 14:18:00 +02:00
Jordi Boggiano a59a5c4581 Merge remote-tracking branch 'simensen/sem-version-support' 2012-10-19 13:55:47 +02:00
Jordi Boggiano 44c271a477 Merge remote-tracking branch 'simensen/less-than-dev' 2012-10-19 13:43:03 +02:00
Jordi Boggiano ed9fcc5074 Fix tests 2012-10-19 12:25:53 +02:00
Jordi Boggiano 0a3097c569 Merge remote-tracking branch 'bboer/feature/svn-alternative-structures'
Conflicts:
	src/Composer/Repository/Vcs/GitHubDriver.php
2012-10-19 12:19:19 +02:00
Jordi Boggiano e0ce22f7cc Fix tests 2012-10-18 18:43:31 +02:00
Jordi Boggiano e79e7dcd8d Merge remote-tracking branch 'hason/classgenerator' 2012-10-17 17:19:23 +02:00
Jordi Boggiano f752b29fc6 Always make sure we are on the right branch 2012-10-17 17:15:49 +02:00
Martin Hasoň 1ff1b8ac1f Sorted generated classmap 2012-10-17 12:00:45 +02:00
Martin Hasoň c63f0d9642 Preserved original position of package if required packages are before this 2012-10-17 10:50:53 +02:00
Jordi Boggiano 3068f29b4f Checkout branch by name when the current reference matches the branch tip, fixes #1164 2012-10-17 10:49:54 +02:00
Martin Hasoň e75abcbb41 Fixed order of packages in the classmap autoloader 2012-10-17 01:40:15 +02:00
Martin Hasoň b683aeb586 Fix expected values in tests for autoloader generator 2012-10-17 01:00:11 +02:00
Jordi Boggiano beb9a5bd72 Code optimizations: avoid loops in match() 2012-10-14 16:35:32 +02:00
Jordi Boggiano 18492a1f84 Remove Pool::getMaxId and the solver's reliance on it 2012-10-12 18:45:41 +02:00
Jordi Boggiano ff2f9de128 Fix tests 2012-10-11 21:25:13 +02:00
Jordi Boggiano fb4183d5ad Fix tests 2012-10-08 20:05:42 +02:00
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
2012-10-08 10:44:37 -07:00
Jordi Boggiano 5cb9a6ead7 Write in the json directly without reformatting the whole file - skip validation since that is not really the job of the config command 2012-10-07 19:18:22 +02:00
John Kary 06eb4027a7 Make test less brittle
Shouldn't really care about whether the IO is touched.
That's the test knowing too much about the implementation.
2012-10-07 09:46:44 -05:00
John Kary 88650f9333 Add test for intermixing PHP callables and CLI commands in a single event's script stack
Wrapped execution of the PHP callable in its own method in order to mock/test it
2012-10-06 22:37:52 -05:00
John Kary 5aa3762c09 Expand tests for valid CLI command from script 2012-10-06 21:54:52 -05:00
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
2012-10-06 07:49:11 -07:00
John Kary be90496952 Add ability to call CLI-based commands from an event 2012-10-05 23:37:26 -05:00
Jordi Boggiano 62bb5b339b Allow parsing of stability modifiers combined with multi-constraints 2012-10-05 19:05:39 +02:00
Jordi Boggiano b3077bc4bc Merge pull request #1177 from sandermarechal/stream-context
Allow setting stream context options
2012-10-04 09:18:08 -07:00
Sander Marechal 11b5b5944d Improved argument order 2012-10-03 18:51:42 +02:00
Sander Marechal 748c4764ba Unittest for stream options 2012-10-03 15:09:47 +02:00
Jordi Boggiano 4998bab944 Show warning if the svn binary is missing 2012-10-03 11:14:37 +02:00
Jordi Boggiano 027037bb9f Fix dist urls for lock files and hardcoded references 2012-09-27 20:23:51 +02:00
Jordi Boggiano 5b1782970f Fix test for new lock format 2012-09-27 18:44:53 +02:00
Jordi Boggiano a9afa8bc1f Merge remote-tracking branch 'mheleniak/prefer_dist' and fix dists
Conflicts:
	src/Composer/Installer.php
	src/Composer/Package/Locker.php
2012-09-27 18:36:55 +02:00
Martin Hasoň 29034ea3e0 Added support for the root package in the array dumper 2012-09-19 23:08:37 +02:00
Jordi Boggiano 8d7e5cdda5 Fix target-dir with multiple slashes too 2012-09-19 11:25:49 +02:00
Jordi Boggiano a9195eb05f Add a couple test cases 2012-09-18 18:32:24 +02:00
Jordi Boggiano f377e9ca87 Fix possible vendor-dir "evasion" via target-dir 2012-09-18 18:30:11 +02:00
Jordi Boggiano ebc9c73008 Merge remote-tracking branch 'TheFootballSocialClub/loader-singleton' 2012-09-18 10:52:03 +02:00
Jordi Boggiano 418e876e8a Use only the locked repository when possible for better performance 2012-09-14 17:42:12 +02:00