<p dir="auto">I'm trying to test that a user with the wrong permissions sees the correct response when visting a page that has a csrf token in the path.</p>
<p dir="auto">I've added a Behat context step to create a csrf token using the 'security.csrf.token_manager', however then visit the page with this token in the path, I get a "Cannot set session ID after the session has started" 500 error.</p>
<p dir="auto">Can anyone advise what I'm doing wrong, or how I work around this, please?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    /**
     * @When /^I go to the application admin archive page for &quot;(?P&lt;status&gt;[^&quot;]*)&quot; application (?P&lt;number&gt;\d+) with a valid token$/
     *
     * @param string $status
     * @param int    $number
     */
    public function iGoToTheApplicationAdminArchivePageForApplicationWithAValidToken($status, $number)
    {
        $tokenManager = $this-&gt;kernel-&gt;getContainer()-&gt;get('security.csrf.token_manager');
        $token        = $tokenManager-&gt;getToken(ApplicationAdminController::CSRF_ARCHIVE);
        var_dump($token);

        $this-&gt;visitAdminPage('archive', $status, $number, ['token' =&gt; $token]);
    }"><pre class="notranslate"><code class="notranslate">    /**
     * @When /^I go to the application admin archive page for "(?P&lt;status&gt;[^"]*)" application (?P&lt;number&gt;\d+) with a valid token$/
     *
     * @param string $status
     * @param int    $number
     */
    public function iGoToTheApplicationAdminArchivePageForApplicationWithAValidToken($status, $number)
    {
        $tokenManager = $this-&gt;kernel-&gt;getContainer()-&gt;get('security.csrf.token_manager');
        $token        = $tokenManager-&gt;getToken(ApplicationAdminController::CSRF_ARCHIVE);
        var_dump($token);

        $this-&gt;visitAdminPage('archive', $status, $number, ['token' =&gt; $token]);
    }
</code></pre></div>
<p dir="auto">Hi guys!</p>
<p dir="auto">Currently, in service definition, we can set <code class="notranslate">parent</code> of service. Setting <code class="notranslate">parent</code> means that arguments, method calls, property sets and some other things copied from parent definition and (possibly) replaced by concrete definition. How about new feature, that allows to set <em>multiple</em> parents? It is more like <em>mixin</em>, or <em>trait</em> for service. It would be something like this:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="service:
    class: stdClass
    arguments: [@kernel]
    mixins:
        - mixin_service_1
        - mixin_service_2"><pre class="notranslate"><span class="pl-ent">service</span>:
    <span class="pl-ent">class</span>: <span class="pl-s">stdClass</span>
    <span class="pl-ent">arguments</span>: <span class="pl-s">[@kernel]</span>
    <span class="pl-ent">mixins</span>:
        - <span class="pl-s">mixin_service_1</span>
        - <span class="pl-s">mixin_service_2</span></pre></div>
<p dir="auto">What do you think about this?</p>