mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
5e2ca7f0a3
Wrap doesn't actually wrap in the tidy extension. This causes tests to be flakey, for example some of `FormTest` fails if you happen to have `ext-tidy` installed (which is the default on most systems). This happened to me on PHP 7.4.19 with tidy 5.6.0 (OSX Homebrew). Note that the tests aren't failing in Travis right now. You'd expect `wrap => 0` to be honoured. It's documented as an integer in the tidy docs: https://api.html-tidy.org/tidy/quickref_5.6.0.html#wrap. Even tracked this down to the PHP source which appears to be doing the right thing: https://github.com/php/php-src/blob/master/ext/tidy/tidy.c#L300 There's a bug from 2018 against PHP 7.2.8 which was closed as "not a bug" without comment: https://bugs.php.net/bug.php?id=76683 You can see the behaviour in action in the following test. ``` <?php $html = '<p>a really long string which should not be wrapped</p>'; echo "## With tidy extension" . PHP_EOL; $tidy = new tidy(); $tidy->parseString( $html, [ 'output-xhtml' => true, 'numeric-entities' => true, 'wrap' => 0, ], 'utf8' ); $tidy->cleanRepair(); echo $tidy . PHP_EOL; echo "## With tidy cli" . PHP_EOL; $cmd = sprintf("echo " . escapeshellarg($html) . " | tidy --force-output 1 -n -q -utf8 -asxhtml -w 0 2> /dev/null"); echo shell_exec($cmd); ``` Long story short, setting it to 99999 fixes the issue. |
||
---|---|---|
_config | ||
.github | ||
.tx | ||
client | ||
docs | ||
lang | ||
src | ||
templates | ||
tests | ||
thirdparty | ||
_config.php | ||
_register_database.php | ||
.codecov.yml | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.scrutinizer.yml | ||
.travis.yml | ||
.upgrade.yml | ||
behat.yml | ||
cli-script.php | ||
composer.json | ||
CONTRIBUTING.md | ||
LICENSE | ||
phpcs.xml.dist | ||
phpunit.xml.dist | ||
README.md | ||
sake | ||
silverstripe_version | ||
SUPPORT.md |
SilverStripe Framework
PHP framework forming the base for the SilverStripe CMS (https://silverstripe.org).
Requires a silverstripe-installer
base project. Typically used alongside the cms
module.
Installation
See installation on different platforms, and installation from source.
Bugtracker
Bugs are tracked on github.com. Please read our issue reporting guidelines.
Development and Contribution
If you would like to make changes to the SilverStripe core codebase, we have an extensive guide to contributing code.
Links
- Server Requirements
- Changelogs
- Bugtracker: Framework
- Bugtracker: CMS
- Bugtracker: Installer
- Forums
- Developer Mailinglist
- License
Attribution
- Some icons by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License.
- default_media.png by Thibault Geffroy from The Noun Project. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License.