Skip to content
Snippets Groups Projects

Resolve #3398815 "Php 8.2 support"

3 unresolved threads

Closes #3398815

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
20 20 */
21 21 public function getFilters() {
22 22 return [
23 new TwigFilter('typogrify', [$this, 'filter'], ['is_safe' => ['html']]),
23 new TwigFilter('typogrify', $this->filter(...), ['is_safe' => ['html']]),
  • Benji Fisher
    Benji Fisher @benjifisher started a thread on commit 93d9894e
  • 24 24 /**
    25 25 * Fri 9 Dec 2005.
    26 26 */
    27 const SMARTYPANTS_PHP_VERSION = '1.5.1e';
    27 final public const SMARTYPANTS_PHP_VERSION = '1.5.1e';
    • Comment on lines -27 to +27

      Same question: is this fixing an actual problem or is it just what Rector recommends? (A rector-mendation?)

    • I can confirm that without the final public modifiers, there are no PHP warnings.

      Tested on the settings page for a text format which uses the typogrify filter, as that uses the TYPOGRIFY_VERSION constant.

    • Please register or sign in to reply
  • Benji Fisher
    Benji Fisher @benjifisher started a thread on commit 93d9894e
  • 283 280 if ($cur_token[0] == 'tag') {
    284 281 // Don't mess with quotes inside tags.
    285 282 $result .= $cur_token[1];
    286 if (preg_match(self::SMARTYPANTS_TAGS_TO_SKIP, $cur_token[1], $matches)) {
    283 if (preg_match(self::SMARTYPANTS_TAGS_TO_SKIP, (string) $cur_token[1], $matches)) {
    • Comment on lines -286 to +283

      It looks to me as though $cur_token[1] is already a string. So I do not think that PHP will object here.

      PHPStan might object, but then I think a better fix is to add a string[][] declaration to Line 266 (where $tokens is set) or a string[] declaration to Line 279 (where $cur_token is the loop variable).

    • Please register or sign in to reply
  • Benji Fisher added 4 commits

    added 4 commits

    Compare with previous version

  • ambient.impact added 4 commits

    added 4 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading