Releases: julien-boudry/Condorcet
Releases · julien-boudry/Condorcet
Version 4.7.0
Description
The minimum PHP version is now 8.3
Added
- CondorcetElectionFormat object can be created directly from a string input instead of only SplFileInfo object.
Dev
- Complete the migration to Pest PHP
Version 4.6.0
Description
Half-migration of tests to PestPHP.
Added
- Experimental WoollyM PHP DataFrame driver.
Version 4.5.0
Description
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.
Added
Voting Methods
- New vote method: Random Ballot
- New vote method: Random Candidates
Public API
- Results object new property
Result->pairwise
contain an immutable and explicit pairwise array, from the object creation. Election->countVotes()
,Election->countValidVoteWithConstraints()
,Election->countValidVoteWithConstraints
andElection->sumValidVotesWeightWithConstraints
now optionally support votes filtering by tags.- New
CondorcetElectionFormat::parameters
property, an array containing raw and untouched parameters from input, including non-standard parameters.
Internal Modules API
- New algo tool
VotesDeductedApprovals
- New FilteredPairwise object and API
- Add a flag for preliminary support for non-deterministic methods
- New API
Vote->getContextualRankingWithCandidatesKeys(Election $election)
to prevent code deduplication inside the votes method code.
Changed
Public API
- Migrate
CondorcetPHP\Condorcet\Tools\Converters\CondorcetElectionFormat
class toCondorcetPHP\Condorcet\Tools\Converters\CEF\CondorcetElectionFormat
- Fix a bug with about MaxParseIteration that triggered the exception 1 vote in advance.
- Create new dedicated
ParseVotesMaxNumberReachedException
for max parsing fail. Election::maxParseIteration
andElection::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.
Console
- Ignore duplicate candidates instead of an error at the end
- Fix bug #147: crash on importing from ConforcetElectionFormat without pdo_sqlite extension.
- Display separator is always semicolon, instead of commas in some cases (to avoid confusion with the input format)
- Add a warning if only one candidate is registered
Internal changes
- Refactoring Linkable logic and organization
- Move Pairwise namespace
Engine
- Fix a rare bug affecting the validity of results in some case of
Election->removeAllVotes()
used in conjunction withElection->allowsVoteWeight
in a particular sequence. And prevent similar cases in the future. #153 - Various optimizations & refactors
Dev
- Skip concerned tests if pdo_sqlite is not available.
- Add CI tests without pdo_sqlite
- Remove the
RunInSeparateProcess
strategy, useBackupStaticProperties
instead or refactor to don't use any of them if possible. - Compatibility with PestPHP
Version 4.4.1
Changed
- Fix #147. Command line crash when importing CondorcetElectionFormat file if PDO Sqlite is not available.
Full Changelog: v4.4.0...v4.4.1
Version 4.4.0
Description
Add a new console command to convert an election file format to another format.
Added
- New
convert
command. - New converter (export only) for the Civs format.
Internal changes
- Converter now uses distinct interfaces for import and export capabilities.
Version 4.3.1
Changed
- Force Terminal Ansi24 (truecolor) for Docker build instead of Ansi4.
Version 4.3.0
Description
Require PHP 8.2
. Include a new random vote generator API. Provide some devcontainers for dev and command line usage.
Added
Public API
- New VotesRandomGenerator class providing random votes following either a reproducible or cryptographically secure scheme with many options.
- New
Election->removeAllVotes()
method. - New
Election->countRanks()
method. - Votes objects now support the ArrayAccess interface (readonly).)
Distribution
- New Devcontainer for prod. Very easy to execute as a command line application directly in Github Codespace.
Docs
- New Docs directory structure.
- New www.condorcet.io docbook replacing Github Wiki.
- Improve Api Reference docs generator.
- Ongoing efforts to improve documentation.
Internal changes
Engine
- Upgrade to
PHP 8.2
and use new features. - Add some
true
return type. - Various refactoring & cleanup.
Dev
- New Dev Container for Dev
- Migrate to PHPUnit 10
Version 4.2.2
Dev
- Upgrade to PHPUnit
^10
Version 4.2.1
Changed
- [Console] Fix issue #110 - Crash on environnement without
PDO/Sqlite
or with the--deactivate-file-cache
option. - [Console] Fix a
memory_limit
crash despite dataHandler driver if one entry with a multiplier contains more votes thanmemory_limit
allows.
Version 4.2.0
Description
Redesign & refactor the console. And internal improvements.
Added
- Support for PHP 8.2
- [Console] Redesign console, add many styles, colors, and logo.
- [Console] Improve interactive mode.
Changed
- [Methods] Fix a rare crash on HighestAverage methods.
- New namespace
CondorcetPHP\Condorcet\Utils
and moveCondorcetUtil
andVoteUtil
classes to it.
Internal
- Refactor Vote entry parser to new class
CondorcetPHP\Condorcet\Utils\VoteEntryParser
: Better architecture and reduced code duplication.
Dev
- [Benchmarks] Use a random deterministic seed for generating votes. (Benchmarks now require PHP 8.2 at least)
- [Tests] Use a random deterministic if available (PHP >= 8.2) for generating votes.
- [Coding Style] Improve rules.