1
0
Fork 0
Commit Graph

8319 Commits (fdcae616b0bdf57b1460491badb4501906a83044)

Author SHA1 Message Date
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
2019-02-05 15:32:52 +01:00
Nils Adermann 00c395d657
Merge pull request #7946 from naderman/fix-abs-literal
Fix solver problem exceptions with unexpected contradictory "Conclusions"
2019-02-05 15:31:34 +01:00
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.
2019-02-03 16:33:55 +01:00
Jordi Boggiano 27bdda1fd3
Merge pull request #7937 from aboks/defaultrepos-auth
Fix defaultRepos fallback does not use auth config
2019-01-31 16:09:20 +01:00
Arnout Boks 82b010782d Also load config into IO if not freshly created 2019-01-31 13:46:46 +01:00
Arnout Boks e151a6c51c Only load configuration into IO if IO is available 2019-01-31 13:46:45 +01:00
Arnout Boks d1ce9f6246 Fix defaultRepos fallback does not use auth config
When a full 'composer' cannot be constructed (because there is no
local composer.json and no global composer.json), some commands
(e.g. `show -a`) fall back to the default repositories from the
`$COMPOSER_HOME/config.json` file. Without this fix, any auth
configuration from `$COMPOSER_HOME/auth.json` is not used for
these repositories in such a fallback scenario.

Steps to reproduce:

* Configure a password-protected composer repository in
  `$COMPOSER_HOME/config.json`.
* Configure valid credentials for that repository in
  `$COMPOSER_HOME/auth.json`.
* Make sure there is no file `$COMPOSER_HOME/composer.json`.
* Ensure the current working directory has no `composer.json`.
* Run `composer show -a some/package`.

Expected: Information about `some/package` is shown without
needing to enter credentials.

Actual: A prompt "Authentication required" is shown for the
private repository. When running the same command in a dir
that has a `composer.json`, or when `$COMPOSER_HOME/composer.json`
exists, things work as expected.
2019-01-31 13:46:45 +01:00
Jordi Boggiano 19ba2edd5c Add warning/info msg when tweaking disable-tls setting to avoid confusion, fixes #7935 2019-01-30 08:58:38 +01:00
Jordi Boggiano e05fa2368f Merge branch '1.8' 2019-01-30 08:31:38 +01:00
Jordi Boggiano b3182b0f7d Update changelog 2019-01-30 08:31:28 +01:00
Jordi Boggiano 8c93890c48
Merge pull request #7932 from hco/patch-2
Installer: Initialize $nameMatchesRequiredPackage
2019-01-30 08:29:42 +01:00
Jordi Boggiano b75db3ca08
Merge pull request #7934 from IkeLutra/patch-1
Update installer commit to fix SHA384 bug
2019-01-29 21:12:30 +01:00
Will Otterburn 6d58b13ee4
Update installer commit to fix SHA384 bug
Installer linked is affected by #7669
2019-01-29 18:03:03 +00:00
Hans-Christian Otto 85617aa740
Installer: Initialize $nameMatchesRequiredPackage
We had a case where we got `Undefined variable: nameMatchesRequiredPackage` — I think it should be initialized with false, right?
2019-01-29 17:26:59 +01:00
Jordi Boggiano f42d4d9ede Merge branch '1.8' 2019-01-29 15:02:53 +01:00
Jordi Boggiano 5e35464044 Update changelog 2019-01-29 15:00:48 +01:00
Jordi Boggiano 585535a01d Fix platform package regex 2019-01-29 14:58:37 +01:00
Jordi Boggiano 3d815b288f
Merge pull request #7927 from johnstevenson/update-xdebug-handler
Update xdebug-handler, fixes #7921
2019-01-29 14:24:09 +01:00
Jordi Boggiano 1699e948dd Merge branch '1.8' 2019-01-29 13:59:27 +01:00
Jordi Boggiano 9566b97e6e Update changelog 2019-01-29 13:57:47 +01:00
Jordi Boggiano 79af9d45af Merge branch '1.8' 2019-01-29 13:49:25 +01:00
Jordi Boggiano acea4a4d4d Warn on invalid package name or require/provide/.., fixes #7874 2019-01-29 13:46:23 +01:00
Jordi Boggiano 98a15bc93c Add output for metapackage installs/updates/.. fixes #7586 2019-01-29 11:38:18 +01:00
Jordi Boggiano 11bfe9970f
Merge pull request #7912 from kathyoungaligent/feature/no-api-config
Feature/no api config
2019-01-29 10:57:15 +01:00
Jordi Boggiano 2d7a8c67e8
Doc formatting fixes 2019-01-29 10:55:05 +01:00
Andrew Gillis dec2b5cd50 add gitlab token auth for git clone 2019-01-29 10:45:02 +01:00
Kath Young fbb9d20c33 Adjusted config name to be more descriptive, added documentation 2019-01-29 07:26:38 +10:30
johnstevenson 909d1c430e Update xdebug-handler, fixes #7921 2019-01-28 20:52:02 +00:00
Jordi Boggiano 81de5f82aa Merge branch '1.8' 2019-01-28 17:57:31 +01:00
Michael Käfer e0c44f2a25 Another MB to MiB 2019-01-28 17:55:17 +01:00
Michael Käfer 4765a8f21b MB to MiB
I did not study computer science, so correct me if I'm wrong. But I think you are calculating mebibyte (MiB) not megabyte (MB). Megabyte would be:
... round($valueInByte / 1000 / 1000, 2).'MB ...
Or is there some specific standard you follow? According to https://en.wikipedia.org/wiki/Binary_prefix both calculations (yours and mine) are correct in a way but I find yours to be not completely clear.
2019-01-28 17:55:13 +01:00
Jordi Boggiano 1f97ffdcd7 Add some docs 2019-01-28 17:54:32 +01:00
Sascha Egerer 82ecf95a3c Add PHP 5.3 compatibility 2019-01-28 17:34:29 +01:00
Sascha Egerer 1845adcfbd Fix update whitelist pattern resolving and add more tests 2019-01-28 17:34:24 +01:00
Sascha Egerer dc59af555a Fix invalid call to array_merge 2019-01-28 17:34:19 +01:00
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.
2019-01-28 17:34:08 +01:00
Nils Adermann 386382503d Add a test for autoloading if a package is only required via replacing name 2019-01-28 17:08:51 +01:00
Den Girnyk 3b6b63784f Fix: Keep replaced packages for autoload dumping with --no-dev 2019-01-28 17:02:32 +01:00
Jordi Boggiano f599ebf55b
Merge pull request #7925 from localheinz/fix/empty
Fix: Remove empty node
2019-01-28 16:58:13 +01:00
Jordi Boggiano f1297b11bc Merge branch '1.8' 2019-01-28 16:56:40 +01:00
Andreas Möller ea333aa134
Fix: Remove empty node 2019-01-28 16:47:33 +01:00
Jordi Boggiano abcde19022 Document --no-check-all better, fixes #7889 2019-01-28 16:17:46 +01:00
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
2019-01-28 15:52:43 +01:00
Jordi Boggiano b7d1f87848 Fix tests 2019-01-28 15:44:21 +01:00
Jordi Boggiano 66a77ed210 Merge branch '1.8' 2019-01-28 15:29:45 +01:00
Jordi Boggiano 02ceb74151 Tweak --no-cache option to be available globally and to not break VCS drivers relying on it, refs #7880, refs #6650 2019-01-28 15:29:37 +01:00
Jordi Boggiano 61bd9f83f1 Merge remote-tracking branch 'Dzhuneyt/6650-disable-cache-argument' 2019-01-28 15:19:48 +01:00
Jordi Boggiano a9aaa25d4c Fix compat with Symfony Process 4.2, fixes #7923 2019-01-28 14:46:34 +01:00
Jordi Boggiano 4fdebb1b69 Merge branch '1.8' 2019-01-28 14:31:31 +01:00
Jordi Boggiano c5cc178375 Update to latest CA bundle 2019-01-28 14:31:16 +01:00