<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Thanks, I removed all occurrences of getServer and 'serverContainer'
    (search in files).<br>
    However I'm still getting the error.<br>
    <br>
    BTW the lib/private/server.php::getUserFolder is inaccessible this
    way.<br>
    <br>
    Cheers<br>
    <br>
    <div class="moz-cite-prefix">On 01/21/2015 10:14 AM, Bernhard
      Posselt wrote:<br>
    </div>
    <blockquote cite="mid:54BF6DD8.9020903@bernhard-posselt.com"
      type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      Querying the servercontainer directly was deprecated because you
      should not worry about where your classes come from. Either use
      automatic assembly or query the interface name like
      $c->query('OCP\IConfig') instead of
      $c->getServer()->getConfig().<br>
      <br>
      This provides the benefit that you dont have to redeclare the
      service on order to replace and test it. Before you might have
      done something like this (at least that was how the News app
      handled it):<br>
      <br>
      $container->registerService('CoreConfig', function ($c) {<br>
          return $c->query('ServerContainer')->getConfig();<br>
      });<br>
      <br>
      so that you can replace and test it in your integration tests like
      this:<br>
      <br>
      $app = new Application();<br>
      $container = $app->getContainer();<br>
      $this->config =
      $this->getMockBuilder('OCP\IConfig')->getMock();<br>
      $container->registerService('CoreConfig', function ($c) {<br>
          return $this->config;<br>
      });<br>
      <br>
      <br>
      <br>
      <br>
      <div class="moz-cite-prefix">On 01/21/2015 08:23 AM, Tobia De
        Koninck wrote:<br>
      </div>
      <blockquote cite="mid:54BF53F9.5070008@ledfan.be" type="cite">Hey
        t<br>
        <br>
        I removed all query('servercontainer') and used getServer().
        However I still get some errors when accessing the Chat app and
        when accessing the files app. <br>
        <br>
        Is it possible that this is caused by some core functions? <br>
        <br>
        <br>
        Thanks! <br>
        <br>
        <br>
        On 01/21/2015 08:07 AM, Lukas Reschke wrote: <br>
        <blockquote type="cite">Either use the new automatic dependency
          assembly (<a moz-do-not-send="true"
            class="moz-txt-link-freetext"
href="http://doc.owncloud.org/server/8.0/developer_manual/app/container.html#use-automatic-dependency-assembly-recommended">http://doc.owncloud.org/server/8.0/developer_manual/app/container.html#use-automatic-dependency-assembly-recommended</a>)
          or do it like <a moz-do-not-send="true"
            class="moz-txt-link-freetext"
            href="https://github.com/owncloud/core/pull/13349/files">https://github.com/owncloud/core/pull/13349/files</a>
          <br>
          <br>
          Sent from mobile device <br>
          <br>
          On 21 Jan 2015, at 07:47, Tobia De Koninck <<a
            moz-do-not-send="true" class="moz-txt-link-abbreviated"
            href="mailto:tobia@ledfan.be">tobia@ledfan.be</a> <a
            moz-do-not-send="true" class="moz-txt-link-rfc2396E"
            href="mailto:tobia@ledfan.be"><mailto:tobia@ledfan.be></a>>
          wrote: <br>
          <br>
          <blockquote type="cite">Hi <br>
            <br>
            I'm working on improving the dependency injection in the
            ownCloud chat app.  Before I injected the whole DI
            container, now only the classes I need. However my log is
            spammed with these errors: <br>
            <br>
            {"reqId":"a24609b5ab5558936d2279bb80468a29","remoteAddr":"33.33.33.1","app":"no

            app in context","message":"Accessing the server container is
            deprecated. Use type annotations to inject core services
instead!","level":0,"time":"2015-01-21T06:43:49+00:00","method":"POST","url":"\/index.php\/apps\/chat\/och\/api"}<br>
            <br>
            I think they are caused by calls like these: <a
              moz-do-not-send="true" class="moz-txt-link-freetext"
              href="https://github.com/owncloud/chat/blob/master/app/chat.php#L221">https://github.com/owncloud/chat/blob/master/app/chat.php#L221</a>
            . <br>
            <br>
            PR: <a moz-do-not-send="true" class="moz-txt-link-freetext"
              href="https://github.com/owncloud/chat/pull/193">https://github.com/owncloud/chat/pull/193</a>
            <br>
            <br>
            How can I solve this, without removing the DI container? <br>
            <br>
            Thanks! <br>
            <br>
            Met vriendelijke groeten / Best regards <br>
            <br>
            Tobia De Koninck <br>
            _______________________________________________ <br>
            Devel mailing list <br>
            <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
              href="mailto:Devel@owncloud.org">Devel@owncloud.org</a> <a
              moz-do-not-send="true" class="moz-txt-link-rfc2396E"
              href="mailto:Devel@owncloud.org"><mailto:Devel@owncloud.org></a>
            <br>
            <a moz-do-not-send="true" class="moz-txt-link-freetext"
              href="http://mailman.owncloud.org/mailman/listinfo/devel">http://mailman.owncloud.org/mailman/listinfo/devel</a>
            <br>
          </blockquote>
          <br>
          <br>
          _______________________________________________ <br>
          Devel mailing list <br>
          <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
            href="mailto:Devel@owncloud.org">Devel@owncloud.org</a> <br>
          <a moz-do-not-send="true" class="moz-txt-link-freetext"
            href="http://mailman.owncloud.org/mailman/listinfo/devel">http://mailman.owncloud.org/mailman/listinfo/devel</a>
          <br>
        </blockquote>
        <br>
        Met vriendelijke groeten / Best regards <br>
        <br>
        Tobia De Koninck <br>
        <br>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
Devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Devel@owncloud.org">Devel@owncloud.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://mailman.owncloud.org/mailman/listinfo/devel">http://mailman.owncloud.org/mailman/listinfo/devel</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@owncloud.org">Devel@owncloud.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.owncloud.org/mailman/listinfo/devel">http://mailman.owncloud.org/mailman/listinfo/devel</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">Met vriendelijke groeten / Best regards

Tobia De Koninck</pre>
  </body>
</html>