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
ff59bbdab0
CS fixer
6 years ago
Gabriel Caruso
3d262bd637
Fixes from PHPStan level 0
...
More fixes from PHPStan level 0
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
Nils Adermann
7dffe79a0f
Update tests of solver problem message to match new message
7 years ago
Jordi Boggiano
122e422682
CS fixes
8 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
8 years ago
Jordi Boggiano
4cd6eabdba
Merge branch '1.2'
8 years ago
Yanick Witschi
4a769a785c
Reduce calls on Rule::getHash()
8 years ago
Rob Bast
9cbcda9ae6
add test that asserts pool priority matters
...
also switch assertEquals for assertSame
8 years ago
Jordi Boggiano
1bd9c8da3c
More ruletest fixes for 7.1
9 years ago
Jordi Boggiano
c74e6df65d
Fix strings being passed to an int arg, fixes 7.1 build
9 years ago
David Prévot
933a8e1d09
Fix method name
...
It makes the test fail with recent (>= 3.1) phpunit-mock-objects
version.
9 years ago
Niels Keurentjes
8e78ce9a43
Add extra logging before and after SAT solving
9 years ago
Jefferson Carpenter
b7845bb6c0
Update SolverTest.php
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
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
b869fa9662
Correct rule hash test
9 years ago
Possum
2e99b9fdf5
Use https where possible
10 years ago
Nils Adermann
b4ed331168
The Solver Request no longer depends on the Pool
10 years ago
isoroku
e0657b60a2
Fix misspellings
10 years ago
Nicolas Grekas
4a0feb0189
add --prefer-lowest-stable to update command
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
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
Nils Adermann
5b80144ad0
Resolve job packages after whitelist generation
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
38917c2047
Add parallel build to travis script
11 years ago
Jordi Boggiano
051d219438
Fix whatProvides returning too many results when no constraint is given
11 years ago
Jordi Boggiano
e848c76cbc
Only compare branches as versions in the policy to sort packages, but not in the solver, fixes #1817
12 years ago
Jordi Boggiano
cc9dac8fe2
Fix tests and convert all package lists to Name[Versions] format
12 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.
12 years ago
Jordi Boggiano
b41fd35c2b
Remove unused use statement
12 years ago
Jordi Boggiano
0700cd9186
Adjust according to feedback
12 years ago
Jordi Boggiano
db4055b778
Put a higher prio on replacers of the same vendor as the required package
12 years ago
Jordi Boggiano
b0297ef67a
Add prefer-stable flag to pick stable package over unstable ones when possible
12 years ago
Jordi Boggiano
3ca22f9ef1
Fix class name
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
beb9a5bd72
Code optimizations: avoid loops in match()
12 years ago
Jordi Boggiano
18492a1f84
Remove Pool::getMaxId and the solver's reliance on it
12 years ago
Jordi Boggiano
fb4183d5ad
Fix tests
12 years ago
Jordi Boggiano
d4aab7d5b6
Fix solver test
12 years ago
Jordi Boggiano
6573fd3f77
Add hint in solver exceptions as to what may be wrong
12 years ago
Jordi Boggiano
175d1939b5
Fix tests
12 years ago
Jordi Boggiano
e6f7150196
Change default minimum-stability to "stable", fixes #744
12 years ago