You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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.
6 years ago
..
install-branch-alias-composer-repo Add failing test case 10 years ago
SAMPLE Refactor functional tests to fit existing tests better 12 years ago
abandoned-listed.test added more information in the output 8 years ago
alias-with-reference.test Fix support of aliases combined with reference locked packages, fixes #1631 12 years ago
aliased-priority-conflicting.test Change default minimum-stability to "stable", fixes #744 12 years ago
aliased-priority.test Change default minimum-stability to "stable", fixes #744 12 years ago
broken-deps-do-not-replace.test Update tests of solver problem message to match new message 7 years ago
circular-dependency.test Adjust circular dep test 11 years ago
circular-dependency2.test Ignore self references when anlaysing independent root requirements 8 years ago
disjunctive-multi-constraints.test Add disjunctive multi-constraints with |, refs #643, fixes #1342 11 years ago
github-issues-4319.test Warn on invalid package name or require/provide/.., fixes #7874 6 years ago
github-issues-4795-2.test Warn on invalid package name or require/provide/.., fixes #7874 6 years ago
github-issues-4795.test Warn on invalid package name or require/provide/.., fixes #7874 6 years ago
install-aliased-alias.test Added support for the alias of an aliased package 11 years ago
install-branch-alias-composer-repo.test Add failing test case 10 years ago
install-dev-using-dist.test Persist prefer-lowest in composer.lock 10 years ago
install-dev.test Fix integration tests 10 years ago
install-from-empty-lock.test Persist prefer-lowest in composer.lock 10 years ago
install-from-lock-removes-package.test Add test to verify that depency packages get deleted when no longer in lock file 10 years ago
install-ignore-platform-package-requirements.test Add tests for platform packages required by root and avoid creating rules altogether instead of disabling them, refs #3320 10 years ago
install-missing-alias-from-lock.test Persist prefer-lowest in composer.lock 10 years ago
install-overridden-platform-packages.test Finalize platform override feature 9 years ago
install-package-and-its-provider-skips-original.test Add test for replace 9 years ago
install-prefers-repos-over-package-versions.test Prioritize repository over package versions in the default policy, fixes #3509 9 years ago
install-reference.test Refactor integration tests to accept any run command 12 years ago
install-self-from-root.test Cleaner notation for expected exceptions in fixtures. 9 years ago
install-simple.test Refactor integration tests to accept any run command 12 years ago
partial-update-downgrades-non-whitelisted-unstable.test Fix partial updates from a dirty state and apply exactly the locked state, fixes #3468 8 years ago
partial-update-forces-dev-reference-from-lock-for-non-updated-packages.test Partial updates should not corrupt the lock if the installed repo is not up to date with it, fixes #3439, closes #3553 9 years ago
partial-update-from-lock.test Fix partial updates from a dirty state and apply exactly the locked state, fixes #3468 8 years ago
partial-update-installs-from-lock-even-missing.test Partial updates should not corrupt the lock if the installed repo is not up to date with it, fixes #3439, closes #3553 9 years ago
partial-update-without-lock.test Persist prefer-lowest in composer.lock 10 years ago
plugins-are-installed-first.test Move plugins with no dependencies to the front, followed by plugins with their dependencies 7 years ago
replace-alias.test fix "replace-alias.test" test 10 years ago
replace-priorities.test Fix replacers being picked if whatProvide was called before building the package whitelist, fixes #2991, fixes #2962 10 years ago
replace-root-require.test Add tests for the changes in #2690 11 years ago
replaced-packages-should-not-be-installed-when-installing-from-lock.test Update tests for replace conflicts 6 years ago
replaced-packages-should-not-be-installed.test Update tests for replace conflicts 6 years ago
root-requirements-do-not-affect-locked-versions.test removed requirements from the root package should we install from the lock file 10 years ago
solver-problems.test Warn on invalid package name or require/provide/.., fixes #7874 6 years ago
suggest-installed.test added more information in the output 8 years ago
suggest-prod.test added more information in the output 8 years ago
suggest-replaced.test added more information in the output 8 years ago
suggest-uninstalled.test added more information in the output 8 years ago
update-alias-lock.test Partial updates should not corrupt the lock if the installed repo is not up to date with it, fixes #3439, closes #3553 9 years ago
update-alias.test Add test for updating an aliased package to a non-aliased one 12 years ago
update-all-dry-run.test Fix integration tests 10 years ago
update-all.test Fix integration tests 10 years ago
update-changes-url.test Fix #refs handling, fixes #5291 8 years ago
update-dev-ignores-providers.test Fix regression in updating dev packages to latest ref, fixes #1030 12 years ago
update-dev-packages-updates-repo-url.test Check if package URLs are up to date after an update op is done, fixes #3214 9 years ago
update-dev-to-new-ref-picks-up-changes.test Fix updates when dev packages have new dependencies (no more double updates needed), fixes #1105 12 years ago
update-downgrades-unstable-packages.test Handle stability changes correctly, fixes #877 11 years ago
update-ignore-platform-package-requirements.test Add tests for platform packages required by root and avoid creating rules altogether instead of disabling them, refs #3320 10 years ago
update-installed-alias-dry-run.test Fixed update alias packages in dry-run mode 11 years ago
update-installed-alias.test Fixed update alias packages in dry-run mode 11 years ago
update-installed-reference-dry-run.test added tests for not updating packages referenced by specific commit hash 10 years ago
update-installed-reference.test added tests for not updating packages referenced by specific commit hash 10 years ago
update-no-dev-still-resolves-dev.test Always resolve dev packages even when doing an update with --no-dev, fixes #5016 8 years ago
update-picks-up-change-of-vcs-type.test Add test 9 years ago
update-prefer-lowest-stable.test split update --prefer-lowest and --prefer-stable 10 years ago
update-reference.test Refactor integration tests to accept any run command 12 years ago
update-requiring-decision-reverts-and-learning-positive-literals.test Fix solver problem exceptions with unexpected contradictory "Conclusions" 6 years ago
update-syncs-outdated.test Make sure the abandoned state is copied over even if the packages are installed already 8 years ago
update-whitelist-locked-require.test Change dependency processing for update with whitelisted packages 11 years ago
update-whitelist-patterns-with-all-dependencies.test Fix update whitelist pattern resolving and add more tests 6 years ago
update-whitelist-patterns-with-dependencies.test Fix update whitelist pattern resolving and add more tests 6 years ago
update-whitelist-patterns-with-root-dependencies.test Fix update whitelist pattern resolving and add more tests 6 years ago
update-whitelist-patterns-without-dependencies.test Fix update whitelist pattern resolving and add more tests 6 years ago
update-whitelist-patterns.test Fix integration tests 10 years ago
update-whitelist-reads-lock.test Partial updates should not corrupt the lock if the installed repo is not up to date with it, fixes #3439, closes #3553 9 years ago
update-whitelist-removes-unused.test Add test case for removing unused dependencies on whitelisted update 10 years ago
update-whitelist-with-dependencies.test Change dependency processing for update with whitelisted packages 11 years ago
update-whitelist-with-dependency-conflict.test Change dependency processing for update with whitelisted packages 11 years ago
update-whitelist.test Change dependency processing for update with whitelisted packages 11 years ago
update-with-all-dependencies.test Warn on invalid package name or require/provide/.., fixes #7874 6 years ago
updating-dev-from-lock-removes-old-deps.test Persist prefer-lowest in composer.lock 10 years ago
updating-dev-updates-url-and-reference.test Persist prefer-lowest in composer.lock 10 years ago