Skip to content

Utilized SortDirection enum from PHP 8.6#580

Merged
nyamsprod merged 6 commits into
thephpleague:masterfrom
okorneliuk:sort-direction-enum
Jul 2, 2026
Merged

Utilized SortDirection enum from PHP 8.6#580
nyamsprod merged 6 commits into
thephpleague:masterfrom
okorneliuk:sort-direction-enum

Conversation

@okorneliuk

@okorneliuk okorneliuk commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Related to #579

Added a polyfill of upcoming PHP 8.6, used SortDirection enum from it instead of private constants in Column. Slightly extended public API so it is possible to use SortDirection directly in sortOn method.

@nyamsprod

Copy link
Copy Markdown
Member

@okorneliuk thanks for the PR. While it would be nice to have this inside the package. The CSV package is meant to be used without dependencies so the best course of action would be to update this PR by including the polyfill directly inside the package.

Comment thread polyfill/sort_direction.php Outdated
Comment thread polyfill/SortDirection.php
Comment thread composer.json Outdated
Comment thread docs/9.0/extensions/doctrine.md Outdated
@nyamsprod nyamsprod self-assigned this Jul 1, 2026
@nyamsprod
nyamsprod merged commit 5bf499c into thephpleague:master Jul 2, 2026
9 checks passed
@nyamsprod

Copy link
Copy Markdown
Member

@okorneliuk I will merge as is your feature and make sure to add your name in the release. But I may update the implementation if needed thanks for the PR and the work 👍🏾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants