Skip to content

Breaking Change - 3 Defaults #4340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2025
Merged

Conversation

oleibman
Copy link
Collaborator

@oleibman oleibman commented Feb 4, 2025

Fix #4092. Change default value for Csv Reader autodetect line endings. Prior behavior can be enabled via setTestAutodetect(true).

Change default value for Html Writer "better boolean" logic. Prior behavior can be explicitly enabled via setBetterBoolean(false).

Change default for Xlsx Writer forceFullCalc option. Prior behavior can be explicitly enabled via setForceFullCalc(null).

This is:

  • a bugfix
  • a new feature
  • refactoring
  • additional unit tests
  • more sensible default values

Checklist:

Fix PHPOffice#4092. Change default value for Csv Reader autodetect line endings. Prior behavior can be enabled via `setTestAutodetect(true)`.

Change default value for Html Writer "better boolean" logic. Prior behavior can be explicitly enabled via `setBetterBoolean(false)`.

Change default for Xlsx Writer forceFullCalc option. Prior behavior can be explicitly enabled via `setForceFullCalc(null)`.
@oleibman oleibman added this pull request to the merge queue Feb 5, 2025
Merged via the queue into PHPOffice:master with commit 65f7158 Feb 5, 2025
14 checks passed
@oleibman oleibman deleted the chgdefault branch February 8, 2025 06:12
@u01jmg3
Copy link
Contributor

u01jmg3 commented Jul 18, 2025

I realise this is an older PR, but I've just updated from v2 to v4 of PHPSpreadsheet.


Change default for Xlsx Writer forceFullCalc option. Prior behaviour can be explicitly enabled via setForceFullCalc(null).

Can you clarify what behaviour change this causes? My interpretation is that forceFullCalc has changed from null to false as its default value, but I'm not sure of the ramifications.

We use $writer->setPreCalculateFormulas(false); to allow comma-separated cell references. Will the forceFullCalc change have any effect?

Thanks for all your hard work

@oleibman
Copy link
Collaborator Author

You probably don't want forceFullCalc, so you probably shouldn't be adversely affected by this change. See PR #4271 for a description of forceFullCalc and why we planned to make this change (as we eventually did).

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

Successfully merging this pull request may close these issues.

$reader->setTestAutodetect() not usefull when php version > 8.1
2 participants