sonata-project / SonataMediaBundle

Symfony SonataMediaBundle
https://docs.sonata-project.org/projects/SonataMediaBundle
MIT License
451 stars 495 forks source link

Symfony 3 problem with xsd schema validation #950

Closed siciarek closed 8 years ago

siciarek commented 8 years ago

Resources/config/gaufrette.xml does not validate against symfony service schema vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd in XmlUtils::loadFile

[InvalidArgumentException]
[ERROR 1866] Element '{http://symfony.com/schema/dic/services}service', attribute 'factory-class': The attribute 'factory-class' is not allowed. (in /home/jsiciare
k/Workspace/baseapp/ - line 16, column 0)
[ERROR 1866] Element '{http://symfony.com/schema/dic/services}service', attribute 'factory-method': The attribute 'factory-method' is not allowed. (in /home/jsicia
rek/Workspace/baseapp/ - line 16, column 0)
[ERROR 1866] Element '{http://symfony.com/schema/dic/services}service', attribute 'factory-service': The attribute 'factory-service' is not allowed. (in /home/jsic
iarek/Workspace/baseapp/ - line 50, column 0)
[ERROR 1866] Element '{http://symfony.com/schema/dic/services}service', attribute 'factory-method': The attribute 'factory-method' is not allowed. (in /home/jsicia
rek/Workspace/baseapp/ - line 50, column 0)

siciarek commented 8 years ago

Could I get more info?

OskarStark commented 8 years ago

could we get more info? which versions? which file?

siciarek commented 8 years ago

I migrate my project to Symfony 3. I use "sonata-project/media-bundle": "dev-master", the only one branch which supports Symfony 3.0 After updating all the dependencies I try to run:

bin/console cache:clear

And the error occurs:

[ERROR 1866] Element '{http://symfony.com/schema/dic/services}service', attribute 'factory-method': The attribute 'factory-method' is not allowed.

New Symfony 3 service schema does not have attributes (factory-method, factory-class) for "service" entity

/xsd:choice /xsd:complexType I see that schema published online http://symfony.com/schema/dic/services/services-1.0.xsd has those attributes but above url is changed iside XmlFileLoader::validateSchema ``` public function validateSchema(\DOMDocument $dom) { $schemaLocations = array('http://symfony.com/schema/dic/services' ``` => str_replace('\', '/', **DIR**.'/schema/dic/services/services-1.0.xsd')); On Wed, Feb 17, 2016 at 12:04 PM, Oskar Stark notifications@github.com wrote: > could we get more info? which versions? which file? > > — > Reply to this email directly or view it on GitHub > https://github.com/sonata-project/SonataMediaBundle/issues/950#issuecomment-185155926 > .
siciarek commented 8 years ago

The problem is caused by Resources/config/gaufrette.xml

On Wed, Feb 17, 2016 at 12:31 PM, Jacek Siciarek siciarek@gmail.com wrote:

I migrate my project to Symfony 3. I use "sonata-project/media-bundle": "dev-master", the only one branch which supports Symfony 3.0 After updating all the dependencies I try to run:

bin/console cache:clear

And the error occurs:

[ERROR 1866] Element '{http://symfony.com/schema/dic/services}service', attribute 'factory-method': The attribute 'factory-method' is not allowed.

New Symfony 3 service schema does not have attributes (factory-method, factory-class) for "service" entity

/xsd:choice /xsd:complexType I see that schema published online http://symfony.com/schema/dic/services/services-1.0.xsd has those attributes but above url is changed iside XmlFileLoader::validateSchema ``` public function validateSchema(\DOMDocument $dom) { $schemaLocations = array('http://symfony.com/schema/dic/services' ``` => str_replace('\', '/', **DIR**.'/schema/dic/services/services-1.0.xsd')); On Wed, Feb 17, 2016 at 12:04 PM, Oskar Stark notifications@github.com wrote: > could we get more info? which versions? which file? > > — > Reply to this email directly or view it on GitHub > https://github.com/sonata-project/SonataMediaBundle/issues/950#issuecomment-185155926 > .