Nils Adermann
5c491ecc9b
Merge pull request #7625 from naderman/repository-set
...
Separate RepositorySet from Package Pool, load only metadata of packages directly required
6 years ago
Nils Adermann
261efe1e8e
Implement loadPackages on Composer repositories with providers
6 years ago
Nils Adermann
c0f19f6c57
Move construction of pool from repo set into a pool builder
...
Pool construction depends on the install request now, so only required
packages get loaded, add some structure for future asynchronously
loading composer repositories
6 years ago
Nils Adermann
b6e2d60c9e
Create the pool in the installer before giving it to the solver
6 years ago
Nils Adermann
1228bcdffc
Internalize pool creation in repository set, store root aliases in set
...
The pool is still exposed too early in a few places which will require
further refactoring
6 years ago
Nils Adermann
6ef65e5319
Add a new RepositorySet class and restrict pool usage to the solver
...
Breaking change for the plugin interface so bumping the version of
composer-plugin-api to 2.0.0
First step for a refactoring of the package metadata loading mechanism
6 years ago
Gabriel Caruso
71c8735e11
Use combined assignment operators
6 years ago
Christophe Coevoet
e5b948c683
Refactor the handling of conflict rules in the solver
...
Conflict rules are not added in the solver based on the packages loaded in the
solver by require rules, instead of loading remote metadata for them. This has
2 benefits:
- it reduces the number of conflict rules in the solver in case of conflict
rules targetting packages which are not required
- it fixes the behavior of replaces, which is meant to conflict with all
versions of the replaced package, without introducing a performance
regression (this behavior was changed when optimizing composer in the past).
6 years ago
Jordi Boggiano
ff59bbdab0
CS fixer
6 years ago
Jordi Boggiano
0d92c8df63
Merge pull request #7480 from staabm/patch-3
...
Simplify Rule->getJob()
6 years ago
Markus Staab
05499099a0
Simplify Rule->getJob()
6 years ago
Markus Staab
f7a1c34c92
Removed unused variables
6 years ago
Markus Staab
50565cb0c8
Use variable to call count() less often
6 years ago
Rob
68d468d683
Merge pull request #7450 from staabm/simpler-hash
...
Use a simpler hashing for the Rule2Literal case
6 years ago
Rob
1e9136f086
Merge pull request #7456 from staabm/simpler-equals
...
Specialize Rule2Literal->equals(Rule2Literal) for speedup
6 years ago
Rob
7079cdb70d
Merge pull request #7458 from staabm/patch-3
...
Define variable only when actually used
6 years ago
Rob
b350c09c7e
Merge pull request #7457 from staabm/patch-2
...
Remove unnecessary abs() calls
6 years ago
Markus Staab
86d5de2965
Define variable only when actually used
6 years ago
Markus Staab
42516901f1
Removed another unnecessary abs() call
6 years ago
Markus Staab
0e16dbabde
Removed another unnecessary abs() call
6 years ago
Markus Staab
e3a23f4ae6
Remove unnecessary abs() calls
...
Literal cannot be negative at this point
6 years ago
Markus Staab
7a4937bbcc
Specialize Rule2Literal->equals(Rule2Literal) for speedup
6 years ago
Markus Staab
07383552b3
Temporary save the package-name into a variable
...
this reduces number of unnecessary function calls in the hot path of "composer update"
6 years ago
Markus Staab
0aa7ec2d2c
Use a simpler hashing for the Rule2Literal case
...
this speeds up "composer update" by ~18%
6 years ago
Gabriel Caruso
7d9f8e2247
Improvements
...
Small improvements, such as remove unused imports, unecessaries casts, parentheses, etc.
6 years ago
Yanick Witschi
d82bdc04ac
Improved debugging output
6 years ago
Yanick Witschi
5435877bd9
Improve SAT resolving developer debug information
6 years ago
Jordi Boggiano
dae3c5bc2d
Merge branch '1.6'
7 years ago
Jordi Boggiano
766ed9555e
Only show override description if there is one, refs #7011
7 years ago
Vic Metcalfe
fa5a94143a
Show reason for php version package mismatch due to config.platform
7 years ago
Jordi Boggiano
ad8b44a4c8
Merge branch '1.6'
7 years ago
Jordi Boggiano
471b012e3a
Fix problem report when requiring "ext-zend opcache", refs #2509
7 years ago
Gabriel Caruso
3d262bd637
Fixes from PHPStan level 0
...
More fixes from PHPStan level 0
7 years ago
Gabriel Caruso
32a409a3ee
Clean elses
7 years ago
Jordi Boggiano
0b3bc4ccb9
Merge branch '1.5'
7 years ago
Nils Adermann
f40f95b269
Add a note that a user could have forgotten to add a custom repo if package not found
7 years ago
Jordi Boggiano
c0eb32669a
Remove comment
7 years ago
Vladimir Reznichenko
c8615358cb
SCA with PHP Inspections (EA Extended)
7 years ago
Denis Brumann
2df1a69287
Improve IDE autocompletion
...
According to type 2nd constructor-argument `$reasonData` can either be a Link or a PackageInterface. IDEs like PhpStorm won't be able to provide autocompletion since both classes are from a different namespace.
In order to provide better autocompletion for `$reasonData` and by extension `$this->reasonData` the use statements should be included or the type hint should use the fully qualified class name.
For the same reason I added the docblock on the protected method `formatePackagesUnique()`.
7 years ago
Jordi Boggiano
122e422682
CS fixes
7 years ago
rubenrua
8fccbaa4a4
Improve memory usage resolving dependencies II
...
Optimize `rulesByHash` in `Composer\DependencyResolver\RuleSet` to only
use an array with the second element, event with very low probability.
7 years ago
rubenrua
4e1887a721
Improve memory usage resolving dependencies
...
It is known that composer update takes a lot of memory: #5915 , #5902 ,
I am playing with a profiler (@blackfireio) to make a demo in my local
PHP meetup (@phpvigo) and I found out a way to use less memory. These
are my first tests:
* Private project using PHP 5.6:
* Memory: from 1.31GB to 1.07GB
* Wall Time: from 2min 8s to 1min 33s
* symfony-demo using PHP 7.1 in my old mac book:
* Memory: from 667MB to 523MB
* Wall Time: from 5min 29s to 5min 28s
Not use an array inside conflict rules is this improvement main idea:
```php
<?php
//Memory 38MB
gc_collect_cycles();
gc_disable();
class Rule
{
public $literals;
public function __construct(array $literals)
{
$this->literals = $literals;
}
}
$rules = array();
$i = 0;
while ($i<80000){ //
$i++;
$array = array(-$i, $i);
$rule = new Rule($array);
$rules[] = $rule;
}
```
```php
<?php
//Memory 11.1MB
gc_collect_cycles();
gc_disable();
class Rule2Literals
{
public $literal1;
public $literal2;
public function __construct($literal1, $literal2)
{
$this->literal1 = $literal1;
$this->literal2 = $literal2;
}
}
$rules = array();
$i = 0;
while ($i<80000){ //
$i++;
$rule = new ConflictRule(-$i, $i);
$rules[] = $rule;
}
```
More info https://github.com/composer/composer/pull/6168
7 years ago
johnstevenson
379fb70ad9
Use random name for tmp ini and delete after use
...
Thanks to Patrick Rose for reporting this issue.
8 years ago
Nicolas Grekas
daf84bea33
Enhance solver perf by removing count()
8 years ago
Yanick Witschi
7b5fe5c7d4
CS
8 years ago
Yanick Witschi
a9e88a27b3
CS
8 years ago
Yanick Witschi
4a769a785c
Reduce calls on Rule::getHash()
8 years ago
ReenExe
53fc30fe56
clear code
8 years ago
Lucas CHERIFI
7e34d9ab97
Typo fix ;-)
8 years ago
Jordi Boggiano
feda2a283f
Improve error reporting some more, fixes #4310
8 years ago
Jordi Boggiano
3b0a1c6f70
Run cs fixer and update config to latest master
8 years ago
Niels Keurentjes
818c3e707a
Ton of phpDoc fixes.
8 years ago
Jordi Boggiano
c74e6df65d
Fix strings being passed to an int arg, fixes 7.1 build
8 years ago
Jordi Boggiano
623c0dcda7
Improve solver error reporting, fixes #5086 , fixes #2575 , fixes #2661
8 years ago
Niels Keurentjes
8e78ce9a43
Add extra logging before and after SAT solving
8 years ago
Nils Adermann
4af74b54e0
Ignore self references when anlaysing independent root requirements
...
When creating a transaction we try to identify all requirements that are
not themselves required by any other package. If a package references
itself this should not mark it as being required by another package.
8 years ago
Niels Keurentjes
b059cbe37c
Removed unused variables and includes, fixed functions being called with more arguments than declared.
8 years ago
Jordi Boggiano
c9436438ff
Add memoization to parseConstraints, saves some (6-7% here) RAM and marginal CPU time
8 years ago
Niels Keurentjes
ebfceefca6
Removed long deprecated functions that were no longer referenced anywhere.
9 years ago
Rob Bast
baabc612f6
adjust message, skip test
...
currently we have no way to put dynamic values or wildcards in EXPECT-OUTPUT
9 years ago
Rob Bast
94daeca57b
add test and adjust rule error message
9 years ago
Jefferson Carpenter
8d57c3e743
Update SolverProblemsException.php
9 years ago
Jordi Boggiano
1818b95149
CS fixes
9 years ago
Jordi Boggiano
e0ff9598c3
Tweak wording a bit, refs #3177
9 years ago
Radek Benkel
09417cae50
Composer gives .ini hints about missing extensions
9 years ago
Wouter J
d0e4c5f71e
Use "value" instead of "setting"
9 years ago
Wouter J
b156ad0345
Improve error message
9 years ago
Jordi Boggiano
f5e0fc14b3
Clarify some error messages, fixes #3770
9 years ago
Jordi Boggiano
125dc62fab
Make trigger error visible
9 years ago
Rob Bast
1c7016de45
remove dead code/class
9 years ago
Rob Bast
1bf03e9621
fixed various docblocks and class properties in solver
9 years ago
Rob Bast
b523fc0b7b
ran fixers
9 years ago
Jordi Boggiano
ce08582671
Fix CS
9 years ago
Rob Bast
a1427d7fd6
replace all occurences in code and comments
9 years ago
Rob Bast
51ef7b5eef
instead of generic be more verbose about possible causes
9 years ago
Rob Bast
77f1d5945f
make sure php version errors are less misleading
...
* determine conflicting version in problem using pool package
* hide version in rule to keep it generic rather than possibly misleading
fixes #4319
9 years ago
Nils Adermann
cf1af58514
Use bitwise operators directly in rules instead of get/set Bitfield
9 years ago
Nils Adermann
956035e641
Remove the unnecessary return statements from setters
9 years ago
Nils Adermann
f535542fca
Use constants with names for bitfield offsets
9 years ago
Nils Adermann
329ab5cf41
Rename blob rule property to bitfield
9 years ago
Nils Adermann
961ea868ac
Use an integer bitfield for rule properties instead of a string binary blob
9 years ago
Nils Adermann
6e81f63635
Reduce memory footprint of rules by storing data in blob
...
Not declaring the job property saves significant amounts of memory as
most rules leave it as null
9 years ago
Nils Adermann
c7e1f49e78
Rule hashes are only used in the rule set, so no need to store them
9 years ago
Nils Adermann
15d572da4c
Use 4 byte integer from raw md5 instead of 5 hex representation chars
...
The hash is necessary as comparisons are significantly too slow
otherwise. The old hash function used substr on the hexadecimal
representation of the md5 hash, rather than the raw binary output. This
wastes a significant amount of memory, as each byte can only be used to
store up to 4 bit of information. The new hash has 32bit instead of
20bit and uses only a 4 byte integer instead of a 5 byte string.
9 years ago
Nils Adermann
5b1b96b61e
Output the number of rules used in the solver for profiling purposes
9 years ago
Nils Adermann
07e1d227c9
Output the size of the pool after dependency resolution for users
9 years ago
Kunal Mehta
f634c6946d
Update callers of VersionParser::formatVersion()
...
Tests were moved to BasePackageTest.
9 years ago
Jordi Boggiano
79f9158fb2
Merge pull request #4192 from localheinz/fix/import
...
Fix: Add missing imports
9 years ago
Jordi Boggiano
6a64041055
CS fixes
9 years ago
Andreas Möller
12ffe2b4d4
Fix: Add missing imports
9 years ago
Andreas Möller
e184118d76
Fix: Docblock
9 years ago
Nils Adermann
75c501251d
Revert "Merge remote-tracking branch 'naderman/load-no-providers'"
...
This reverts commit 3e85f82373
, reversing
changes made to b025d0982b
.
9 years ago
Jordi Boggiano
3e85f82373
Merge remote-tracking branch 'naderman/load-no-providers'
9 years ago
Nils Adermann
cfd0e44312
Move private function further down in pool
9 years ago
Nils Adermann
ec5416f03c
loadDev parameter is nonsense, properly load packages in create command
9 years ago
Nils Adermann
da02c53540
Update the composer repository whatprovides test to a loadrecursively test
9 years ago
Nils Adermann
b99c03ea04
Entirely remove whatProvides from Composer repository
9 years ago
Nils Adermann
090711b21c
Completely move loading of packages from composer repo to pool
9 years ago
Possum
2e99b9fdf5
Use https where possible
9 years ago
Nils Adermann
4d0db5add6
POC Implementation of loading only explicitly named package data
9 years ago
Nils Adermann
b4ed331168
The Solver Request no longer depends on the Pool
9 years ago
Jordi Boggiano
d6620195e5
Prioritize repository over package versions in the default policy, fixes #3509
9 years ago
Markus Staab
c9bdf3a07a
added the actual phpversion into the error message when phpversion doesn satisfy the requirement
9 years ago
Jordi Boggiano
05e08889ed
Add BC method for old usage, refs #3857
9 years ago
Jordi Boggiano
6b3178b169
Merge remote-tracking branch 'isoroku/fix-misspellings'
...
Conflicts:
doc/articles/handling-private-packages-with-satis.md
9 years ago
Hannes Van De Vreken
d017fa4a1d
Unused variable
9 years ago
isoroku
e0657b60a2
Fix misspellings
9 years ago
Jordi Boggiano
3ba581f0df
Improve error messages for required hhvm/php versions, fixes #3767
9 years ago
Vladimir Kartaviy
813fd0b703
Added missing $learnedWhy property
10 years ago
Nicolas Grekas
4a0feb0189
add --prefer-lowest-stable to update command
10 years ago
Steve Preston
dfe18d2e7f
Fixed dependency problem caused by pull request #3482
10 years ago
Nils Adermann
4a945da55b
Avoid generating duplicate conflict rules
...
For each version of each package we create a conflict rule with each
other version. These are then added to the rule set and skipped if
duplicate so instead we can just generate them only once to begin with
and avoid unnecessary memory allocation and duplication lookups.
10 years ago
Nils Adermann
6f41e99fe2
Add back ruleById function for BC
10 years ago
Nils Adermann
2c43a3bcd0
Improve docblocks of public properties
10 years ago
Nils Adermann
107a736440
Recreate getLiterals method for BC
10 years ago
Nils Adermann
26598c4a9a
Remove unnecessary pool reference from rules
10 years ago
Nils Adermann
d77400ade2
Make ruleById lookup table in rule set public
...
Saves about 500k function calls on a packagist update
10 years ago
Nils Adermann
5c0efdcaa2
Move public properties to top and document them
10 years ago
Nils Adermann
c6af09b1da
Make project id public
...
Reduction of rougly 1.3 million function calls on packagist update
10 years ago
Nils Adermann
ef41f136f8
Literals on rule are now public
...
This causes a reduction of ~500k function calls for packagist composer
update (~14 million total).
10 years ago
Nils Adermann
5333017aea
Remove unused selectNewestPackages method in DefaultPolicy
...
Unused as of 1b6f57e651
10 years ago
Nils Adermann
dccb728e10
Remove further unnecessary checks for packages being arrays
10 years ago
Nils Adermann
89bd9be295
This entirely removes StreamableRepositories and minimal package arrays
10 years ago
Sam Mousa
670ca2f889
Fixed issue #3441
10 years ago
Nils Adermann
83159dc153
Use elseif instead of else { if {
10 years ago
Nils Adermann
0daaa1a902
Reduce whatProvides overhead
10 years ago
Nils Adermann
ee56db8767
Remove the handling of updates in the generator
...
Updates are implicitly handled by whatProvides for install requests
10 years ago
Jordi Boggiano
94926218e8
CS fixes
10 years ago
Jordi Boggiano
ec0463a400
Add tests for platform packages required by root and avoid creating rules altogether instead of disabling them, refs #3320
10 years ago
alu
b7fa302b90
add ignore-platform-package-requirements for update/install commands.
10 years ago
Ryan Weaver
947db97e33
[ #2492 ] Removing an unused variable and use statement, fixing phpdoc
10 years ago
Thai Phan
e6fdefb869
Update RuleWatchNode.php
10 years ago
Jordi Boggiano
ac497feaba
CS fixes
10 years ago
Jordi Boggiano
e23665be59
Fix replacers being picked if whatProvide was called before building the package whitelist, fixes #2991 , fixes #2962
10 years ago
Nils Adermann
78f2ad95a9
Correctly add decision reason to transaction
10 years ago
Christian Flothmann
0e9325da79
for AliasPackages check that the aliased package is white listed so that version constraints of AliasPackages are taken into account when computing package provisions
10 years ago
Nils Adermann
aa74818fe0
Handle array candidates in whatProvides
11 years ago
Nils Adermann
eb5c785dcd
Remove superfluous string casts
11 years ago
Nils Adermann
5b80144ad0
Resolve job packages after whitelist generation
11 years ago
Nils Adermann
bc7008270f
Properly limit to name matches only if necessary
11 years ago
Nils Adermann
3148ffd355
Whitelist packages with names matching those specified before generating rules
...
Addresses #2690 doesn't do any performance optimisations yet which we
could do now
11 years ago
Jordi Boggiano
51e6c3a466
Optimize solving by removing packages that are excluded by the root package requires
11 years ago
Jordi Boggiano
0a3df27403
Remove dead code, fixes #2363
11 years ago
Jordi Boggiano
11a0d16ccc
CS fixes
11 years ago
Jordi Boggiano
cc37e4b0b8
Show defaulted version if phpversion() returns nothing, fixes #2313
11 years ago
Nils Adermann
8369624c49
Correctly set watch2 on rule watch nodes for learned rules fixes #2181
11 years ago
Jordi Boggiano
051d219438
Fix whatProvides returning too many results when no constraint is given
11 years ago
Jordi Boggiano
8d0b7f278e
CS fixes
11 years ago
Jordi Boggiano
6f6228fb1d
Remove unneeded use
11 years ago
Pavel Savinov
b72c4cfe97
PHPDoc fix
11 years ago
Pavel Savinov
831bd844bd
Almost PHPDoc problems fixed
11 years ago
Jordi Boggiano
7449162aa4
Report ICU failures as the intl extension being missing, refs #1939
11 years ago
Jordi Boggiano
e848c76cbc
Only compare branches as versions in the policy to sort packages, but not in the solver, fixes #1817
11 years ago
Jordi Boggiano
326faf2b51
Minor cleanups
11 years ago
Jordi Boggiano
faa419cc0e
Merge remote-tracking branch 'hason/alias'
11 years ago
Jordi Boggiano
cc9dac8fe2
Fix tests and convert all package lists to Name[Versions] format
11 years ago
Jordi Boggiano
201cde05be
Show reasons why an operation is executed in -vv mode, fixes #1063
11 years ago
Robert Gruendler
5160dd2f5e
Return different error code for SolverProblemsException
...
To make it easier for external tools to detect SolverProblems and react
to them accordingly,
this PR introduces a new exit code.
11 years ago
Jordi Boggiano
0700cd9186
Adjust according to feedback
11 years ago
Jordi Boggiano
db4055b778
Put a higher prio on replacers of the same vendor as the required package
11 years ago
Martin Hasoň
753a8345cb
Added support for the alias of an aliased package
11 years ago
Jordi Boggiano
a0d1d59868
Fix handling of aliases in streamable repos, fixes #1776 , fixes #1749
11 years ago
Jordi Boggiano
2b385cbe58
Fix dependency flags not applying to provides/replaces, fixes #1771
11 years ago
Jordi Boggiano
b0297ef67a
Add prefer-stable flag to pick stable package over unstable ones when possible
11 years ago
Jordi Boggiano
514a3cde77
CS fixes
12 years ago
Jordi Boggiano
da5ee6e2d7
Add warning for invalid chars in package names
12 years ago
Jordi Boggiano
62bf84fc4f
Rename var
12 years ago
Jordi Boggiano
1c39ad779b
Fix wording
12 years ago
Jordi Boggiano
5d78fa6ce6
Report typos in package name if no version matches
12 years ago
Jordi Boggiano
f18839c350
Fix var override, fixes #1061
12 years ago
Pascal Borreli
83fd3967f0
Fixed PHPDoc
12 years ago
Pascal Borreli
5eead93250
Fixed typos
12 years ago
Jordi Boggiano
125ff3e4f5
Fix root aliasing with new providers repo format
12 years ago
Jordi Boggiano
eceda0ffc7
Fix regression introduced in beb9a5bd72
12 years ago
Jordi Boggiano
5978197b5d
Reset package IDs before they can be used in the pool in case there are already some in the cache
12 years ago
Jordi Boggiano
6a03e4f9ac
Code optimizations: Avoiding counting repeatedly
12 years ago
Jordi Boggiano
beb9a5bd72
Code optimizations: avoid loops in match()
12 years ago
Jordi Boggiano
21a0ae9cad
Cache whatProvide calls
12 years ago
Jordi Boggiano
a3f9accd37
Fix various dumb issues
12 years ago
Jordi Boggiano
9369f48dcd
Fix package id
12 years ago
Jordi Boggiano
18492a1f84
Remove Pool::getMaxId and the solver's reliance on it
12 years ago
Jordi Boggiano
c0e5736ae7
Add support for one-file-per-provider composer repositories
12 years ago
Jordi Boggiano
a8171f5be0
Display prettier messages for second-degree required exts to avoid confusion
12 years ago
Jordi Boggiano
ded485dd60
Fix root aliasing and allow aliasing using the branch-alias as source
12 years ago
Tim Heil
6c1820d006
Add troubleshooting URL to error message
12 years ago
Jordi Boggiano
6f77df296a
Speed up Pool::match for common case
12 years ago
Jordi Boggiano
9965f02951
Clean up link creation
12 years ago
Jordi Boggiano
8a275336a1
CS cleanups
12 years ago
Jordi Boggiano
e46d26cb9b
Add loadAliasPackage to the StreamableRepositoryInterface and clear up responsibilities between Pool and Repositories
12 years ago
Jordi Boggiano
9a1fd450b0
Remove code duplication
12 years ago
Jordi Boggiano
62ead24b61
Rename variable for clarity
12 years ago
Jordi Boggiano
25142c5351
Clarify variable variable usage
12 years ago
Jordi Boggiano
2d4076e9b2
Add support for aliases in streamed repos
12 years ago
Jordi Boggiano
c8a685be6b
Reduce memory usage by only loading packages that are actually needed, fixes #456
12 years ago
Nils Adermann
27d8904abe
resetToOffset method was moved to the Decisions class a while ago
12 years ago
Jordi Boggiano
ef637c8f1a
CS fixes
12 years ago
Nils Adermann
84dd1fc1bf
Merge pull request #898 from Seldaek/providefix
...
Fix hijacking possibility via provide bug
12 years ago
Adrien Brault
4263fe9255
Fix Solver CS
12 years ago
Jordi Boggiano
2f7130200a
Prevent seeing dev versions as equal when they are not, fixes #848
12 years ago
Jordi Boggiano
2d19cf2a00
Fix hijacking possibility via provide bug
12 years ago
Jordi Boggiano
6573fd3f77
Add hint in solver exceptions as to what may be wrong
12 years ago
Jordi Boggiano
f4409d9168
Fix problem output formatting, fixes #871
12 years ago
Jordi Boggiano
e6f7150196
Change default minimum-stability to "stable", fixes #744
12 years ago
Nils Adermann
f0345f0592
Aliases cannot be updated, they must be uninstalled, fixes #803
12 years ago
Jordi Boggiano
07a266793d
Fix invalid function call
12 years ago
Jordi Boggiano
698c642a9f
Deduplicate packages with a similar name/version in the error output
12 years ago
Nils Adermann
cc7632489d
Make problem report messages more readable
...
Added pretty strings to constraints
12 years ago
Nils Adermann
dc2a9bfe62
Ignore null rules in rule generator
...
Fixes #806
12 years ago
Nils Adermann
5bea5974f7
Improve error messages for solver problems
12 years ago
Nils Adermann
12abff8b4c
Simplify branch handling code
12 years ago
Nils Adermann
76f8642feb
Remove duplicate function from decisions
12 years ago
Nils Adermann
5b1a48663e
DecisionQueueFree is no longer needed
12 years ago
Nils Adermann
2fbc04b950
Make decisions countable and use foreach to iterate them in solver
12 years ago
Nils Adermann
1211d8f7d4
Correctly generate conflict and alias rules for installed packages
12 years ago
Nils Adermann
d592c0a55e
Remove only branches on right levels in revert
12 years ago
Nils Adermann
ac762ba6e9
Correctly resolve branches if necessary
12 years ago
Nils Adermann
67fde90666
Correctly sort operations within transactions using DFS
...
Fixes #655
12 years ago
Nils Adermann
26e051cb76
Decisions are now encapsulated in a separate object
12 years ago
Jordi Boggiano
d21032ace5
CS fixes
12 years ago
Jordi Boggiano
c440b4594a
More PSR-2 goodness
12 years ago
Jordi Boggiano
713309b38c
Show exact version being installed in create-project, fixes #724
12 years ago
Nils Adermann
16a51daac8
Fix typo in comment
12 years ago
Jordi Boggiano
1bd4ccbd54
php-cs-fixer magic
12 years ago
Jordi Boggiano
4ea9b33a6c
Merge remote-tracking branch 'naderman/solver-refactor'
12 years ago
Nils Adermann
21c7e219e2
Change "else if" to "elseif"
12 years ago
Nils Adermann
99200af51b
Correctly indent break statements
12 years ago
Nils Adermann
f193d61dfe
Remove unecessary brackets
12 years ago
Nils Adermann
7f9c5ffeef
Add documentation to RuleWatchChain and RuleWatchNode
12 years ago
Nils Adermann
76d3950992
Document the RuleWatchGraph
12 years ago
Martin Shwalbe
9d80a4e220
Wrong variable used for foreach. Fixes issue 674.
12 years ago
Nils Adermann
265533d390
Rename watches array to watchChains to make clearer what they are
12 years ago
Nils Adermann
e817a2e2d7
Move public members above protected members in rule watch node
12 years ago
Nils Adermann
c869566868
Make ruleHash a protected member of rules
12 years ago
Nils Adermann
fa7bd35413
Make debug solver methods protected
12 years ago
Nils Adermann
2dfea8a5e0
Only consider undecided literals for selectAndInstall
...
Fixes #707
12 years ago
Nils Adermann
dd527a4049
Remove weak rules
...
Since we no longer have suggest/recommend rules and no longer use any update
or feature rules so packages are removed by default, we do not need weak rules
anymore.
12 years ago
Nils Adermann
025581b365
Rename walkLiteral method to more explicitly say what it does
12 years ago
Nils Adermann
a395bc04d7
Get rid of continue 2; and use array_filter instead of manual looping
12 years ago
Nils Adermann
451bab1c2c
Get rid of Literal object / literal id mix, use literals only to save memory
12 years ago
Nils Adermann
9ffe0d13f5
Remove useless if
12 years ago
Nils Adermann
cdf3b4e012
Use SplDoublyLinkedList instead of custom linked list
12 years ago
Nils Adermann
731a451dfe
Move handling of watch graph to separate classes
12 years ago
Nils Adermann
71ee5c8f4c
We don't have a systemsolvable at the lowest level
12 years ago
Nils Adermann
286593cf99
Move solver debugging code into solver subclass
12 years ago
Nils Adermann
46e4ae0e6a
Move rule generation from solver into separate rule set generator
12 years ago
Nils Adermann
83c499cf29
Remove unecessary use statement in Transaction class
12 years ago
Nils Adermann
70e306f055
Process all jobs in one method and remove lock jobs which are not used
12 years ago
Nils Adermann
3fcd042fd4
Skip adding (ignored) duplicate rules which were already added
12 years ago
Nils Adermann
1d60ae1bfc
We no longer support recommended packages, remove left over code
12 years ago
Nils Adermann
92ecf5a603
Remove unused variables
12 years ago
Nils Adermann
bd66c27ff6
We mark packages as uninstallable by removing them from the repo
...
As it is faster to remove packages from the repos and keep them out of the
package pool to begin with, we don't need an installable() method on the
policy.
12 years ago
Nils Adermann
8fc09afbae
Move transaction generation to a separate class
12 years ago
Jordi Boggiano
5026f8a115
Fix AliasOperations output
12 years ago
Jordi Boggiano
453b9a616b
Add test for Pool handling and refactor a couple things
12 years ago
Jordi Boggiano
ef28f3b067
Basic handling of stability flags
12 years ago
Jordi Boggiano
66068fedcb
Add minimum-stability flag on root package to filter packages by stability
12 years ago
Nils Adermann
11c59baf59
Remove useless property in exception class
12 years ago
Nils Adermann
37d271271d
Turn assertions into solver bug exceptions with more info
12 years ago
Jordi Boggiano
fafd09a7ba
Improve output of operations to show details about dev versions
12 years ago
Nils Adermann
863bb59b73
Fix authorship info
12 years ago
Nils Adermann
0c1944a9d0
Let the solver handle aliases instead of the installer
12 years ago
Nils Adermann
15f43571b9
Rules of type feature are no longer needed
12 years ago
Nils Adermann
69b55f12ae
Call feature rules update rules, as there is no difference in composer
12 years ago
Nils Adermann
0bd6fa1f37
An array of installed packages is no longer needed in the solver
12 years ago
Nils Adermann
cf5d14e2e1
Move all solver members to top of the file
12 years ago
Nils Adermann
c51fedef8c
Policy rules cannot conflict with jobs anymore
...
As we no longer need special feature rules for updating installed packages
we don't have policy rules which might conflict with job rules anymore.
Everything is driven by jobs now.
12 years ago
Nils Adermann
5feff954a4
Remove commented out debug output
12 years ago
Nils Adermann
c37e126e14
Installed packages are now always removed unless otherwise requested
...
This means that an update request must always be accompanied by an install
request, otherwise the package might be removed rather than updated.
12 years ago
Nils Adermann
f4ae88a5d6
Create lookup table for installed packages in only one place
12 years ago
Nils Adermann
5daeacf0ac
We won't implement choice rules, you need to edit composer.json to choose
12 years ago
Nils Adermann
875261931c
We do not support any options to keep obsolete packages
12 years ago
Jordi Boggiano
f7440076fa
Revert "Merge remote-tracking branch 'naderman/remove-packages-by-default'"
...
This reverts commit 2988152602
, reversing
changes made to adb4188e12
.
12 years ago
Nils Adermann
f4d5568937
Rules of type feature are no longer needed
12 years ago
Nils Adermann
d153ab3f8f
Call feature rules update rules, as there is no difference in composer
12 years ago
Nils Adermann
f98ab2e491
An array of installed packages is no longer needed in the solver
12 years ago
Nils Adermann
7be4b82ad2
Move all solver members to top of the file
12 years ago
Nils Adermann
6410817c4e
Policy rules cannot conflict with jobs anymore
...
As we no longer need special feature rules for updating installed packages
we don't have policy rules which might conflict with job rules anymore.
Everything is driven by jobs now.
12 years ago
Nils Adermann
3618ddacb0
Remove commented out debug output
12 years ago
Nils Adermann
2cb2cde096
Installed packages are now always removed unless otherwise requested
...
This means that an update request must always be accompanied by an install
request, otherwise the package might be removed rather than updated.
12 years ago
Nils Adermann
1a48ebaf57
Create lookup table for installed packages in only one place
12 years ago
Nils Adermann
0e537b9c93
We won't implement choice rules, you need to edit composer.json to choose
12 years ago
Nils Adermann
5ba9a887c2
We do not support any options to keep obsolete packages
12 years ago
Jordi Boggiano
ebf78135c9
Rename method
12 years ago
Jordi Boggiano
06fb1b8083
Fix priority of aliases when mixing root package aliases with branch-alias ones, fixes #576
12 years ago
Nicolas Le Goff
3f13eb87b1
fix_typo
12 years ago
Jordi Boggiano
53191eb0fe
Remove recommend, make suggest informational, add require-dev, fixes #78 , fixes #510
12 years ago
Jordi Boggiano
452c9ad24e
Merge remote-tracking branch 'naderman/remove-dontfix'
12 years ago
Nils Adermann
64a451eaf9
Remove dontFix feature for local packages and explicit fix command
...
This made sense for the libzypp, so your kernel doesn't get deleted
just cause it thinks something is broken, but it doesn't really make
sense for composer.
12 years ago
Jordi Boggiano
aa21b1a93a
Fix output
12 years ago
Nils Adermann
a16aa68c1d
Rule literals are sorted, so first literal added is not first retrieved
...
Fixes #477
12 years ago
Jordi Boggiano
5fd50080ab
Print details about missing extensions, fixes #312
12 years ago
Nils Adermann
83123b2d40
Generate human readable explanations of rules which cause problems
12 years ago
Nils Adermann
2c87fe5a22
Collect solver problems in Problem objects with human readable output.
12 years ago
Jordi Boggiano
9ed05e09f3
Fix version_compare for ubuntu that ships with versions like 5.3.3-1 (bigger than 5.3.3)
12 years ago
Martin Hasoň
2b08df5192
Changed repository priority in the pool
13 years ago
Jordi Boggiano
c425b8b6cb
Prevent a package from having duplicate names
13 years ago
Nils Adermann
17f0730e51
Levels are always > 0, negative level was just a hack in the C implementation
...
Fixes #243
13 years ago
Jordi Boggiano
956b54e516
Use policy rule instead of stacking up another repo to prioritize aliased packages
13 years ago
Nils Adermann
f3ff53b17c
Create problems directly, rather than generating impossible rules
13 years ago
Nils Adermann
ff620afe05
Correct the parent path in the watch tree, after moving a rule out of the path
13 years ago
Nils Adermann
3e1749fbad
Readd update-all jobs and make them available through the request
13 years ago
Nils Adermann
9b8e62396c
Merge pull request #324 from edorian/installNonExistingPackage
...
Create an 'impossible rule' when installing non existent packages
13 years ago
Nils Adermann
2a92b904d2
Correct placing of braces
13 years ago
Nils Adermann
1ee5d99405
When changing watched literals of a rule, update the parent's next pointer
...
The previous rule was not previously updated to point to the next rule when
removing a middle rule from the watch tree for a literal. This resulted in
jumping from one literal's watch tree to another's, which could then jump
back to the original and cause infinite loop in a case like #265 .
Fixes #265
13 years ago
Volker Dusch
e20a79ac61
Fix TODO tags to confirm with the projects standard
13 years ago
Nils Adermann
8484199677
Display undecided literals as undecided with a ?, when printing the decision map
13 years ago
Nils Adermann
0b8fb68e93
Add a debug print method for the entire watch tree to the solver
13 years ago
Volker Dusch
eafe13d5a5
Create an impossible rule when trying to install something that doesn't exist.
...
The rule isn't acted upon yet (hence the incomplete test) but it is there as a reminder that this case needs to be handled.
13 years ago
Nils Adermann
52d876e11e
Add SolverProblemsException and test basic solver failures
13 years ago
Nils Adermann
8fd4e56029
Deciding to install a package and wanting to install it, is not a conflict
13 years ago
Volker Dusch
3fb75faa75
Now that no more update rules are created the code that handles them can be removed too.
...
Also adapted the tests that used TYPE_UPDATE exemplarily to use TYPE_FEATURE.
13 years ago
Volker Dusch
ec61297122
Remove the allowUninstall policy option and clean up the only usage
13 years ago
Nils Adermann
cbc021c05d
featureRule no longer exists, only update rule
13 years ago
Volker Dusch
5fdca19880
Removed the option to disallowed downgrades and simplifed some places where it was used
13 years ago
Volker Dusch
cc80e5a3b1
Cleanup unreachable code
13 years ago
Nils Adermann
7609f27052
Merge branch 'add-tests' of https://github.com/l3l0/composer into new-master
...
* 'add-tests' of https://github.com/l3l0/composer :
Made fixes after review.
Made changes which fied warnings and errors in tests.
Fixed tests after update and merge of changes from upstream/master
Fixed code. Changes improved code testability
Added and extended some unit tests
13 years ago
Jordi Boggiano
5e3bf86851
Remove .swp file
13 years ago
Volker Dusch
fb69ef64c5
Fix Solver function visibility to reflect what acutally should be the public interface
13 years ago
Nils Adermann
cb7f656fa9
Off by one error in the solver - 1 cannot be false
...
Fixes #133 , #160 , #162 , #177 , #289
13 years ago
Justin Rainbow
8e64229461
Increasing version number to include 5.3.3 which also has an issue with SplFixedArray
13 years ago
Leszek Prabucki
f59ca1e2f8
Made fixes after review.
13 years ago
Leszek Prabucki
9488b0f85f
Fixed code. Changes improved code testability
13 years ago
Joseph Bielawski
188d8beb79
Class name typo fix
13 years ago
Justin Rainbow
7eda0a8823
PHP 5.3.2 segmentation fault fix
...
For some reason, using the SqlFixedArray causes a Segmentation Fault during
an install or update. Changing to a simple array fixes this issue, but in
turn uses more memory. Which is why there is the version test.
13 years ago
Jordi Boggiano
edf948454b
Remove IO from Solver, debug methods don't need it
13 years ago
François Pluchino
0f9dcc9618
Remplace all echo with writeln method of IO
13 years ago
Hugo Hamon
9acbb0c026
[DependencyResolver] removed unused local variables and fixed some wrong local variable names in Solver class.
13 years ago
Artem Lopata (bumz)
de066de198
Fix for composer. When running update/install command it's just do nothing, except writing "Installing dependencies"
13 years ago
Jordi Boggiano
c921a8884e
Adjust operation output, fixes #166
13 years ago
digitalkaoz
87831d8c1c
fixed typo
13 years ago
Jordi Boggiano
f2662b193d
Add --dry-run option and list all operations on --verbose
13 years ago
Jordi Boggiano
d020f2701d
Merge pull request #118 from naderman/priority-replace-any-version
...
Replaced packages have higher priority even if wrong version is replaced
13 years ago
Nils Adermann
5d5d6462e3
Correctly declare all literal properties
13 years ago
Nils Adermann
40b33914b3
Compute rule hashes for faster duplicate detection
13 years ago
Nils Adermann
69f55d37bb
Generate literal ids only once and use in equals()
...
Significant speedup because equals and getId() are called so frequently.
13 years ago
Nils Adermann
bca746c947
Don't consider a revert to level 1 (base level) in sat solver a failure
13 years ago
Nils Adermann
b717ad8851
Display rules in more readable format
13 years ago
Nils Adermann
46e1001b4b
Replaced packages have higher priority, even if wrong version is replaced
13 years ago
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.
13 years ago
Nils Adermann
5bd1722d7e
Merge pull request #77 from benja-M-1/master
...
Fix the exception "Invalid argument supplied for foreach()"
13 years ago
Benjamin Grandfond
72bfe8b92c
Fix Exception in Request
...
Fix the exception "Invalid argument supplied for foreach()" when the
install command is launched multiple times.
13 years ago
Nils Adermann
e4f40272a3
Conflict handling: lastWeakWhy stores a rule, not a rule id
13 years ago
Nils Adermann
3e0e893f26
Correctly output decision map when debugging
13 years ago
Nils Adermann
85d38c653f
Also detect updates resulting from feature rules rather than update rules
13 years ago
Nils Adermann
2056c4c732
Allow downgrades and uninstalls in the default policy
13 years ago
Jordi Boggiano
d3aa8336dc
Fix typo
13 years ago
Nils Adermann
571c14adf9
Prefer original packages over replaced packages of same repository priority
13 years ago
Nils Adermann
44369472be
Define the calculation of package priorities in a single method
13 years ago
Nils Adermann
1b6f57e651
Correctly implement priorities and version numbers in the default policy
13 years ago
Nils Adermann
b52d6d881a
Pool repository index represents priority, highest index = highest priority
13 years ago