Repository navigation
Conversation
(cherry picked from commit 7091e21)
Coding standards only, no functional change. Adds the .php-cs-fixer.dist.php configuration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stack: - Require Symfony ^7.4|^8.0 (7.0-7.3 are EOL) and Doctrine ORM ^2.20|^3.3 - Declare the dependencies actually used (dependency-injection, deprecation-contracts); symfony/yaml is no longer needed - Use AbstractBundle instead of the Extension/Configuration classes - Replace Travis CI by GitHub Actions (PHP 8.2 to 8.5, lowest/highest deps), add PHPStan and PHP CS Fixer - Remove dead files (Propel/Symfony 2 test fixtures, routing.yml, tracked .phpunit.result.cache) Deprecations: - Exports no longer call the deprecated postExecute() unless overridden (a deprecation is then triggered) - Remove the deprecated Twig "spaceless" filter from the templates - Fix json_decode(null) in getBatchData() when there is no batch cookie - Drop the PhpSpreadsheet < 1.23 compatibility code - Migrate the PHPUnit configuration, fail on deprecations Fixes: - getAllResults() returned only the current page after execute() - getRequestedAction() threw a TypeError when no action was requested - The session was required at construction time (console commands) - FilterObject now accepts any FormFactoryInterface - batchHeader macro referenced a non-existent "pager" property Tests: rewritten on real Symfony services and an in-memory SQLite database (Doctrine Query is final and can no longer be mocked). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CSV: csanquer/colibri-csv (and ddeboer/transcoder) have not been released since 2015 and trigger a PHP 8.1+ deprecation for every null cell. They are replaced by an internal CsvWriter accepting the same "csvWriter" options with the same defaults (Excel dialect: ";", CP1252, CRLF). The output is byte-identical (checked on 1,792 option combinations). Projects using colibri-csv classes directly must now require it themselves. JS: jquery.batch.js no longer needs the jquery.cookie plugin (abandoned). Native helpers keep the same cookie format, so existing batch selections stay readable; cookies are now SameSite=Lax (and Secure over HTTPS). Also fixes the "select all" checkbox never being updated (wrong selector) and the shared default data being mutated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add UPGRADE-8.0.md and the "8.x-dev" branch alias for master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Doctrine ORM 3 requires a proxy directory when native lazy objects are not available (PHP < 8.4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As suggested in #19: - New AbstractExport base class: the response is built from getContentType() and getFilename() instead of being duplicated in each export - New AbstractSpreadsheetExport accepting any PhpSpreadsheet writer (ODS, HTML, PDF...) through createWriter(); AbstractXlsExport is now its XLSX flavour - CsvExport and AbstractXlsExport keep the same content and headers Also fixes XLSX exports containing an extra empty column after the last header. Spreadsheet exports are now tested in CI (PHP 8.4 job). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernizes the bundle, removes the deprecations it triggered, and replaces two abandoned dependencies. Intended to be released as 8.0.0 (see UPGRADE-8.0.md for the BC breaks).
Please merge with a merge commit (not squash): the commits are meant to be reviewed separately.
Commits
symfony7branch (7091e21), which was never merged.getAllResults()called withoutexecute()ignored the filters. A regression test is added in a later commit.@Symfony,@PHP82Migration), no functional change.^7.4|^8.0(7.0–7.3 are EOL), Doctrine ORM^2.20|^3.3, missing direct dependencies declared,symfony/yamlno longer neededAbstractBundleinstead of the Extension/Configuration classespostExecute()called on every export (PHP 8.4+#[\Deprecated]), Twigspacelessfilter,json_decode(null)without a batch cookie, PhpSpreadsheet < 1.23 compat code, PHPUnit config schemagetAllResults()returned only the current page afterexecute();getRequestedAction()TypeError when no action was requested; session required at construction time (console);batchHeadermacro referencing a non-existentpagerpropertyDoctrine\ORM\Queryis final, the previous mocks no longer worked: the suite was failing onmaster). Dead Propel/Symfony 2 fixtures removed.csanquer/colibri-csvandddeboer/transcoder(no release since 2015; deprecation on everynullcell) are replaced by an internalCsvWriter: samecsvWriteroptions and defaults, byte-identical output (checked on 1,792 option combinations)jquery.batch.jsno longer needsjquery.cookie: native helpers with the same cookie format (current selections kept),SameSite=Lax/Secure. Also fixes the "select all" checkbox never being updated.UPGRADE-8.0.mdand8.x-devbranch alias.AbstractExportbase class:getResponse()is built fromgetContentType()andgetFilename(), no more duplicated response codeAbstractSpreadsheetExport: any PhpSpreadsheet writer viacreateWriter()(ODS, HTML, PDF…).AbstractXlsExportis now its XLSX variantmpdf/mpdfis GPL-2.0,dompdf/dompdf(LGPL-2.1) andtecnickcom/tcpdf(LGPL-3.0) are mentioned as alternativesChecks
failOnDeprecationenabledcomposer audit: OKext-gd), no test skippedTo check during review
jquery.batch.jswas only tested in Node (cookie read/write), not in a browser: a manual check on a project using batch actions is welcome.After merge
8.0.0+ GitHub Releasesymfony7branch can be deleted (its only commit is included here)🤖 Generated with Claude Code