cancel
Showing results for 
Search instead for 
Did you mean: 

commande line install error

SOLVED
Highlighted

commande line install error

i get this when i try to install it 

centos 7

php 7.4

 

[Progress: 234 / 917]
Module 'Magento_Amqp':

In ErrorHandler.php line 61:

Deprecated Functionality: Function ReflectionType::__toString() is deprecated in
/var/www/html/vendor/zendframework/zend-code/src/Reflection/ParameterReflection
.php on line 84

 

any help?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: commande line install error

@william-christo go to the above mention line no. and Use getName() instead __toString() .

 

Thanks

View solution in original post

7 REPLIES 7
Highlighted

Re: commande line install error

@william-christo go to the above mention line no. and Use getName() instead __toString() .

 

Thanks

View solution in original post

Highlighted

Re: commande line install error

how do I change it?

the code says :

) {
return (string) $type;
}

 

how do I write it down? I changed it to

{
return getName(); $type;
}

but still gives errors

Highlighted

Re: commande line install error

@starlyn_tejada you have to replace __toString() not (string)

Re: commande line install error

in the cli it says the error is in line 84, This is what Line 84 says:

return (string) $type;

 

the whole function is:

/**
* Get parameter type
*
* @return string|null
*/
public function detectType()
{
if (method_exists($this, 'getType')
&& ($type = $this->getType())
&& $type->isBuiltin()
) {
return (string) $type;
}

// can be dropped when dropping PHP7 support:
if ($this->isArray()) {
return 'array';
}

// can be dropped when dropping PHP7 support:
if ($this->isCallable()) {
return 'callable';
}

if (($class = $this->getClass()) instanceof \ReflectionClass) {
return $class->getName();
}

$docBlock = $this->getDeclaringFunction()->getDocBlock();

if (! $docBlock instanceof DocBlockReflection) {
return null;
}

$params = $docBlock->getTags('param');

if (isset($params[$this->getPosition()])) {
return $params[$this->getPosition()]->getType();
}

return null;
}

/**
* @return string
*/
public function toString()
{
return parent::__toString();
}

/**
* @return string
*/
public function __toString()
{
return parent::__toString();
}
}

 

so you tell me to change to getname but the __toString(); appear many times at the end of the code not in line 84

Highlighted

Re: commande line install error

@starlyn_tejada can you please let me know which php version you are currently using?

Highlighted

Re: commande line install error

just do : $type->getName()

Highlighted

Re: commande line install error

at line 83 changing it to

 

return (string) $type->getName();

worked for  me and i get a successful magento install. Thanks!

 

[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_7tgu1l
Nothing to import.