I had Got same ""Deprecated Functionality: Function ReflectionType::__toString() is deprecated" when i was installing magento2.3.6 on php7.4.
I had did some more changes in magento vendor module as above @abdul defined for work in staging server.
File 1: vendor/laminas/laminas-code/src/Reflection/ParameterReflection.php file
Change detectType function if condition where return type is converted in string. I had remove string
if (method_exists($this, 'getType')
&& ($type = $this->getType())
&& $type->isBuiltin()
) {
return $type->getName();
}
File 2: vendor/magento/module-catalog/Model/Category/Attribute/Backend/Sortby.php
i was changed beforeSave function. updated ternary operator there.
find in beforeSave function.
$attributeValue = is_array($data) ? reset($data) :
(!empty($data)) ? $data : null;
To
$attributeValue = (is_array($data) ? reset($data) :
(!empty($data))) ? $data : null;
File 3: vendor/magento/framework/App/AreaList.php
change in public function getCodeByFrontName($frontName) function
find
if ($areaInfo['frontName'] === $frontName) {
And Replace it with
if (isset($areaInfo) && $areaInfo['frontName'] == $frontName) {
As above @abdul describe.
After i had execute successfully "setup:upgrade" and "Static-content:deploy -f" command.
php74 bin/magento c:c
check this link --- stackoverflow.com/a/60437067/11908692