Skip to content

Releases: julien-boudry/Condorcet

Version 5.0.7

25 Feb 21:11
6847134

Choose a tag to compare

Description

Bug fix and maintenance release with type annotation improvements.

Fixed

  • Restored brick/math version constraint to allow both ^0.14 and ^0.15 (regression introduced in v5.0.5).

Version 5.0.6

24 Feb 22:02
v5.0.6
8e49900

Choose a tag to compare

Description

Maintenance release focused on static-analysis quality and method metadata consistency.

Added

  • Added explicit IS_INFORMATIONAL metadata support to better expose informational-only algorithms.

Changed

  • Marked Smith set and Schwartz set as informational methods (IS_INFORMATIONAL = true).
  • Extended test coverage to assert IS_INFORMATIONAL across the full authorized method list, ensuring only Smith set and Schwartz set are informational.
  • Updated PHPDoc type annotations (including return types) to improve PHPStan and static analysis quality.
  • Vote and candidate removal methods now maintain original array keys in the returned array.

Version 5.0.5

21 Feb 21:40
v5.0.5
1229954

Choose a tag to compare

Description

Maintenance release with dependency updates.

Changed

  • Updated brick/math dependency to ^0.15.
  • Updated pestphp/pest dev dependency to ^4.4.
  • Updated friendsofphp/php-cs-fixer dev dependency to ^3.94.

Version 5.0.4

20 Feb 15:25
v5.0.4
cc0b92c

Choose a tag to compare

Description

Bug fix release for the timer subsystem.

Fixed

  • Timer — silent tracking gaps: Timer\Chrono instances created without being
    assigned to a variable were immediately destroyed (PHP destructor fires at
    end-of-statement), recording ~0 ms instead of the actual operation time. Affected
    operations: Pairwise::doPairwise(), Pairwise::addNewVote(),
    Pairwise::removeVote(), and the CondorcetBasic branch of getWinner() /
    getLoser(). As a result, getGlobalTimer() was underreporting total computation
    time and getTimerManager()->getHistory() was missing entries.

Changed

  • Timer\Manager — wall-clock model: addTime() now always records every chrono
    in history regardless of nesting. globalTimer is recalculated as
    last_end − startDeclare (wall-clock of the full computation window) instead of
    being a running sum, eliminating double-counting when chronos are nested (e.g.
    GetResult wrapping GetWinner/GetLoser triggered by Result::__construct).

Internal changes

  • Timer\Manager::$history and getHistory() are now fully typed with a PHPDoc
    array shape: list<array{role: ?string, process_in: float, timer_start: float, timer_end: float}>.
  • Added comprehensive tests for Timer\Manager::getHistory().

Version 5.0.3

29 Nov 13:53
v5.0.3
feaf181

Choose a tag to compare

Description

Maintenance release with Symfony 8 support and dependency updates.

Changed

  • Added support for Symfony 8.0 components, now requiring Symfony 7.4 minimum.
  • Updated friendsofphp/php-cs-fixer dependency to ^3.91.

Internal changes

  • Removed unnecessary PHPStan ignore comments in Pairwise class.

Version 5.0.2

24 Nov 16:53
v5.0.2
c216556

Choose a tag to compare

Description

Maintenance release with dependency updates and CI improvements.

Changed

  • Reverted brick/math dependency to stable version ^0.14.1 for better compatibility.

Version 5.0.1

23 Nov 22:12
v5.0.1
79dd712

Choose a tag to compare

Description

Maintenance release with bug fixes, PHP 8.5 support, and documentation improvements.

Added

  • Support for PHP 8.5.
  • PHPDoc descriptions to all classes for better IDE support.
  • API and internal annotations to interfaces for better documentation.

Changed

  • Schwartz Set method: Improved and fixed algorithm implementation regarding ties and cycles. No longer marked as experimental.
  • Smith Set method: Fixed algorithm implementation regarding ties and cycles. No longer marked as experimental.
  • CPO-STV method: Renamed stats key Candidates eliminated from first round to Candidates remaining after first round for clarity.
  • Improved console completion implementation.
  • Symfony components 7.3 minimum are now required as it is the only version supported by Symfony.

Fixed

  • Fixed PHP 8.5 deprecations related to null offset access.
  • Fixed PHPDoc references to include full namespaces for better IDE support across multiple classes.
  • Fixed CPO-STV method: Corrected a bug in the tie-breaker comparison for the final ranking.
  • Fixed CPO-STV method: Corrected the coefficient calculation for vote weights in the internal pairwise comparison.
  • Enabled failOnWarning, failOnDeprecation, and failOnNotice in PHPUnit configuration for stricter testing.
  • Added skipOnWindows to PHP preset to address Pest compatibility issues on Windows.

Internal changes

  • Updated candidate name increment logic to use native str_increment() function.
  • Use first-class callable syntax where applicable.

Dev

  • Migrated from Laravel Pint to the original PHP CS Fixer for code style management.
  • Updated dependencies in composer.json for compatibility and improvements.
  • Updated PHPStan, Rector, PHP CS Fixer, and Pest versions.
  • Updated macOS version in GitHub workflow to latest stable release.
  • Updated PHP version to 8.5 in workflow files.
  • Added --prefer-lowest stability testing to CI matrix (Ubuntu only) to ensure compatibility with minimum supported dependency versions.
  • Various linter improvements and fixes.

Version 5.0.0

30 Apr 20:10
v5.0.0
03de71d

Choose a tag to compare

Description

Major release with many breaking changes, a modernized API, removal of deprecated features, and significant optimizations.
To upgrade, it is recommended to test carefully and read the documentation. However, the main concepts and methods remain mostly unchanged.

Breaking Changes

  • Removal of methods, notably many old setters/getters replaced by direct access to public properties.
  • Many methods and properties have been renamed or merged for better consistency.
  • Result stats API has been completely reworked.
  • Dropped support for PHP < 8.4.
  • Some methods no longer return true if no error occurs. Instead, they return static to allow method chaining.

Added

  • Documentation now uses standard PHPDoc tags, compatible with IDEs.
  • Brand new documentation book available at https://docs.condorcet.io, replacing the old one.

Changed

  • Result objects now expose all their properties as typed, read-only properties instead of getters methods.
  • Result stats no longer return as a mixed value (previously: array), but now return an object implementing StatsInterface.

Dev

  • Added Pest mutation testing and advanced static analysis.
  • Added some architecture tests.
  • PHPStan 2.0 configuration.
  • PHP Rector configuration.
  • Added some PHPDoc generics.

Version 4.7.0

14 Jun 20:51
v4.7.0
d183091

Choose a tag to compare

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

28 Jan 17:58
v4.6.0
574e257

Choose a tag to compare

Description

Half-migration of tests to PestPHP.

Added

  • Experimental WoollyM PHP DataFrame driver.