PHP 8.1 is not compatible with Yii 2.0.45

{
    "name": "yiisoft/yii2-app-basic",
    "description": "Yii 2 Basic Project Template",
    "keywords": ["yii2", "framework", "basic", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">=7.3.0",
        "yiisoft/yii2": "2.0.45",
        "yiisoft/yii2-bootstrap": "~2.0.0",
        "yidas/yii2-bower-asset":"*",
        "symfony/mailer": "^6.2"
    },
    "require-dev": {
        "yiisoft/yii2-debug": "~2.0.0",
        "yiisoft/yii2-gii": "~2.0.0",
        "yiisoft/yii2-faker": "~2.0.0"


    },
    "config": {
        "process-timeout": 1800,
        "fxp-asset":{
            "installer-paths": {
                "npm-asset-library": "vendor/npm",
                "bower-asset-library": "vendor/bower"
            }
        },
        "allow-plugins": {
            "yiisoft/yii2-composer": true
        }
    },
    "scripts": {
        "post-create-project-cmd": [
            "yii\\composer\\Installer::postCreateProject"
        ]
    },
    "extra": {
        "yii\\composer\\Installer::postCreateProject": {
            "setPermission": [
                {
                    "runtime": "0777",
                    "web/assets": "0777",
                    "yii": "0755"
                }
            ],
            "generateCookieValidationKey": [
                "config/web.php"
            ]
        }
    }
}

This is my composer.json file and its not working with PHP 8.1.17, What should i do ?

did you try to change it to latest framework version?

Yes, but still its didn’t work

What is “not working” supposed to mean?

Not functioning

Yii2 is compatible with PHP up till PHP 8.2.

Not really. 8.2 is awaiting PR to be merged. Most of things work but some crashes on 8.2