1891 Commits (e6b45e853aad1036118273c69c69e88138480f42)

Author SHA1 Message Date
Rob Bast 25e3f6d4b9 expand regex and testcases 5 years ago
Rob Bast 971528916b fix regex for heredoc/nowdoc
* take into account relaxed changes introduced in php 7.3
  * see: 4887357269
* allow " as well as ', which was introduced in php 5.3

closes #8080
5 years ago
Patrick Reimers dd1e80a38f
Add tests for wrong package name. 5 years ago
Andreas Schempp 0e2215dc6c Added full unit test coverage 5 years ago
Patrick Reimers 5d14a95543
Add test for warning on deprecated naming 5 years ago
Nils Adermann 0619fbed58 Merge branch '1.8'
* 1.8:
  Follow up to #7946 test: add solver flag to assert path execution
5 years ago
Nils Adermann 29ff6a40ae Follow up to #7946 test: add solver flag to assert path execution 5 years ago
Jordi Boggiano 28b51ccfc5 Merge branch '1.8' 5 years ago
Jordi Boggiano c66bb0b1d0 Fix tests 5 years ago
Jordi Boggiano ff246e3e85 Merge branch '1.8' 5 years ago
Jordi Boggiano f2cc666c2c
Merge pull request #7913 from fredemmott/hhvm-version
Support identifying the HHVM version when not running with HHVM
5 years ago
Nils Adermann fdcae616b0 Merge branch '1.8'
* 1.8:
  Fix solver problem exceptions with unexpected contradictory "Conclusions"
  Also load config into IO if not freshly created
  Only load configuration into IO if IO is available
  Fix defaultRepos fallback does not use auth config
5 years ago
Nils Adermann 6b2edeae56 Fix solver problem exceptions with unexpected contradictory "Conclusions"
This 5 character fix comes with a solver test as well as a functional
installer test essentially verifying the same thing. The solver test is
more useful when working on the solver. But the functional test is less
likely to be accidentally modified incorrectly during refactoring, as
every single package, version and link in the rather complex test
scenario is essential, and a modified version of the test may very well
still result in a successful installation but no longer verify the bug
described below.

Background:

In commit 451bab1c2c from May 19, 2012 I
refactored literals from complex objects into pure integers to reduce
memory consumption. The absolute value of an integer literal is the id
of the package it refers to in the package pool. The sign indicates
whether the package should be installed (positive) or removed (negative),

So a major part of the refactoring was swapping this call:

$literal->getPackageId()

For this:

abs($literal)

Unintentionally in line 554/523 I incorrectly applied this change to the
line:

$this->literalFromId(-$literal->getPackageId());

It was converted to:

-abs($literal);

The function literalFromId used to create a new literal object. By using
the abs() function this change essentially forces the resulting literal
to be negative, while the minus sign previously inverted the literal, so
positive into negative and vice versa.

This particular line is in a function meant to analyze a conflicting
decision during dependency resolution and to draw a conclusion from it,
then revert the state of the solver to an earlier position, and attempt
to solve the rest of the rules again with this new "learned" conclusion.

Because of this bug these conclusions could only ever occur in the
negative, e.g. "don't install package X". This is by far the most likely
scenario when the solver reaches this particular line, but there are
exceptions.

If you experienced a solver problem description that contained a
statement like "Conclusion: don't install vendor/package 1.2.3" which
directly contradicted other statements listed as part of the problem,
this could likely have been the cause.
5 years ago
Fred Emmott bac2ef3dfd
Don't do (new Foo())->bar() - not 5.3-compatible 5 years ago
Fred Emmott 1b196720bf
Support identifying the HHVM version when not running with HHVM
hhvm-nightly (and the next release) are no longer able to execute
Composer. Support executing Composer with PHP to install dependencies
for hack projects.

The goal is for this to be temporary, until Hack identifies a new
package manager, given that Composer does not aim to be a multi-language
package manager.

fixes #7734
6 years ago
Jordi Boggiano 79af9d45af Merge branch '1.8' 6 years ago
Jordi Boggiano acea4a4d4d Warn on invalid package name or require/provide/.., fixes #7874 6 years ago
Jordi Boggiano 98a15bc93c Add output for metapackage installs/updates/.. fixes #7586 6 years ago
Jordi Boggiano 81de5f82aa Merge branch '1.8' 6 years ago
Sascha Egerer 1845adcfbd Fix update whitelist pattern resolving and add more tests 6 years ago
Sascha Egerer 50cb5fe3da Update all whitelist matching root dependencies
The update command can receive a pattern like `vendor/prefix-*`
to update all matching packages.
This has not worked if multiple packages, depending on each other,
where matched to the given pattern. No package has been updated
in this case as only the first package matching the pattern was
added to the whitelist.
6 years ago
Nils Adermann 386382503d Add a test for autoloading if a package is only required via replacing name 6 years ago
Den Girnyk 3b6b63784f Fix: Keep replaced packages for autoload dumping with --no-dev 6 years ago
Jordi Boggiano 2200043a43
Merge pull request #7900 from Great-Antique/fix-dumpautoload-no-dev-packages-resolving
Fix: Keep replaced packages for autoload dumping with --no-dev
6 years ago
Jordi Boggiano b7d1f87848 Fix tests 6 years ago
Den Girnyk 5b78ea529a
Fix: Keep replaced packages for autoload dumping with --no-dev 6 years ago
fancyweb a9d6068c57 feat(buffer-io): add the possibility to set user inputs for interactive questions 6 years ago
Jordi Boggiano 85ec111dee Merge remote-tracking branch 'dmanners/add-chat-option-for-support' 6 years ago
Jérôme Deuchnord b0b00ad1fa Call a script recursively with extra parameters (#7720)
* Added support for calling scripts recursively (fixes #7562)
6 years ago
Jordi Boggiano 86f59348f5
Fix TestCase import 6 years ago
Gabriel Caruso 2a13bb2649 Fixes from PHPStan (#7687)
* fix docblocks

* remove redundant conditional

* fix wrong variable name

* fix wrong namespaces

* add missing private members

* remove unused/redundant arguments

* move testcase class

* exclude TestCase.php

* Tweak RuleWatchGraph type hints

* Tweak doc comment
6 years ago
Jordi Boggiano ceb3a7a8e8 Merge branch '1.7' 6 years ago
Jordi Boggiano 42dca2aff5 Remove weird binary file from repo 6 years ago
Jordi Boggiano 2528654c53 Merge branch '1.7' 6 years ago
Jordi Boggiano 9e6a0bff71
Merge pull request #7658 from fooman/fix-non-zip-file-with-zip-ext
Fix regression for artifact repository
6 years ago
Alexey Kopytko aa6d138bdc Check for the actual warning description 6 years ago
Alexey Kopytko 20107dbf77 Ensure that a missing SSL/TLS protection warning does not pollute STDOUT
Fixes #7737
6 years ago
Stephan Vock 819f487b38 Bitbucket: switch to v2 API 6 years ago
David Manners 96347fbea1 composer/composer#7384: add chat to support options
- update schema documents to note that chat is allowed,
 - validate that chat must be a string and a url similar to forum options
6 years ago
Kristof Ringleff, Fooman add71388ca Add failing artifact 6 years ago
Gabriel Caruso 71c8735e11 Use combined assignment operators 6 years ago
Gabriel Caruso a17f051e29 Remove useless parentheses 6 years ago
Christophe Coevoet 8c3898aa57 Update tests for replace conflicts
This reverts the test changes done in b4698568d2 to the original tests added
in 1425bb7fc3.
6 years ago
Jordi Boggiano bf125295df Fix escaping of URLs in Perforce and Subversion drivers 6 years ago
Jordi Boggiano 3d01ef28fa Revert "Do not dump source and dist for metapackages"
The source/dist reference is needed to operate composer outdated and other functionality

Fixes #7546

This reverts commit 42739e7959.
6 years ago
Alexander Kurilo e1a6bd5ff1 Make JSON formatter test clearer 6 years ago
Alexander Kurilo 5a22a4f1f3 Make surrogate sequences in JSON work on PHP 5.3
Fixes #7510
6 years ago
Rafael Kassner 42739e7959 Do not dump source and dist for metapackages 6 years ago
Jordi Boggiano ff59bbdab0 CS fixer 6 years ago
Jordi Boggiano c5fa3bdde0 Migrate to repo.packagist.org for package metadata 6 years ago
Jordi Boggiano 16af52be8a Merge remote-tracking branch 'origin/1.6' 6 years ago
Théo FIDRY 87646ae689
Hide suggest reason when there is not one 6 years ago
Jordi Boggiano 0a27ca7b65 Make sure circular dependencies do not break the autoload dumper, refs #7316, refs #7348 6 years ago
Jordi Boggiano eedbd218f5 Make sure circular dependencies do not break the autoload dumper, refs #7316, refs #7348 6 years ago
Jordi Boggiano 46f973e213 Merge branch '1.6' 6 years ago
Philipp Fritsche b0be87177d
Filter dev-dependencies from "dump-autoload --no-dev" , fixes #4343 6 years ago
Jordi Boggiano 4ebb747e12 Merge branch '1.6' 6 years ago
Jordi Boggiano 78ae0a97f7 Terminate quoted strings 6 years ago
Jordi Boggiano 3b9d6769bf Fix class names in comments being parsed in short_open_tags files, fixes #7289 6 years ago
Jordi Boggiano 464daeebe2 Merge branch '1.6' 6 years ago
Jordi Boggiano 43e33be79f Fix regression in 036fc44c25, fixes #7268 6 years ago
Jordi Boggiano 38866ba310 Merge remote-tracking branch 'johnstevenson/external-xdebug' 6 years ago
Jordi Boggiano c917865fe9 Fix handling of dev versions and consolidate logic, refs #7119 6 years ago
Jordi Boggiano 24ad6307a7 Merge remote-tracking branch 'austris-argalis/issue-7085' 6 years ago
Jordi Boggiano ea78712822 Merge branch '1.6' 6 years ago
Edwin Rodríguez 9dc6222288 Allow using fossil dependency in a fossil repository, fixes #7125, closes #7126 6 years ago
Jordi Boggiano 35ebb8b93f Merge branch '1.6' 6 years ago
Filippo Tessarotto 277f32d388 Lock _readme: remove outdated hashtag link part, closes #7096 6 years ago
Jordi Boggiano 2bd34c0534 Merge branch '1.6' 6 years ago
Jordi Boggiano 9041622b86 Fix version guessing regression and a few other issues, fixes #7127 6 years ago
Jordi Boggiano bfa01285c2 Merge branch '1.6' 6 years ago
Jordi Boggiano 066351c5b9 Remove use of deprecated getMock method 6 years ago
Jordi Boggiano 036fc44c25 Make sure aliased packages are removed correctly from the repository, fixes #7167 6 years ago
Petr /Peggy/ Sládek 8d06832077 Update ClassMapGenerator to work better with symlinks, fixes #7252, closes #7251 6 years ago
johnstevenson ed97c2116c Use external XdebugHandler library 6 years ago
austris argalis 8a5645ffda Wording: Downgrading instead of Updating #7085 6 years ago
Jordi Boggiano 16dcb04e1d Merge branch '1.6' 7 years ago
Jordi Boggiano a1bf6890d5 Fix ConsoleIO tests 7 years ago
Jordi Boggiano 96d07e6753 Merge branch '1.6' 7 years ago
Jordi Boggiano 842a7ea922 Fix dev-master not being normalized correctly for the root package, fixes #7007 7 years ago
Jordi Boggiano ad8b44a4c8 Merge branch '1.6' 7 years ago
Jordi Boggiano ea9b7ecbb0
Merge pull request #6982 from carusogabriel/phpstan
Fixes from PHPStan level 0
7 years ago
Jean-Baptiste 595cf4432c Fix Test RepositoryFactory 7 years ago
Martin Hujer bbee0d7c6c Validation warns if script description for nonexistent script is present
Fixes #7010
7 years ago
Gabriel Caruso 3d262bd637 Fixes from PHPStan level 0
More fixes from PHPStan level 0
7 years ago
Tomas Klinkenberg 60106edd32 Added a test to confirm issue #6994.
Added a encapsulated group to the replacement parameter of the `preg_replace` for GitLab in `\Composer\Util\Url::updateDistReference()`. This fixes #6994.
7 years ago
Jordi Boggiano e6114b2ca7 Fix support for replacing dist refs in gitlab URLs and add support for gitlab/github enterprise too 7 years ago
Gabriel Caruso 2ad6f611d7 Allow bin key to receive string 7 years ago
Andreas Möller 79828f7543
Enhancement: Assert that key is removed when value is null 7 years ago
Jordi Boggiano 50665aa18d Simplify check for current revision, refs #6684 7 years ago
Jordi Boggiano 93cd9d874b Merge remote-tracking branch 'RobberPhex/git-repo' 7 years ago
John Stevenson 02fbbd5a42 Skip MockedZipDownloader tests if zip is missing (#6917)
* Skip MockedZipDownloader tests if zip is missing
7 years ago
Jordi Boggiano a1c5754b1f Make sure tests run non-interactively 7 years ago
Jordi Boggiano c8aea719b1 CS fixes 7 years ago
Jordi Boggiano 0a9abeef88 Merge branch '1.5' 7 years ago
Renoir Boulanger 9f723ba381 Support GitLab repositories w/ port over HTTPs
When we have self-hosted GitLab, over HTTPs, on a different port.

rel composer/composer#6894
7 years ago
Alessandro Lai 54adf0b61e Add regression test about VersionGuesser pretty_version handling 7 years ago
Gabriel Caruso 885da4c8ef Refactoring tests 7 years ago
Gabriel Caruso afc9a7643e Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 7 years ago
Gabriel Caruso a4b220273e Refactoring Tests (#6849) 7 years ago
Jordi Boggiano 6256e17149 Merge branch '1.5' 7 years ago
Jordi Boggiano 5ba6d7d436 Fix pretty guessed versions to show nicely on numeric branches, refs #6845 7 years ago
Alessandro Lai 3cf31da414 Fix root package not having a pretty version when detecting from VCS, fixes #6845, closes #6847 7 years ago
Jordi Boggiano eab826b00b Merge branch '1.5' 7 years ago
Jordi Boggiano 45cd26b2df Fix test and actually check that we get hasAuthentication called for different domains 7 years ago
Jordi Boggiano 9850621c6b
Merge pull request #6788 from GawainLynch/symfony-4
Symfony 4
7 years ago
Jordi Boggiano 0b3bc4ccb9 Merge branch '1.5' 7 years ago
johnstevenson b0922b95af Report multiple inis in php.ini specific messages
Where systems use multiple ini files it is perhaps more useful to
suggest running `php --ini` to see their locations, rather than showing
the loaded php.ini (if one exists).
7 years ago
Nils Adermann 7dffe79a0f Update tests of solver problem message to match new message 7 years ago
Robert Lu 3ce71a55bf fix unittest 7 years ago
Gawain Lynch f74c6f4620
Update tests to handle optional QuestionHelper::setInputStream() availability 7 years ago
Gawain Lynch 157075b996
Migrate ConsoleIO::select to use QuestionHelper and ChoiceQuestion 7 years ago
Jordi Boggiano 26a50b3762 Merge branch '1.5' 7 years ago
Jordi Boggiano 4ab34c22fa
Merge pull request #6740 from croensch/master
also support NO_PROXY
7 years ago
Jérôme Vasseur 71c2ecbace Fix platform package detection in VersionParser 7 years ago
Jordi Boggiano 9a99e86ebc Rename NonRoot to Transitive, refs #6674 7 years ago
Jordi Boggiano 9df22654c3 Merge remote-tracking branch 'grasmash/issue-6661-whitelist-all-deps' 7 years ago
croensch 6da92e98ac also support NO_PROXY
since WINDOWS can only have one case and that is usually upperase
7 years ago
Matthew Grasmick 776977f597 Fixing method name. 7 years ago
Vladimir Reznichenko c8615358cb SCA with PHP Inspections (EA Extended) 7 years ago
Matthew Grasmick 11db6f90c2 Cleaning up comments 7 years ago
Matthew Grasmick 3826e51caa Renaming some methods and props. 7 years ago
Matthew Grasmick ad465aa769 Updating var names. 7 years ago
Matthew Grasmick 21722f6e42 Fixing test version constraints. 7 years ago
Matthew Grasmick f29e98cdf9 Fixes #6661: Allow a given package and its dependencies (including siblings) to be updated. 7 years ago
Jordi Boggiano dae575c197 Merge branch '1.5' 7 years ago
Deamon 3d753b117b add test on remove mainkey at end of file 7 years ago
Jordi Boggiano a8df30c09b Merge branch '1.5' 7 years ago
Mikk Tendermann 2a89d37651 fix gitlab not telling visibilty if user is not logged in 7 years ago
Christian Ramelow f178c340e9 Fixed tests. 7 years ago
Christian Ramelow 39d8104897 Introduces a new method `copy()`.
Some packages, e. g. `tm/tooly-composer-script`, are using the composer classes to e. g. create symlinks or perform other file operations. While there's only a `copyThenRemove()` method this commit introduces a new `copy()` method. `copy()` behaves the same as the copy part of `copyThenRemove()` did with one exception: it returns `true` on success and `false` on failure. Copying a directory may lead to a `false`, while the whole directory or some of its files couldn't been copied. To ensure backwards compatibility `copyThenRemove()` calls `copy()` now. This commit also adds the necessary tests.
7 years ago
Jordi Boggiano e33d00f98e Fix gitlab tests 7 years ago
Jordi Boggiano f420d31233 Fix application test 7 years ago
Jordi Boggiano a6c4fb2dcf Fix gitlab tests 7 years ago
Jordi Boggiano c89f6338c2 CS tweaks, refs #6592 7 years ago
Helmut Januschka ae42e4f8a3 php 5 7 years ago
Helmut Januschka bc4a7834ba php 5 being php5 :/ 7 years ago
Helmut Januschka b847270d08 rename test method 7 years ago
Helmut Januschka b486056066 add tests for gitlab paging 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
Jordi Boggiano 6832eacb01 Update GitLab API usage to v4, fixes #6453 7 years ago
Jordi Boggiano 65d49bf811 Merge branch '1.4' 7 years ago
Jordi Boggiano d2b102ecb9 Merge remote-tracking branch 'svenmuennich/pr/fix-require-command' into 1.4 7 years ago
Sergey Shcherbin 118abacd14 Fix for time format in GitBitbucketDriver test 7 years ago
Jordi Boggiano 34dbde3873 Merge branch '1.4' 7 years ago
Sven Münnich d51ef83a43 Fix case insensitivity of ‘require’ command
When currently executing the `require` command for a package that is already listed in `require(-dev)`, one must use the exact same, case matching package name as written in `composer.json`. That is, if one changes the case of a character in the package name, the `require` command will add a new entry to `require(-dev)`, instead of updating the existing one.

This commit fixes the described behaviour to make it consistent with other commands like `update` that are already case insensitive.
7 years ago
Rob Bast 422a9adb07
images related to new trusty images 7 years ago
Jordi Boggiano ef47d8bf05 Merge pull request #6486 from WilHall/feature/htaccess-protect-option
Add htaccess-protect option for disabling the creation of .htaccess files
7 years ago
Jordi Boggiano 91a4e76958 Merge pull request #6460 from bmax/master
Cache: clear cache using removeDirectory
7 years ago
Brandon Max 24b8fea48a Cache: clear cache using removeDirectory 7 years ago