Problem/Motivation

const does not support type declarations in PHP 8.1

10.4 still supports 8.1

Proposed resolution

Create a patch that can be used until 8.1 support is dropped

CommentFileSizeAuthor
#5 vite-php_8_2.patch3.11 KBmortona2k
#2 vite-3514302.patch510 byteschrisscrumping

Issue fork vite-3514302

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

chrisscrumping created an issue. See original summary.

chrisscrumping’s picture

StatusFileSize
new510 bytes
proteo’s picture

Status: Active » Reviewed & tested by the community

Had to install the module on a site with Drupal 10.4.5 and PHP 8.1. The patch works a treat, thank you!

philipps’s picture

I can confirm that the patch ensures the module remains PHP 8.1 compatible.RetryClaude can make mistakes. Please double-check responses.

mortona2k’s picture

StatusFileSize
new3.11 KB

The type declarations were added in https://git.drupalcode.org/project/vite/-/commit/56f50a4067536e8b756e1a2...

Here's a patch made by reverting the commit, which includes some additional changes in test files.

norman.lol’s picture

RTBC++ 🥳

(Friends, please pay attention on the patch file naming. 🙏🏻 Following minimal convention of ISSUEID-COMMENTID.patch makes navigating drupal.org issues and identifying the connected comment much easier until everything is hopefully moved to GitLab soon. 🤞🏻)

wotnak made their first commit to this issue’s fork.

  • wotnak committed e4693c12 on 1.x
    [#3514302] fix: 10.4 PHP 8.1 syntax error
    
    By: chrisscrumping
    By: proteo...
wotnak’s picture

Status: Reviewed & tested by the community » Fixed

Merged and released in 1.5.0.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

  • wotnak committed 364ffe57 on 1.x
    [#3514302] fix: remove no longer needed min php version declaration from...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.