php - Symfony 2, strange error with starting server -
i have little problem symfony 2. now, when try launch server pops following error. read associated file service.xml. can tell me wrong?
file service.xml:
<?xml version="1.0" ?> <container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> <parameters> <parameter key="rest_demo.note.handler.class"> rest\demobundle\handler\notehandler </parameter> <parameter key="rest_demo.note.class"> rest\demobundle\entity\note</parameter> </parameters> <services> <service id="rest_demo.note.handler" class="%rest_demo.note.handler.class%"> <argument type="service" id="doctrine.orm.entity_manager" /> <argument>%rest_demo.note.class%</argument> <argument type="service" id="form.factory"></argument> </service> </services> </container>
error:
[symfony\component\dependencyinjection\exception\invalidargumentexception] "' rest\\demobundle\\handler\\notehandler '" not valid class name "rest_demo.note.handle r" service.
xml
config doesn't work whitespace, should write config without empty spaces, this:
<parameter key="rest_demo.note.handler.class">rest\demobundle\handler\notehandler</parameter>
from doc page:
the values between parameter tags in xml configuration files not trimmed. means following configuration sample have value \n sendmail\n:
<parameter key="mailer.transport"> sendmail </parameter>
in cases (for constants or class names), throw errors. in order prevent this, must inline parameters follow:
<parameter key="mailer.transport">sendmail</parameter>
Comments
Post a Comment