Command line application and PHP library, providing an election engine with a high-level interface. Native support 20+ voting methods, easy to extend. Support simple elections with ease or billions of votes in low resource environment. Intensively tested and highly polyvalent.
A major release, including two new voting methods, additions to the internal API, and additions to the public API. It also comes with its fair share of refinements and fixes in various areas, notably the Console.
Result->pairwise
contain an immutable and explicit pairwise array, from the object creation.Election->countVotes()
, Election->countValidVoteWithConstraints()
, Election->countValidVoteWithConstraints
and Election->sumValidVotesWeightWithConstraints
now optionally support votes filtering by tags.CondorcetElectionFormat::parameters
property, an array containing raw and untouched parameters from input, including non-standard parameters.VotesDeductedApprovals
Vote->getContextualRankingWithCandidatesKeys(Election $election)
to prevent code deduplication inside the votes method code.CondorcetPHP\Condorcet\Tools\Converters\CondorcetElectionFormat
class to CondorcetPHP\Condorcet\Tools\Converters\CEF\CondorcetElectionFormat
ParseVotesMaxNumberReachedException
for max parsing fail.Election::maxParseIteration
and Election::setMaxVoteNumber
are now public properties and they can be accessed or modified directly. Corresponding setter and getter methods still exists but may be deprecated with v5.0.Election->removeAllVotes()
used in conjunction with Election->allowsVoteWeight
in a particular sequence. And prevent similar cases in the future. #153RunInSeparateProcess
strategy, use BackupStaticProperties
instead or refactor to don't use any of them if possible.Full Changelog: https://github.com/julien-boudry/Condorcet/compare/v4.4.0...v4.4.1
Require PHP 8.2
. Include a new random vote generator API. Provide some devcontainers for dev and command line usage.
Election->removeAllVotes()
method.Election->countRanks()
method.PHP 8.2
and use new features.true
return type.Redesign & refactor the console. And internal improvements.
CondorcetPHP\Condorcet\Utils
and move CondorcetUtil
and VoteUtil
classes to it.CondorcetPHP\Condorcet\Utils\VoteEntryParser
: Better architecture and reduced code duplication.