? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
22 Jan 2018

TBH I dont really know but it looks wrong that these two occurrences begin with a slash when the other instances do not

avatar brianteeman brianteeman - open - 22 Jan 2018
avatar brianteeman brianteeman - change - 22 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jan 2018
Category Administration com_config
avatar mbabker
mbabker - comment - 22 Jan 2018

use statements generally don't have the leading slash, so this is a good change. If you're using the fully qualified class name without importing it through a use statement then you would need the slash.

with_use.php

<?php
namespace Joomla\CMS\Session;

use Joomla\CMS\Factory;
use Joomla\Session\SessionInterface;

class Proxy
{
    public function getSession(): SessionInterface
    {
        return Factory::getSession();
    }
}

without_use.php

<?php
namespace Joomla\CMS\Session;

use Joomla\Session\SessionInterface;

class Proxy
{
    public function getSession(): SessionInterface
    {
        return \Joomla\CMS\Factory::getSession();
    }
}
avatar brianteeman
brianteeman - comment - 22 Jan 2018

Thanks for the lesson and confirming these need to be fixed

avatar wilsonge wilsonge - change - 22 Jan 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-01-22 21:19:21
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 22 Jan 2018
avatar wilsonge wilsonge - merge - 22 Jan 2018
avatar brianteeman
brianteeman - comment - 22 Jan 2018

thanks

avatar wilsonge
wilsonge - comment - 22 Jan 2018

Thanks!

Add a Comment

Login with GitHub to post a comment