cancel
Showing results for 
Search instead for 
Did you mean: 

commande line install error

SOLVED

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

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

8 REPLIES 8

Re: commande line install error

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

 

Thanks

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

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

Re: commande line install error

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

Re: commande line install error

just do : $type->getName()

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.

Re: module install error

Problem 1

    - spomky-labs/aes-key-wrap v5.0.0 requires php ^7.1 -> your php version (8.1.14) does not satisfy that requirement.

    - magento/product-community-edition 2.4.4 requires web-token/jwt-framework ^v2.2.7 -> satisfiable by web-token/jwt-framework[v2.2.11].

    - web-token/jwt-framework v2.2.11 requires spomky-labs/aes-key-wrap ^5.0|^6.0 -> satisfiable by spomky-labs/aes-key-wrap[v5.0.0].

    - magento/product-community-edition is locked to version 2.4.4 and an update of this package was not requested.