Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Rework how URLs are injected into applications #38544

Open
wants to merge 4 commits into
base: 5.2-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove exception from CliApplication
  • Loading branch information
wilsonge committed Aug 21, 2022
commit de325ddcb8152ce7f463ac1ec0a8ca3753c4c740
4 changes: 0 additions & 4 deletions libraries/src/Application/CliApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ public function __construct(
->alias(\Joomla\Session\SessionInterface::class, 'session.cli');
}

if (!$container->has('application.active')) {
$container->alias('application.active', static::class);
}

$this->input = new \Joomla\CMS\Input\Cli();
$this->language = Factory::getLanguage();
$this->output = $output ?: new Stdout();
Expand Down
5 changes: 2 additions & 3 deletions libraries/src/Uri/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ public static function getInstance($uri = 'SERVER')
return static::$instances[$uri];
}
} catch (NotFoundExceptionInterface $e) {
// Continue - might be a custom application who hasn't set application.active in the container
// (which would be a b/c break to require within J4 - from J5 this will be compulsory with the
// deprecation message below)
@trigger_error('The application should have an alias \'application.active\' for the ' .
'running application from Joomla 5.0.0', E_USER_DEPRECATED);
}

@trigger_error('The application should provide the request URI from Joomla 5.0.0', E_USER_DEPRECATED);
Expand Down