Skip to content
Open
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 @@ -32,10 +32,6 @@
$wa->useScript('form.validate')
->useScript('keepalive');

if ($this->fieldsets) {
HTMLHelper::_('bootstrap.framework');
}

$xml = $this->form->getXml();
?>

Expand Down
7 changes: 7 additions & 0 deletions libraries/src/HTML/Helpers/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,13 @@ public static function toast($selector = '', $options = []): void
*/
public static function framework($debug = null): void
{
if (!\defined('COMPAT_JOOMLA_7')) {
throw new \BadMethodCallException(\sprintf(
'%1$s() is only available in compatibility mode (compatibility plugin enabled). Load the different scripts with their individual method calls.',
__METHOD__
));
}

$wa = Factory::getApplication()
->getDocument()
->getWebAssetManager();
Expand Down
3 changes: 1 addition & 2 deletions libraries/src/HTML/Helpers/Dropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace Joomla\CMS\HTML\Helpers;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

Expand Down Expand Up @@ -52,7 +51,7 @@ public static function init()
}

// Depends on Bootstrap
HTMLHelper::_('bootstrap.framework');
Factory::getApplication()->getDocument()->getWebAssetManager()->useScript('dropdown');

Factory::getDocument()->addScriptDeclaration("
Comment thread
laoneo marked this conversation as resolved.
(function($){
Expand Down
7 changes: 7 additions & 0 deletions libraries/src/HTML/Helpers/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ public static function tags($config = ['filter.published' => [0, 1]])
*/
public static function ajaxfield($selector = '#jform_tags', $allowCustom = true)
{
if (!\defined('COMPAT_JOOMLA_7')) {
throw new \BadMethodCallException(\sprintf(
'%1$s() is only available in compatibility mode (compatibility plugin enabled).',
__METHOD__
));
}

// Get the component parameters
$params = ComponentHelper::getParams('com_tags');
$minTermLength = (int) $params->get('min_term_length', 3);
Expand Down
100 changes: 50 additions & 50 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10253,18 +10253,6 @@ parameters:
count: 1
path: libraries/src/HTML/Helpers/ActionsDropdown.php

-
message: '''
#^Call to deprecated method getLanguage\(\) of class Joomla\\CMS\\Factory\:
4\.3 will be removed in 7\.0
Use the language service in the DI container or get from the application object
Example\:
Factory\:\:getApplication\(\)\-\>getLanguage\(\);$#
'''
identifier: staticMethod.deprecated
count: 1
path: libraries/src/HTML/Helpers/Behavior.php

-
message: '''
#^Call to deprecated method getDocument\(\) of class Joomla\\CMS\\Factory\:
Expand Down Expand Up @@ -10432,44 +10420,6 @@ parameters:
count: 1
path: libraries/src/HTML/Helpers/JGrid.php

-
message: '''
#^Call to deprecated method addScriptDeclaration\(\) of class Joomla\\CMS\\Document\\Document\:
4\.3 will be removed in 7\.0
Use WebAssetManager
Example\: \$wa\-\>addInlineScript\(\.\.\.\);$#
'''
identifier: method.deprecated
count: 1
path: libraries/src/HTML/Helpers/Jquery.php

-
message: '''
#^Call to deprecated method framework\(\) of class Joomla\\CMS\\HTML\\Helpers\\Jquery\:
4\.0 will be removed in 7\.0
Use webasset manager instead
Example\:
\$wa \= Factory\:\:getApplication\(\)\-\>getDocument\(\)\-\>getWebAssetManager\(\);
\$wa\-\>useScript\('jquery'\);
\$wa\-\>useScript\('jquery\-noconflict'\);
\$wa\-\>useScript\('jquery\-migrate'\);$#
'''
identifier: staticMethod.deprecated
count: 1
path: libraries/src/HTML/Helpers/Jquery.php

-
message: '''
#^Call to deprecated method getDocument\(\) of class Joomla\\CMS\\Factory\:
4\.3 will be removed in 7\.0
Use the document service in the DI container or get from the application object
Example\:
Factory\:\:getApplication\(\)\-\>getDocument\(\);$#
'''
identifier: staticMethod.deprecated
count: 1
path: libraries/src/HTML/Helpers/Jquery.php

-
message: '''
#^Call to deprecated method getUser\(\) of class Joomla\\CMS\\Factory\:
Expand Down Expand Up @@ -12897,6 +12847,56 @@ parameters:
count: 2
path: plugins/behaviour/compat7/classes/Filesystem/Streams/StreamString.php

-
message: '''
#^Call to deprecated method getLanguage\(\) of class Joomla\\CMS\\Factory\:
4\.3 will be removed in 7\.0
Use the language service in the DI container or get from the application object
Example\:
Factory\:\:getApplication\(\)\-\>getLanguage\(\);$#
'''
identifier: staticMethod.deprecated
count: 1
path: plugins/behaviour/compat7/classes/HTML/Helpers/Behavior.php

-
message: '''
#^Call to deprecated method addScriptDeclaration\(\) of class Joomla\\CMS\\Document\\Document\:
4\.3 will be removed in 7\.0
Use WebAssetManager
Example\: \$wa\-\>addInlineScript\(\.\.\.\);$#
'''
identifier: method.deprecated
count: 1
path: plugins/behaviour/compat7/classes/HTML/Helpers/Jquery.php

-
message: '''
#^Call to deprecated method framework\(\) of class Joomla\\CMS\\HTML\\Helpers\\Jquery\:
4\.0 will be removed in 7\.0
Use webasset manager instead
Example\:
\$wa \= Factory\:\:getApplication\(\)\-\>getDocument\(\)\-\>getWebAssetManager\(\);
\$wa\-\>useScript\('jquery'\);
\$wa\-\>useScript\('jquery\-noconflict'\);
\$wa\-\>useScript\('jquery\-migrate'\);$#
'''
identifier: staticMethod.deprecated
count: 1
path: plugins/behaviour/compat7/classes/HTML/Helpers/Jquery.php

-
message: '''
#^Call to deprecated method getDocument\(\) of class Joomla\\CMS\\Factory\:
4\.3 will be removed in 7\.0
Use the document service in the DI container or get from the application object
Example\:
Factory\:\:getApplication\(\)\-\>getDocument\(\);$#
'''
identifier: staticMethod.deprecated
count: 1
path: plugins/behaviour/compat7/classes/HTML/Helpers/Jquery.php

-
message: '''
#^Call to method delete\(\) of deprecated class Joomla\\CMS\\Versioning\\Versioning\:
Expand Down
Loading