1
0
Fork 0
Commit Graph

7364 Commits (bf72afec44152315afcbb55438417aa783c1177a)

Author SHA1 Message Date
Matthias Pigulla 54cf9aeb46 Make sure the target-dir exists 2011-12-10 00:24:02 +01:00
Matthias Pigulla 4e1cb32f8c Allow for file://-URLs here as well 2011-12-09 23:37:52 +01:00
Matthias Pigulla 2fc8e06d81 hg repos must not be hosted somewhere in particular, but detection may become expensive.
Additionally, suppress warnings and support file://-local repos
2011-12-09 23:10:31 +01:00
digitalkaoz 9a50fd6492 added validate task, closes #81 2011-12-08 11:42:26 +01:00
digitalkaoz 6451087039 added a show command for packages 2011-12-07 22:42:58 +01:00
Jordi Boggiano 381fcb248a Allow parsing of branches with invalid names but explicit versions in composer.json 2011-12-07 11:44:03 +01:00
Jordi Boggiano 283745d76d Do case-insensitive searches, avoid printing multiple results if multiple tokens match, highlight matched area 2011-12-06 23:07:47 +01:00
Jordi Boggiano c7deaa8a1f Add highlight style 2011-12-06 23:07:06 +01:00
Jordi Boggiano 8675d4eb6a Make search token required 2011-12-06 23:06:49 +01:00
Jordi Boggiano 8273579461 Merge remote-tracking branch 'digitalkaoz/command_refactorings' 2011-12-06 22:47:48 +01:00
Jordi Boggiano 139de0f79d Fix handling of git repos with no tag, fixes #146 2011-12-06 22:19:24 +01:00
digitalkaoz 6c870e23e0 added search command, colorized ouput, tiny fixes 2011-12-06 21:19:12 +01:00
digitalkaoz 87831d8c1c fixed typo 2011-12-06 21:13:04 +01:00
Nils Adermann a697488948 Merge pull request #142 from Seldaek/autoload_test
Autoload test
2011-12-04 13:44:59 -08:00
Jordi Boggiano 927be089ba Added more tests for Filesystem util and some fixes 2011-12-04 22:40:30 +01:00
Jordi Boggiano 304ce3b375 Fix relative target dirs 2011-12-04 22:13:11 +01:00
Jordi Boggiano 37df1a0d15 Fix self.version replacement 2011-12-04 21:58:42 +01:00
Jordi Boggiano a19695cdcb Tentative fix for *nix 2011-12-04 18:44:40 +01:00
Jordi Boggiano 4517a2e51e Added tests and fixed some incorrect behaviors in Filesystem 2011-12-04 18:35:45 +01:00
Jordi Boggiano bc88d86983 Make use of Filesystem class in AutoloadGenerator 2011-12-04 18:35:44 +01:00
Nils Adermann 71a6b47e90 Merge pull request #140 from Seldaek/bins
Add binaries support
2011-12-04 09:31:43 -08:00
Jordi Boggiano 3be6511af7 Fix unixy proxy under git-bash 2011-12-03 21:54:54 +01:00
Jordi Boggiano 725850c521 Fix github ssl bypass with http:// urls 2011-12-03 21:40:02 +01:00
Jordi Boggiano f0d8626993 Cleanups 2011-12-03 21:20:20 +01:00
Jordi Boggiano 9028546c5a Move bin dir to a subdir of vendor 2011-12-03 20:47:02 +01:00
Jordi Boggiano 7e3f8099b1 Add proxy files for windows instead of copying, removed PEAR-style substitution 2011-12-03 20:44:00 +01:00
Jordi Boggiano aa94918d50 Add binaries support in composer 2011-12-03 15:39:06 +01:00
Jordi Boggiano 456d442f6e Fix bootstrap 2011-12-03 12:46:28 +01:00
Jordi Boggiano 2e8762744f Fix ComposerRepository ctor 2011-12-03 12:43:38 +01:00
Jordi Boggiano aacdcb1570 Allow self-update to be called outside of a project context 2011-12-03 11:57:59 +01:00
Jordi Boggiano 7fa74f8f8e Add COMPOSER env var to override the composer.json file name 2011-11-30 21:50:11 +01:00
Jordi Boggiano 94e277698e Delay bootstrap until it's really necessary, fixes #121 2011-11-30 21:30:51 +01:00
Jordi Boggiano 3ebfbd78ac Merge remote-tracking branch 'jsor/install_update_flags' 2011-11-30 21:11:15 +01:00
Nils Adermann 64e925cd89 Merge pull request #136 from Seldaek/svndriver
Add SvnDriver for the VcsRepository
2011-11-28 13:31:48 -08:00
Jordi Boggiano b8a9bf7b60 Fix typo 2011-11-28 20:58:16 +01:00
jsor 28a8b3e4c5 Fix link collection 2011-11-28 08:51:00 +01:00
Jordi Boggiano 1277277ec6 Fix CS 2011-11-27 20:25:30 +01:00
Jordi Boggiano 8df7eb0475 Add SvnDriver for the VcsRepository 2011-11-27 20:07:42 +01:00
Jordi Boggiano 9f55335011 Expose the Driver of the VcsRepository 2011-11-27 20:02:28 +01:00
jsor e512e16e35 Rename flags after feedback in #132 2011-11-25 18:01:12 +01:00
jsor 9af21fd461 Install recommended deps by default and introduce flags for including/excluding required/recommended/suggested deps 2011-11-25 16:44:50 +01:00
Jordi Boggiano eef37c450f Fix error detection to support replaces and provides 2011-11-24 09:57:08 +01:00
Jordi Boggiano e340022cce Allow the use of self.version in package links 2011-11-23 16:47:23 +01:00
Jordi Boggiano 22858e81ef Fix .* version constraints parsing to include nonstable versions 2011-11-23 16:41:27 +01:00
Jordi Boggiano 0d304550b5 Clarify error message when packages are not found, fixes #128 2011-11-22 11:09:59 +01:00
Jordi Boggiano 68512714f4 Fix update command by using remove+install (and for now ignoring uninstalls of non-existing packages) 2011-11-21 18:18:06 +01:00
Jordi Boggiano f2662b193d Add --dry-run option and list all operations on --verbose 2011-11-21 17:56:21 +01:00
Jordi Boggiano d020f2701d Merge pull request #118 from naderman/priority-replace-any-version
Replaced packages have higher priority even if wrong version is replaced
2011-11-21 08:30:40 -08:00
Jordi Boggiano 3544b415a3 Merge pull request #122 from naderman/add-rule-peformance
addRule peformance improvement
2011-11-21 08:06:41 -08:00
Nils Adermann 5d5d6462e3 Correctly declare all literal properties 2011-11-21 16:14:16 +01:00
Nils Adermann 40b33914b3 Compute rule hashes for faster duplicate detection 2011-11-21 16:04:33 +01:00
Nils Adermann 69f55d37bb Generate literal ids only once and use in equals()
Significant speedup because equals and getId() are called so frequently.
2011-11-21 16:04:26 +01:00
Nils Adermann bca746c947 Don't consider a revert to level 1 (base level) in sat solver a failure 2011-11-21 15:02:42 +01:00
Nils Adermann b717ad8851 Display rules in more readable format 2011-11-21 15:01:10 +01:00
Jordi Boggiano cb44ba8325 Fix autoload handling of main project 2011-11-21 11:33:30 +01:00
Jordi Boggiano f5b7e968b2 Minor adjustments to merged PR 2011-11-20 22:03:11 +01:00
Jordi Boggiano 5b87a02767 Merge remote-tracking branch 'prodigitalson/master' 2011-11-20 21:43:31 +01:00
Jordi Boggiano 8a127ed131 Fix URL handling for PEAR repositories 2011-11-20 21:33:54 +01:00
Jordi Boggiano 4fdc602037 Make VcsRepository drivers configurable 2011-11-20 21:23:50 +01:00
Jordi Boggiano 63d52b3e1b Minor fixes to allow branch -dev versions 2011-11-20 21:13:17 +01:00
Jordi Boggiano de111b73dd Add homepage to MemoryPackage 2011-11-20 19:35:43 +01:00
Jordi Boggiano aab9116f67 Add description to MemoryPackage 2011-11-20 19:30:35 +01:00
Jordi Boggiano 52a9014f1a Add prettyConstraint on Links 2011-11-20 18:56:00 +01:00
Jordi Boggiano a54ec23e38 Fix typo 2011-11-20 16:56:24 +01:00
Jordi Boggiano a13c35537c Add parsing of keywords/authors/release date to the ArrayLoader 2011-11-20 16:51:04 +01:00
Jordi Boggiano 3b8ee5dd54 Use pretty name/version in lock file and debug:packages, fixes #98 2011-11-20 15:42:32 +01:00
Jordi Boggiano 8e6f8ae57e Add prettyVersion to packages, fixes #76 2011-11-20 15:06:12 +01:00
Nils Adermann 46e1001b4b Replaced packages have higher priority, even if wrong version is replaced 2011-11-19 15:00:56 +01:00
Nils Adermann 4140f08d9c Use a map of installed package ids in the solver
The assumption package.repo == installed no longer holds for installed
packages because there are multiple wrapped installed repositories.
2011-11-19 00:27:35 +01:00
Ant Cunningham e0400773f7 Adding support for configurable vendor path in composer.json. 2011-11-18 13:31:50 -05:00
Ben Bieker 0e6f3834ec Added an SvnDownloader
The Svn Downloader can be used like the already implemented
GitDownloader, for example

{
    "name": "my-project",
    "version": "1.0.0",
    "repositories": {
        "MyRepo": {
            "package": {
                "name": "mypackage",
                "version": "2.0",
                "source": {
                    "url": "https://repo.com/svnrepo",
                    "type": "svn",
                    "reference": "tags/v2.0"
                }
            }
        }
    },
    "require": {
        "mypackage": "2.0"
    }
}
2011-11-17 16:56:01 +01:00
Jordi Boggiano 761ad6d171 Only allow self-updates when called from within a phar 2011-11-16 13:50:32 +01:00
Jeremy Mikola be6b748426 Fix reference to invalid branch name variable 2011-11-16 01:03:01 -05:00
Jordi Boggiano e6710e311c Merge remote-tracking branch 'webfactory/mercurial-support' 2011-11-15 15:12:15 +01:00
Jordi Boggiano 8a2afee55f Rethrow on unexpected failures 2011-11-15 14:59:49 +01:00
Jordi Boggiano b4ec1b36c4 OpenSSL is not required to clone git repos 2011-11-15 13:34:13 +01:00
Jordi Boggiano 22a93e7273 Check we have a driver before using it 2011-11-15 11:54:26 +01:00
Jordi Boggiano 1fd9174c0d Fix auto-date parsing in GitDriver 2011-11-15 11:53:26 +01:00
Jordi Boggiano b350dda0fe Skip GitHub driver if openssl is disabled 2011-11-15 11:29:25 +01:00
Jordi Boggiano 418e2e28f3 Merge remote-tracking branch 'chEbba/tar-phar-downloader'
Conflicts:
	src/Composer/Downloader/PearDownloader.php
2011-11-15 11:20:47 +01:00
Jordi Boggiano 3ad905ae99 Lift openssl requirement for github archives (thanks @pborreli) 2011-11-15 11:07:05 +01:00
Jordi Boggiano 61d17524b8 Merge remote-tracking branch 'origin/master' 2011-11-15 10:51:32 +01:00
Joseph Bielawski d6cd6a4aef Use `RuntimeException` instead of `UnexpectedValueException` when zip extension is not enabled 2011-11-14 23:05:08 +01:00
Igor Wiedler 3c036428de replace current file in self-update command 2011-11-13 00:31:38 +01:00
Igor Wiedler b2f71dcb6a trim getcomposer.org/version output 2011-11-13 00:23:10 +01:00
Igor Wiedler 6697385ee2 also check for non-zero status code for git command 2011-11-13 00:22:52 +01:00
Igor Wiedler b15ec17a06 implement a self-update command (closes #83) 2011-11-12 19:44:28 +01:00
Per Bernhardt b969309440 Register new drivers... 2011-11-12 13:23:47 +01:00
Per Bernhardt bf21dfeb31 Added drivers for bitbucket (hg and git) 2011-11-12 13:22:41 +01:00
Per Bernhardt ad8e85ab32 Previous change was wrong... We want to update to a specific version, so hg pull -u won't work. 2011-11-12 12:05:27 +01:00
Per Bernhardt ee508725c6 Simpler 2011-11-12 10:27:45 +01:00
Jordi Boggiano e060ead6c2 Use script-safe git argument to check for modifications 2011-11-11 12:02:08 +01:00
Per Bernhardt 38198a5f36 Fixed blank lines. 2011-11-10 13:39:51 +01:00
Per Bernhardt b0d2897af3 Fixed unused variables. 2011-11-10 13:12:19 +01:00
Per Bernhardt 3e5fd85768 Fixed CS and unused variables 2011-11-10 13:10:05 +01:00
Per Bernhardt ee4d4ee3fa Added HgDriver for the VcsRepository 2011-11-10 11:58:48 +01:00
Per Bernhardt 25e86fc6c9 Merge remote-tracking branch 'upstream/master' into mercurial-support 2011-11-10 11:04:42 +01:00
Henrik Bjørnskov 25fa4ec60c Rename HelpCommand to AboutCommand
Because of the native Symfony\Component\Console\Command\HelpCommand it
is not possible to have a custom HelpCommand unless a lot of code is
duplicated. Therefor change the HelpCommand to AboutCommand.
2011-11-08 11:51:01 +01:00
Per Bernhardt c6e4984a62 New downloader for mercurial 2011-11-08 09:14:34 +01:00
Henrik Bjørnskov f85a31e2b0 Change the wording and link directly to packagist.org. 2011-11-07 14:30:01 +01:00
Henrik Bjørnskov 247f237f93 HelpCommand
Simple HelpCommand that displays the same information about Composer
that is availible in the README.md file.
2011-11-07 14:19:15 +01:00
Henrik Bjørnskov 8180117584 AutoloadGenerator.php miscalculates the path
Add tenary check to make sure relative specified paths arent seen as
absolute.

Fixises #94
2011-11-07 09:29:37 +01:00
Nils Adermann 20db55e3aa Merge pull request #88 from Seldaek/installerinstaller
Add InstallerInstaller, refactored AutoloadGenerator, fixes #59
2011-11-06 16:08:52 -08:00
Jordi Boggiano 4b5abaf44f Fixes in PEAR support 2011-11-06 20:24:52 +01:00
Jordi Boggiano 1a7bf8a7f8 Bugfixes 2011-11-06 01:09:48 +01:00
Jordi Boggiano b7f6cf69ab Add tests and fixes some issues 2011-11-05 23:54:05 +01:00
Jordi Boggiano d4b7f802df Fix typos 2011-11-05 23:54:03 +01:00
Jordi Boggiano c8859240d2 Add InstallerInstaller, refactored AutoloadGenerator, fixes #59 2011-11-05 23:54:01 +01:00
Jordi Boggiano f572bbb0bf Allow JsonLoader to load by file name 2011-11-05 23:53:40 +01:00
Jordi Boggiano 293c45fabe Fix unescaped backslash issue 2011-11-05 23:53:20 +01:00
Jordi Boggiano 4002cab25b Merge pull request #87 from Seldaek/vcs
Add VCS Repository and Git + GitHub drivers
2011-11-04 08:15:34 -07:00
Jordi Boggiano 60db5d2c3b Adjust phar compiler to work with composer autoloader 2011-11-04 11:11:06 +01:00
Jordi Boggiano f2ab4d08e5 Fetch default HEAD branch from remote 2011-11-04 10:07:31 +01:00
Jordi Boggiano b6537324ef Change to GitHub API v3 and fetch default branch 2011-11-04 09:59:55 +01:00
Nils Adermann 2b476ce2c4 Merge pull request #80 from Seldaek/inception
Make composer use itself for installing itself to install itself
2011-11-03 15:38:17 -07:00
Jordi Boggiano 5e3c55f171 Add support for multiple packages defining the same namespace prefix 2011-11-03 21:10:39 +01:00
Jordi Boggiano bd712db727 Reverse-orders namespaces by specificity 2011-11-03 21:05:01 +01:00
Jordi Boggiano 0cfbea624e Add warnings if OpenSSL is not enabled, fixes #84 2011-11-03 19:58:49 +01:00
Jordi Boggiano 82c1170fa1 Allow any package type to be installed by the default installer, fixes #86 2011-11-03 19:41:17 +01:00
Jordi Boggiano 1844940a39 Stricter validation for the repositories config 2011-11-03 19:32:28 +01:00
Jordi Boggiano 4c2e8596aa Add VCS Repository and Git + GitHub drivers 2011-11-03 19:24:20 +01:00
Jordi Boggiano 066a0db752 Add detection for unescaped backslashes 2011-11-01 16:02:56 +01:00
Jordi Boggiano f5aa3e6c79 Add detection for extra commas in arrays 2011-11-01 14:13:22 +01:00
Jordi Boggiano 0d5f6a8269 Make composer use itself for installing itself to install itself to install itself 2011-11-01 00:08:03 +01:00
Nils Adermann bca917db49 Merge pull request #79 from Seldaek/json_parsing
Add more json validation rules
2011-10-31 08:57:02 -07:00
Jordi Boggiano c129d570e8 Add more json validation rules 2011-10-31 15:01:46 +01:00
Nils Adermann 5bd1722d7e Merge pull request #77 from benja-M-1/master
Fix the exception "Invalid argument supplied for foreach()"
2011-10-30 16:24:05 -07:00
Benjamin Grandfond 72bfe8b92c Fix Exception in Request
Fix the exception "Invalid argument supplied for foreach()" when the
install command is launched multiple times.
2011-10-30 23:53:44 +01:00
Jordi Boggiano 1feebcafe2 Add update command, fixes #28 2011-10-30 23:16:12 +01:00
Jordi Boggiano 7493cf7654 Fix locked installs 2011-10-30 22:56:10 +01:00
Jordi Boggiano 9108a3af7f Fix PlatformRepo packages not being seen as installed 2011-10-30 22:09:00 +01:00
Jordi Boggiano 8aaac35ca1 Make installer type case insensitive 2011-10-30 22:01:37 +01:00
Jordi Boggiano 6b6d6b6d82 Add --dev flag to InstallCommand to do source installs, fixes #26 2011-10-30 20:59:41 +01:00
Jordi Boggiano 36a724fa51 Search only for packages from the local repository in the locker 2011-10-30 20:29:52 +01:00
Jordi Boggiano 1ca3e5e5e2 Generate a map separated from the autoloader, fixes #74
Also the loader is now returned by the autoload.php
2011-10-30 20:29:06 +01:00
Jordi Boggiano b100df33d8 Make ArrayDumper and ArrayLoader reversible 2011-10-30 20:16:41 +01:00
Jordi Boggiano 4904e76185 Install every package in its own directory, fixes #73 2011-10-30 19:10:37 +01:00
Nils Adermann 56fab04c93 Merge pull request #71 from fabpot/filesystem-bug
Filesystem bug

Object of class Composer\Json\JsonFile could not be converted to string
2011-10-30 05:04:37 -07:00
Fabien Potencier 03b06ebbca Fix path for autoloaded libs as the .composer/ dir is now under the vendor/ one. 2011-10-30 09:51:16 +01:00
Fabien Potencier 1450ebd837 Fix bug in an exception, added unit tests 2011-10-30 09:09:46 +01:00
Nils Adermann e4f40272a3 Conflict handling: lastWeakWhy stores a rule, not a rule id 2011-10-29 20:05:06 +02:00
Nils Adermann 3e0e893f26 Correctly output decision map when debugging 2011-10-29 20:04:52 +02:00
Nils Adermann 85d38c653f Also detect updates resulting from feature rules rather than update rules 2011-10-29 19:39:18 +02:00
Nils Adermann 2056c4c732 Allow downgrades and uninstalls in the default policy 2011-10-29 19:23:52 +02:00
Jordi Boggiano d3aa8336dc Fix typo 2011-10-29 19:21:34 +02:00
Jordi Boggiano 1e0710b32f Move .composer into vendor (hardcoded for now) 2011-10-29 18:13:48 +02:00
Jordi Boggiano 305856f2f5 Merge pull request #68 from fabpot/small-opt
Move loader creation to avoid creating it more than once, unified the way
2011-10-29 07:12:14 -07:00
Nils Adermann 4827ea95e5 Merge pull request #69 from fabpot/added-exception
Add an exception when a Filesystem repository is corrupted
2011-10-29 03:36:03 -07:00
Fabien Potencier 5ffc349642 Add an exception when a Filesystem repository is corrupted 2011-10-29 07:48:23 +02:00
Fabien Potencier 527c711149 Move loader creation to avoid creating it more than once, unified the way packages are loading across repository classes 2011-10-29 07:43:26 +02:00
Fabien Potencier 9e7ebd9280 Fix autoload.php generator 2011-10-29 07:24:30 +02:00
Jordi Boggiano d16b928baf Add DebugPackagesCommand 2011-10-28 01:19:46 +02:00
Jordi Boggiano 220ab7f4ee Comments 2011-10-28 01:05:56 +02:00
Jordi Boggiano 23c1c40b3d Fix missing reference in local repository 2011-10-28 00:36:02 +02:00
Jordi Boggiano dcfe310cff Fix PEAR repository 2011-10-28 00:35:35 +02:00
Jordi Boggiano a263a3cb7d Dont enforce optional fields 2011-10-28 00:34:59 +02:00
Jordi Boggiano 89caa9b117 Rewrite autoloader to use only PSR-0, remove splitting of PEAR path 2011-10-27 22:09:01 +02:00
Jordi Boggiano c03a739548 Use psr-0 instead of psr0 2011-10-24 12:03:11 +02:00
Jordi Boggiano be47991b36 Build a standalone autoload file 2011-10-23 21:23:37 +02:00
Jordi Boggiano 8b0fee3f35 Fix platform packages not being added to the pool 2011-10-23 21:10:45 +02:00
Jordi Boggiano 5e52d5c1ad Fix tests 2011-10-23 19:55:43 +02:00
Jordi Boggiano b667cf98c2 Clone added packages in update 2011-10-23 19:40:42 +02:00
Jordi Boggiano 2b15c4321b Typo fix 2011-10-23 19:40:40 +02:00
Jordi Boggiano aeab3c16fd Add PackageRepository to define inline packages
Example:

{
    "repositories": {
        "Monolog": {
            "package": {
                "source": {
                    "url": "git://github.com/Seldaek/monolog.git",
                    "type": "git",
                    "reference": "1.0.1"
                },
                "version": "1.0.1",
                "name": "monolog/monolog"
            }
        }
    }
}
2011-10-23 19:40:36 +02:00
Jordi Boggiano 9b24734c9d Add parsing and on-the-fly loading of repositories defined in packages 2011-10-23 19:40:34 +02:00
Jordi Boggiano 17286e993c Add exception when json files can not be read 2011-10-23 19:40:32 +02:00
Jordi Boggiano 450095e61d Adjust RepositoryManager to handle multiple repositories of one type 2011-10-23 19:40:30 +02:00
Jordi Boggiano 33e7001d7e Fix typo 2011-10-23 19:40:26 +02:00
Jordi Boggiano c33fc80d23 Add supports() to the InstallerInterface 2011-10-23 19:40:24 +02:00
Jordi Boggiano 8a571c05db Fix issues in new autoloader code 2011-10-23 19:40:22 +02:00
Jordi Boggiano c8cfa15f52 Use wrapped PlatformRepository only in the Solver 2011-10-23 19:40:20 +02:00
Jordi Boggiano 28369ea623 Add missing docblock 2011-10-23 19:40:18 +02:00
Igor Wiedler 808a2c9448 [composer] wrap UniversalClassLoader require in if class_exists 2011-10-23 19:40:16 +02:00
Igor Wiedler aa7c4b8ef7 [autoload] refactor getFullPackage into populateAutoloadInformation 2011-10-23 19:40:14 +02:00
Igor Wiedler 9d238330b3 [autoload] refactor autoload generation code into a AutoloadGenerator 2011-10-23 19:40:12 +02:00
Igor Wiedler 72a1f66b7a rename installAs to target-dir 2011-10-23 19:40:10 +02:00
Igor Wiedler 409b2e47ae return early (this is very important) 2011-10-23 19:40:08 +02:00
Igor Wiedler ea31039556 [autoload] autoloading prototype 2011-10-23 19:40:06 +02:00
Nils Adermann 571c14adf9 Prefer original packages over replaced packages of same repository priority 2011-10-22 17:20:45 +02:00
Nils Adermann 44369472be Define the calculation of package priorities in a single method 2011-10-22 16:48:23 +02:00
Nils Adermann 1b6f57e651 Correctly implement priorities and version numbers in the default policy 2011-10-22 16:44:10 +02:00
Nils Adermann b52d6d881a Pool repository index represents priority, highest index = highest priority 2011-10-22 16:39:49 +02:00
Nils Adermann e4c94dd415 Adding tests for the default policy specifying its desired behaviour 2011-10-21 14:44:24 +02:00
Jordi Boggiano e09f6900da Fix up version parsing 2011-10-11 11:49:32 +02:00
Jordi Boggiano 19f89069a4 Add some more version normalization and support for branch names 2011-10-11 09:30:10 +02:00
Jordi Boggiano b3fe30200b Remove validation for now since it's doing more harm than good 2011-10-02 23:54:13 +02:00
Jordi Boggiano 7d4e67b335 Fix phar compiler 2011-10-02 23:38:54 +02:00
Jordi Boggiano be769ea1ac Add user-agent header to json fetches, fixes #39 2011-10-02 22:44:10 +02:00
Jordi Boggiano 2ebc795754 Error out when a package can not be found, refs #30 2011-10-02 21:24:09 +02:00
Jordi Boggiano 1a9de17a88 Detect and report common mistakes in json syntax, refs #36 2011-10-02 21:14:00 +02:00
Jordi Boggiano cad0967788 json_decode returns null on error, not false 2011-10-02 21:04:37 +02:00
Jordi Boggiano 9210500714 Handle false and empty decoded json values as valid 2011-10-02 20:49:26 +02:00
Jordi Boggiano 18e28a2a9f Make sure .composer dir is created before writing in it 2011-10-02 20:46:33 +02:00
Jordi Boggiano 806c5f200a Fix var name 2011-10-02 20:18:46 +02:00
Jordi Boggiano e109213dfa Merge remote-tracking branch 'everzet/json-abstraction' 2011-10-02 19:57:25 +02:00
Jordi Boggiano 9e3c2a7e22 Skip platform packages from the lock file
This should maybe be done in a better way, but it'll do for now.
2011-10-02 19:55:45 +02:00
Jordi Boggiano cc769af923 Reuse normal installer logic for locked installs 2011-10-02 19:54:53 +02:00
everzet d5ba884f8b fixed potential error 2011-10-01 17:06:14 +03:00
everzet 1cca62dc97 move json parsing instructions into single class object 2011-10-01 16:01:33 +03:00
everzet 96122aada8 refactored install command to use new Locker 2011-10-01 15:34:10 +03:00
everzet cc2f2b79ca added findPackage() method to the RepositoryManager and RepositoryInterface 2011-10-01 15:34:09 +03:00
everzet 21191ffa00 refactored PackageLock to Locker and stabilized it 2011-10-01 15:34:09 +03:00
everzet 1fcb833902 added Json parsing abstraction 2011-10-01 15:34:09 +03:00
Kirill chEbba Chebunin 6c4440d0e9 Add todo for signed phars 2011-09-30 22:58:58 +04:00
Kirill chEbba Chebunin 7527d0af43 Add throws declaration for FileDownloader::extract() 2011-09-30 22:46:09 +04:00
Igor Wiedler 2c1605925b ArrayLoader should not use require content for all other properties 2011-09-30 18:05:28 +02:00
Kirill chEbba Chebunin 43631ccd5b Add Tar and Phar downloaders 2011-09-30 01:07:17 +04:00
Jordi Boggiano 9cbd74bf90 Merge remote-tracking branch 'everzet/downloader-interface-refactoring' 2011-09-29 20:50:41 +02:00
everzet 195272da09 refactored DownloaderInterface to be mono-installation-type 2011-09-29 04:11:51 +03:00
everzet cc740249ff don't return useless info 2011-09-29 02:01:06 +03:00
Jordi Boggiano ebe2a25ec6 Merge remote-tracking branch 'wilmoore/feature/memory-package-test-refactor'
Conflicts:
	src/Composer/Package/MemoryPackage.php
2011-09-29 00:55:28 +02:00
Jordi Boggiano fda206400a Fix constraint parsing 2011-09-29 00:50:01 +02:00
Jordi Boggiano f48634d074 Add source/dist reference information to package 2011-09-29 00:49:23 +02:00
Jordi Boggiano 00a4fe2a14 Refactor downloaders, git installs actually work well now 2011-09-29 00:48:52 +02:00
Wil Moore III b70bb1a9bc memory-package-test-refactor: refactored the memory package test to be a bit more DRY and "hopefully" re-usable in anticipation of more package types being adding in the future. 2011-09-26 22:05:57 -06:00
Jordi Boggiano c863c31881 Rename platform packages so they avoid conflicts with any vendor 2011-09-27 01:10:21 +02:00
Jordi Boggiano da6566b343 Minor improvements to VersionParser 2011-09-26 20:34:58 +02:00
Jordi Boggiano 2e10b5c17e Expand normalization feature and adjust tests 2011-09-26 00:59:32 +02:00
Jordi Boggiano 46a67733f8 Adjust codebase to the new VersionParser 2011-09-26 00:01:22 +02:00
Jordi Boggiano f761cfe525 Refactored VersionParser 2011-09-26 00:01:14 +02:00
Jordi Boggiano d455eef82c Fix pear & zip downloaders 2011-09-25 23:43:49 +02:00
Jordi Boggiano 544067ced9 Packages can't be added to two repos at once 2011-09-25 23:43:21 +02:00
Jordi Boggiano e5907a3431 Remove WrapperRepository in favor of PlatformRepository wrapping the local repo 2011-09-25 23:42:40 +02:00
Jordi Boggiano b9114e16be Fix typos, short var names etc 2011-09-25 23:20:31 +02:00
Jordi Boggiano c6d7760145 Merge branch 'refactoring' 2011-09-25 23:09:07 +02:00
Jordi Boggiano 5623f3e69c Fix refactoring bugs 2011-09-25 23:07:42 +02:00
Jordi Boggiano 4fe80d7abb Add WrapperRepository class 2011-09-25 23:05:29 +02:00
Jordi Boggiano c7af918caa Fix git downloader 2011-09-25 22:19:27 +02:00
everzet c9ecb0d1ad Remove unused methods from downloaders 2011-09-25 21:00:59 +03:00
everzet 05ddfde868 Reflect latest refactoring changes in commands 2011-09-25 21:00:44 +03:00
everzet ef71836f30 Refactored Composer class to be service container 2011-09-25 21:00:26 +03:00
everzet 0694f5217a Implemented RepositoryManager 2011-09-25 21:00:05 +03:00
everzet 3c439ce41c Added "type" field validator to ArrayLoader 2011-09-25 20:59:54 +03:00
everzet 5890b05eb0 Implemented ArrayDumper 2011-09-25 20:59:40 +03:00
everzet 20318f77a0 Refactored FilesystemRegistry to FilesystemRepository 2011-09-25 20:59:10 +03:00
everzet 5c841187fd Fixed RepositoryInterface 2011-09-25 20:58:35 +03:00
everzet 28d9df7da6 Added hasPackage and removePackage methods to the ArrayRepository 2011-09-25 20:57:58 +03:00
everzet 2fc0699492 Moved operations evaluation into new InstallationManager class 2011-09-25 19:31:51 +03:00
everzet 50aa7ac607 Provide $useSource argument to the DownloaderInterface methods 2011-09-25 18:56:05 +03:00
everzet 17d1abcec0 Refactored DownloadManager 2011-09-25 18:30:54 +03:00
everzet 6133108710 Refactored LibraryInstaller to use WritableRepository instead of Registry 2011-09-25 15:44:41 +03:00
everzet 9f98ee25ea Enhanced repository interface 2011-09-25 15:44:05 +03:00
everzet 123f5fef77 Refactored Operations in order to fulfill naderman requests 2011-09-25 14:40:12 +03:00
Jordi Boggiano 751f506080 Add info to docblocks 2011-09-25 12:42:32 +02:00
Jordi Boggiano 8533a65061 Remove unused methods from RepositoryInterface 2011-09-24 16:55:46 +02:00
Jordi Boggiano e700e6fcd9 Use new version parser in PlatformRepository 2011-09-24 16:55:45 +02:00
Jordi Boggiano cd80f22781 Type is not mandatory 2011-09-24 16:55:43 +02:00
Jordi Boggiano d27691a67f Fix namespace/use/typo issues 2011-09-24 16:55:39 +02:00
everzet 0a1e7320b0 Refactored solver result array. Now it returns array of operation objects which are much nicer to work with 2011-09-24 02:29:22 +03:00
everzet 5b0d17cc13 DownloaderInterface refactored 2011-09-24 02:18:41 +03:00
everzet 69f1de9986 Enhanced PackageInterface and BasePackage with getUniqueName() method, which provides name-version-releaseType string (used in installer registry) 2011-09-24 02:11:32 +03:00
everzet cde9531e4d DownloadManager implemented 2011-09-24 02:09:51 +03:00
everzet 0a2f4e7e32 Installer now provides full download path to the downloader 2011-09-24 01:30:17 +03:00
everzet 45cab9fe8c Installers FilesystemRegistry implemented 2011-09-24 00:24:19 +03:00
everzet 067007656b LibraryInstaller refactored and tested 2011-09-24 00:23:16 +03:00
everzet 6ce0132259 fixed installer interface 2011-09-21 00:46:19 +03:00
everzet 9deb10361f second batch of refactoring 2011-09-21 00:43:53 +03:00
everzet d2150a3c2e installer and downloaders update 2011-09-21 00:42:13 +03:00
everzet d7fe0dfda4 added missing interfaces 2011-09-21 00:42:13 +03:00
everzet 6caa77fbbf installer refactoring 2011-09-21 00:41:16 +03:00
everzet 5f4d46f7ae repository factoring refactoring 2011-09-21 00:39:15 +03:00
everzet 1e1ecb80b7 initial refactoring 2011-09-21 00:38:23 +03:00
Joseph Bielawski 62bce6b9ed [Request] Be more DRY 2011-09-17 17:18:49 +03:00
Jordi Boggiano 6b5f61943a Lowercase package names in Request (fixes tests) 2011-09-17 13:23:17 +02:00
Jordi Boggiano aeebd02ee5 Cleanup for last merged commit 2011-09-17 13:18:34 +02:00
Jordi Boggiano 89f49e0e14 Merge pull request #17 from chEbba/interfaces
Add Dowloader and Installer interfaces
2011-09-17 04:16:28 -07:00
Jordi Boggiano 9b70b06bc8 Merge remote-tracking branch 'ryan/use_symfony_command'
Conflicts:
	bin/composer
	src/Composer/Command/InstallCommand.php
2011-09-17 12:04:33 +02:00
Kirill chEbba Chebunin 74a45cfb8c Remove public keyword from Downloader and Installer interface methods 2011-09-16 01:26:32 +04:00
Kirill chEbba Chebunin e317b4f8ef Add Dowloader and Installer interfaces 2011-09-15 23:58:00 +04:00
Ryan Weaver b1fcbe9dde Simplifying how composer initializes its commands 2011-09-15 06:58:57 -05:00
Jordi Boggiano 07e181c6eb Fix lowercase behavior 2011-09-15 11:50:50 +02:00
pborreli f7735c396f [Composer] Fixed typos 2011-09-15 01:22:33 +00:00
Ryan Weaver cf11b48306 Making several tweaks per @stof 2011-09-14 10:34:53 -05:00
Nils Adermann b6ec172997 Merge pull request #13 from igorw/case-insensitive-package
Make package names and downloader/installer/repository types case insensitive
2011-09-14 07:06:57 -07:00
Igor Wiedler 9e8fc71870 Make package names and downloader/installer/repository types case insensitive 2011-09-14 16:01:54 +02:00
Ryan Weaver f5b054985a Integrating the command system with Symfony's command system
Parts are still a WIP, as there are some embedded echo statements that should eventually be run through some sort of output interface.
2011-09-14 07:57:40 -05:00
Ryan Weaver 61917cb7f7 Adding Symfony's Console component as a submodule 2011-09-14 07:55:06 -05:00
Ryan Weaver 96b51c59d8 Adding some basic PHPDoc 2011-09-14 06:52:21 -05:00
Ryan Weaver d13a2e928e Removing reference to Silex, replacing with Composer 2011-09-13 19:34:48 -05:00
Jordi Boggiano 900bed1c32 Normalize package names 2011-09-13 02:24:44 +02:00
Igor Wiedler 1e5aaefaf5 Force empty lock files to contain a JSON object
By default it will make it an array, since PHP does not distinguish between
arrays and hash(map)s.
2011-09-12 16:59:05 +02:00
Jordi Boggiano 2b77710515 RC versions don't need a number 2011-08-21 13:33:42 +02:00
Jordi Boggiano 071fa7a4d7 Merge Solver logic into the install command 2011-08-21 13:33:39 +02:00
Jordi Boggiano ba9f12a517 Add extra and type info to packages 2011-08-21 13:33:37 +02:00
Nils Adermann 4dbb73daba Use an SplFixedArray for the solver's decision map 2011-08-21 07:30:10 -04:00
Nils Adermann b1d16a88b7 Test a replace link with a null constraint between packages 2011-08-21 07:08:34 -04:00
Nils Adermann 69ebbf0eac Correct handling of rules with more than 2 literals. 2011-08-21 06:30:06 -04:00
Nils Adermann 6cf8d3888c Use version contraints in the default policy rather than hardcoded version_compare 2011-08-20 23:05:39 -04:00
Nils Adermann 03642a40b4 Handle the = comparison operator for versions the same as == 2011-08-20 23:04:16 -04:00
Nils Adermann 6118c00086 Implement minimization of branches 2011-08-20 23:03:52 -04:00
Nils Adermann 0f6fb9b692 Separate transaction generation from solving and properly identify updates 2011-08-20 18:38:31 -04:00
Nils Adermann f46aa495da Turn obsolete relationships and replaced packages into conflict rules 2011-08-20 18:19:47 -04:00
Nils Adermann 52565a5935 Implement handling of conflicts with learned rules 2011-08-20 13:45:20 -04:00
Nils Adermann b0c685176b Correct branch handling and implement reverting of decisions at a particular level 2011-08-20 13:36:18 -04:00
Nils Adermann 37e676cedd Implement analysis of conflicting rules 2011-08-20 13:21:24 -04:00
Nils Adermann 6d157b325d Package ids are always positive, so use absolute literal value for package id 2011-08-20 13:21:24 -04:00
Nils Adermann ad25618bdd Add install job and update rule conflict handling and reenable installation 2011-08-19 06:15:51 -04:00
Nils Adermann 1125de6bf2 Added disablePolicyRules to solve conflicts between remove jobs & update rules
This temporarily breaks installation of packages
2011-08-19 06:06:00 -04:00
Nils Adermann 0d30bc469b In the default policy compare object ids to avoid recursion. 2011-08-05 04:14:11 -04:00
Nils Adermann 61ad71b624 Reverse the transaction instruction order.
Early decisions cause later ones through dependencies. So in order to
perform the earlier decisions the later ones must be fulfilled first.
2011-08-05 04:14:11 -04:00
Jordi Boggiano 6fc243cbd6 Remove useless file 2011-08-03 23:59:36 +02:00
xaav 1607ac2404 Added phar compiler 2011-08-03 23:57:27 +02:00
Jordi Boggiano 256955f0f7 Minor code cleanup 2011-07-21 13:53:39 +02:00
Nils Adermann 825deff09f Completed analysis of unsolvable situations and main decision process 2011-07-08 07:11:04 -04:00
Jordi Boggiano 49c3446ac1 Make use of new dist properties, refactored ZipDownloader 2011-07-06 21:06:52 +02:00
Jordi Boggiano 64978d40ba Add dist properties to the Packages 2011-07-06 21:05:05 +02:00
Jordi Boggiano d6ae5ddf35 Add 'dev' flag to version parser 2011-07-06 21:04:37 +02:00
Jordi Boggiano 10486d8505 Better error reporting for incorrect repo specs 2011-06-28 20:43:01 +02:00
Jordi Boggiano f272f66324 Fixes and improvements to the PEAR implementation 2011-06-28 20:42:59 +02:00
Jordi Boggiano 75428d9ad1 Slightly improve reporting when json config files can't be parsed 2011-06-28 20:42:57 +02:00
Jordi Boggiano 75410d13b7 Bugfix 2011-06-28 20:42:55 +02:00
Jordi Boggiano 5b061b8ddb Remove TODO 2011-06-28 20:42:53 +02:00
xaav 74332da349 Using copy function. 2011-06-28 20:42:51 +02:00
Benjamin Eberlei fa613cad19 Rewrite PearRepository to implement PEAR Client/Server protocol itself, taking longer then pear remote-list, but at least showing ALL available versions, making arbitrary dependencies possible. 2011-06-28 20:42:50 +02:00
Benjamin Eberlei 8afc2ca694 Add support for PEAR repository and downloading, example composer.json would look like {"repositories":{"doctrine": {"pear":"http://pear.doctrine-project.org"},"requires":{"DoctrineORM":"2.0.5"}}. You can use pear repositories this way for now. PEAR packages are not downloaded via pear, only via their .tgz packages in the PEAR repository. Automatically detecting dependencies will require reverse-engineering the PEAR protocol a little bit more, however from looking at a pirum output it looks simple. 2011-06-28 20:42:48 +02:00
Nils Adermann c225b4c689 Correctly match platform specific PHP version numbers 2011-06-27 00:12:51 +02:00
Nils Adermann bc672deb32 Moving rule iteration logic to a separate RuleSet and RuleSetIterator class 2011-06-27 00:11:57 +02:00
xaav e1e7bb03be Edited src/Composer/Downloader/ZipDownloader.php via GitHub 2011-06-14 14:25:29 -07:00
Jordi Boggiano 52888f193d Fix version parsing of PHP on some linux distros 2011-06-08 17:47:34 +02:00
Jordi Boggiano ae922eaf4c Use ReflectionExtension to read ext versions 2011-06-08 11:41:52 +02:00
Jordi Boggiano 3524d0388a Fixed use statement 2011-06-08 11:32:41 +02:00
Nils Adermann 498125adbe Assertions are now properly decided before running the main solver.
Updating does not work yet. The test case works fine for installing/removing
the correct packages however. Weak (update/feature) rules are entirely ignored
so far.

Watches are on literal ids rather than literals to save on function calls
and memory usage. So a few methods for literals now have an id counter part.
This should probably be refactored to have the literal versions call the
id ones instead.
2011-06-07 22:43:26 +02:00
Jordi Boggiano bb52105c37 Add GitRepository class 2011-06-06 11:07:12 +02:00
Jordi Boggiano 1eb2a46308 Don't chdir() while cloning git repos 2011-06-06 11:01:06 +02:00
Jordi Boggiano 14fdd4384a Better reporting during installation 2011-06-06 11:01:04 +02:00
Jordi Boggiano 04783d5c30 CI match on package names 2011-06-06 11:01:02 +02:00
Nils Adermann 2e41993822 Update solver to use PackageInterface and store pool package ids inside of packages 2011-06-03 18:27:44 +02:00
Nils Adermann 8cbf3f4d75 No need to unify rules, we already check for duplication on insertion 2011-06-03 18:03:12 +02:00
Jordi Boggiano 92d443d07e Fix arg order 2011-05-23 02:04:17 +02:00
Jordi Boggiano 48774ee6ca Fix Literal id generation 2011-05-23 02:00:21 +02:00
Jordi Boggiano 56da52d38f PlatformRepository now adds packages for every loaded php extension as well 2011-05-23 02:00:18 +02:00
Jordi Boggiano 05d527446b addPackage needs to trigger initialization too 2011-05-23 02:00:15 +02:00
Jordi Boggiano 575e520931 Fix MultiConstraint::__toString 2011-05-23 02:00:12 +02:00
Jordi Boggiano 1edb22034d Fix CS 2011-05-23 02:00:09 +02:00
Jordi Boggiano b620405ab0 Adjusted BasePackage::__toString() 2011-05-23 02:00:07 +02:00
Jordi Boggiano 27f02aba7d Fix version check in BasePackage 2011-05-23 02:00:05 +02:00
Jordi Boggiano a67a1637e1 Print more human-readable info 2011-05-23 02:00:03 +02:00
Jordi Boggiano 831f5219b6 Use spl_object_hash() instead of the package id which doesn't exist anymore 2011-05-23 02:00:00 +02:00
Jordi Boggiano b85c1a2780 Fix interfaces use statements/use interfaces for type hints 2011-05-23 01:59:57 +02:00
Nils Adermann 4dad9fa6ef Adding support for LinkConstraints to the solver requests.
Constraints are directly passed on to the pool's whatProvides method
which returns a set of packages that satisfy name and constraint conditions.
2011-05-22 23:54:48 +02:00
Nils Adermann 273e12e386 Rule unification 2011-05-22 19:40:52 +02:00
Nils Adermann f3d9c8701a Generate transaction from solver's final decision queue. 2011-05-22 19:40:41 +02:00
Jordi Boggiano ea71abb3fd Fixed line endings 2011-05-06 19:55:49 +02:00
Jordi Boggiano e43060eb72 Added exceptions and fixed CS of the ZipDownloader 2011-05-06 19:54:47 +02:00
Geoff 99d55792f6 Added ZipDownloader. 2011-05-01 21:31:06 -05:00
Jordi Boggiano 14b3325347 Fix version parsing 2011-04-23 22:25:10 +02:00
Jordi Boggiano d185194d1a Create links/constraints between packages 2011-04-23 20:52:37 +02:00
Jordi Boggiano b53a3086b6 Minor refactorings and changes 2011-04-21 21:13:14 +02:00
Nils Adermann f0af6b7d57 It's called a repository, not a registry 2011-04-18 22:48:51 +02:00
Nils Adermann 9b8ab7d710 Fix SpecificConstraint which only handles matching of instances of same constraint 2011-04-18 22:47:33 +02:00
Nils Adermann d5dd86cd75 Correct version contraint matching and add tests for various cases 2011-04-18 22:45:11 +02:00
Nils Adermann 8c9f8fb86f Rename RelationConstraints to Links in the Package namespace.
Constraints have been generalised to allow matching requiring and providing
constraints against each other.
2011-04-18 00:27:31 +02:00
Jordi Boggiano e03983697a Add base installer/downloader and ComposerRepository 2011-04-18 00:15:05 +02:00
Jordi Boggiano 2475ce47e4 Make ArrayRepository more extensible 2011-04-18 00:12:40 +02:00
Jordi Boggiano c6321e7277 Fix tests and invalid use statements 2011-04-17 23:45:37 +02:00
Jordi Boggiano 3da43e751d Update naming of repositories 2011-04-17 23:32:53 +02:00
Jordi Boggiano 6dbec8718d Remove contains() from RepositoryInterface 2011-04-17 22:59:23 +02:00
Jordi Boggiano f0e709ad09 Minor cleanups, add license property to the PackageInterface 2011-04-17 22:13:08 +02:00
Jordi Boggiano 8ab98a8b5d Fix class name 2011-04-17 21:49:05 +02:00
Jordi Boggiano bb5e59e30f Add type/repositoryType and repositoryUrl package properties 2011-04-17 21:48:20 +02:00
Jordi Boggiano 1d5f5885bc Remove useless abstract methods, interface is enough 2011-04-17 21:47:46 +02:00
Jordi Boggiano 7ea2fd6c93 Fix author/copyright 2011-04-17 21:39:53 +02:00
Nils Adermann 3a851b4059 Define an interface for packages and move package code to separate namespace.
Ids are no longer needed, they are internal to the solver and not a part of
packages.
2011-04-17 21:36:05 +02:00
Nils Adermann 933cc6179b Import initial partial port of the libzypp satsolver. 2011-04-05 17:37:19 +02:00