xsd2php icon indicating copy to clipboard operation
xsd2php copied to clipboard

Declaration of Xsd2PhpExtension::getAlias() must be compatible with Symfony\Component\DependencyInjection\Extension\Extension::getAlias()

Open brausepulver opened this issue 4 years ago • 3 comments

symfony/dependency-injection: v6.0.5

PHP Stack trace:
PHP   1. {main}() /var/www/html/vendor/bin/xsd2php:0
PHP   2. include() /var/www/html/vendor/bin/xsd2php:117
PHP   3. Composer\Autoload\ClassLoader->loadClass($class = 'GoetasWebservices\\Xsd\\XsdToPhp\\DependencyInjection\\Xsd2PhpExtension') /var/www/html/vendor/goetas-webservices/xsd2php/bin/xsd2php:18
PHP   4. Composer\Autoload\includeFile($file = '/var/www/html/vendor/composer/../goetas-webservices/xsd2php/src/DependencyInjection/Xsd2PhpExtension.php') /var/www/html/vendor/composer/ClassLoader.php:428
PHP   5. include() /var/www/html/vendor/composer/ClassLoader.php:571

This happens because the parent class requires https://github.com/goetas-webservices/xsd2php/blob/b76f9ae19fdb46f1293c4b7faedf0fa67720b34c/src/DependencyInjection/Xsd2PhpExtension.php#L67 to be type-hinted with string.

brausepulver avatar Mar 05 '22 15:03 brausepulver

+1

alexschwarz89 avatar Jun 23 '22 09:06 alexschwarz89

+1

peternicholls avatar Jul 23 '22 00:07 peternicholls

error is gone by adding : string to function in /goetas-webservices/xsd2php/src/DependencyInjection/Xsd2PhpExtension.php on line 67

public function getAlias(): string

Can someone do a pull request or something please?

peternicholls avatar Jul 23 '22 00:07 peternicholls

done in https://github.com/goetas-webservices/xsd2php/pull/150

goetas avatar Sep 14 '22 08:09 goetas