Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use Joomla\CMS\Event\Application\AfterSaveConfigurationEvent;
use Joomla\CMS\Event\Application\BeforeSaveConfigurationEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Http\HttpFactory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Mail\Exception\MailDisabledException;
Expand All @@ -36,6 +35,7 @@
use Joomla\Filesystem\Folder;
use Joomla\Filesystem\Path;
use Joomla\Filter\OutputFilter;
use Joomla\Http\HttpFactory;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
use PHPMailer\PHPMailer\Exception as phpMailerException;
Expand Down Expand Up @@ -364,7 +364,7 @@ public function save($data)
CURLOPT_PROXYUSERPWD => null,
]
);
$response = HttpFactory::getHttp($options)->get('https://' . $host . Uri::root(true) . '/', ['Host' => $host], 10);
$response = (new HttpFactory())->getHttp($options)->get('https://' . $host . Uri::root(true) . '/', ['Host' => $host], 10);

// If available in HTTPS check also the status code.
if (!\in_array($response->getStatusCode(), [200, 503, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 401], true)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
namespace Joomla\Component\Installer\Administrator\Model;

use Joomla\CMS\Factory;
use Joomla\CMS\Http\HttpFactory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Http\HttpFactory;
use Joomla\String\StringHelper;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -135,7 +135,7 @@ protected function getLanguages()
}

try {
$response = HttpFactory::getHttp()->get($updateSite);
$response = (new HttpFactory())->getHttp()->get($updateSite);
} catch (\RuntimeException) {
$response = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
use Joomla\CMS\Extension\ExtensionHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Http\Http;
use Joomla\CMS\Http\HttpFactory;
use Joomla\CMS\Installer\Installer;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
Expand All @@ -38,6 +36,7 @@
use Joomla\Database\ParameterType;
use Joomla\Filesystem\Exception\FilesystemException;
use Joomla\Filesystem\File;
use Joomla\Http\HttpFactory;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

Expand Down Expand Up @@ -388,7 +387,7 @@ public function download()
$response = ['basename' => false, 'check' => null, 'version' => $updateInfo['latest']];

try {
$head = HttpFactory::getHttp($httpOptions)->head($packageURL);
$head = (new HttpFactory())->getHttp($httpOptions)->head($packageURL);
} catch (\RuntimeException) {
// Passing false here -> download failed message
return $response;
Expand All @@ -399,7 +398,7 @@ public function download()
$packageURL = (string) $head->getHeaders()['location'][0];

try {
$head = HttpFactory::getHttp($httpOptions)->head($packageURL);
$head = (new HttpFactory())->getHttp($httpOptions)->head($packageURL);
} catch (\RuntimeException) {
// Passing false here -> download failed message
return $response;
Expand Down Expand Up @@ -566,7 +565,7 @@ public function changeAutoUpdateRegistration(AutoupdateRegisterState $targetStat
$this->cleanCache('_system');

// Prepare connection
$http = HttpFactory::getHttp();
$http = (new HttpFactory())->getHttp();

$url = self::AUTOUPDATE_URL;
$url .= ($targetState === AutoupdateRegisterState::Subscribe) ? '/register' : '/delete';
Expand Down Expand Up @@ -760,7 +759,7 @@ protected function downloadPackage($url, $target)

// Download the package
try {
$result = HttpFactory::getHttp([], ['curl', 'stream'])->get($url);
$result = (new HttpFactory())->getHttp([], ['curl', 'stream'])->get($url);
} catch (\RuntimeException) {
return false;
}
Expand Down Expand Up @@ -1848,7 +1847,7 @@ private function getCollectionDetailsUrls($updateSiteInfo, $joomlaTargetVersion)
{
$return = [];

$http = new Http();
$http = (new HttpFactory())->getHttp();

try {
$response = $http->get($updateSiteInfo['location']);
Expand Down
64 changes: 32 additions & 32 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"config": {
"optimize-autoloader": true,
"platform": {
"php": "8.1.0"
"php": "8.3.0"
},
"vendor-dir": "libraries/vendor",
"github-protocols": ["https"]
Expand Down Expand Up @@ -46,42 +46,42 @@
}
},
"require": {
"php": "^8.1.0",
"joomla/application": "^3.0.4",
"joomla/archive": "^3.0.4",
"joomla/authentication": "^3.0.3",
"joomla/console": "^3.0.3",
"joomla/crypt": "^3.0.3",
"joomla/data": "^3.0.3",
"joomla/database": "^3.4",
"joomla/di": "^3.1.1",
"joomla/event": "^3.0.2",
"joomla/filter": "^3.0.4",
"joomla/filesystem": "^3.1.2",
"joomla/http": "^3.1.2",
"joomla/input": "~3.0",
"joomla/language": "~3.0",
"joomla/oauth1": "~3.0",
"joomla/oauth2": "~3.0",
"joomla/registry": "~3.0",
"joomla/router": "~3.0",
"joomla/session": "^3.0.3",
"joomla/string": "^3.0.4",
"joomla/uri": "~3.0",
"joomla/utilities": "~3.0",
"php": "^8.3.0",
"joomla/application": "^4.0",
"joomla/archive": "^4.0",
"joomla/authentication": "^4.0",
"joomla/console": "^4.0",
"joomla/crypt": "^4.0",
"joomla/data": "^4.0",
"joomla/database": "^4.0",
"joomla/di": "^4.0",
"joomla/event": "^4.0",
"joomla/filter": "^4.0",
"joomla/filesystem": "^4.0",
"joomla/http": "^4.0",
"joomla/input": "^4.0",
"joomla/language": "^4.0",
"joomla/oauth1": "^4.0",
"joomla/oauth2": "^4.0",
"joomla/registry": "^4.0",
"joomla/router": "^4.0",
"joomla/session": "^4.0",
"joomla/string": "^4.0",
"joomla/uri": "^4.0",
"joomla/utilities": "^4.0",
"algo26-matthias/idna-convert": "^4.0.4",
"defuse/php-encryption": "^2.4.0",
"doctrine/inflector": "^1.4.4",
"doctrine/inflector": "^2.0.10",
"fig/link-util": "^1.2.0",
"google/recaptcha": "^1.3.1",
"laminas/laminas-diactoros": "^2.26.0",
"laminas/laminas-diactoros": "^3.6.0",
"paragonie/sodium_compat": "^1.21.1",
"phpmailer/phpmailer": "^6.10.0",
"psr/link": "~1.1.1",
"symfony/console": "^6.4.23",
"symfony/error-handler": "^6.4.23",
"symfony/ldap": "^6.4.13",
"symfony/options-resolver": "^6.4.16",
"symfony/console": "^7",
"symfony/error-handler": "^7",
"symfony/ldap": "^7",
"symfony/options-resolver": "^7",
"symfony/polyfill-mbstring": "^1.32.0",
"symfony/web-link": "^6.4.22",
"symfony/yaml": "^6.4.23",
Expand All @@ -108,8 +108,8 @@
"phpunit/phpunit": "^9.6.23",
"friendsofphp/php-cs-fixer": "^3.84.0",
"squizlabs/php_codesniffer": "^3.13.2",
"joomla/mediawiki": "^3.0",
"joomla/test": "~3.0",
"joomla/mediawiki": "^4.0",
"joomla/test": "~4.0",
"phpstan/phpstan": "^2.1.19",
"phpstan/phpstan-deprecation-rules": "^2.0.3"
},
Expand Down
Loading
Loading