Joomla! 4 – The hope of promising year 2018

Written by  Sunday, 22 October 2017 20:28

During 2017, we have heard a lot of opinions that this year has been too gloomy for Joomla. However, we think that this year is so important because it is the stepping stone for the explosion in 2018 when we prepare to welcome Joomla! 4.0 and Joomla! Framework 2.0. In addition to introducing several new features, including a fully rebuilt Media Manager, an enhanced event dispatching system, and new security features such as support for prepared SQL statements, we have also been doing some routine maintenance and paying off some of our project’s technical debt by retiring deprecated code and raising the minimum supported software stack. And, with this released version, we also require PHP 7.

Why PHP 7

Until this moment, PHP 7 is presently the only fully supported major version of the PHP language, one that required most software packages and extensions for the language itself to make updates to varying degrees. According to the data collected by going around and asking the community, since the system was launched in early 2016, there are approximately 17%  of sites reported running a PHP 7 version. You might say that this figure is small but the statistics server contains data from all sites that have ever reported information and the public data includes sites that are no longer online or have opted to not send data any longer. When we analyzed the usage data of sites reporting a Joomla! 3.7 version, 42% of them are running a PHP 7 release. In 2017, we have also observed the sharp increase of sites running a PHP 7 release and the significant decrease of sites running PHP 5.5 or earlier. That’s the reason why PHP 7 is almost compulsory.

What if I can’t upgrade?

One thing I want to emphasize is Joomla! 3.9, our last scheduled 3.x release, will be supported for two years after its release. Therefore, when Joomla 4! is going to be released in 2018, it means that you can run your Joomla! 3 site comfortably until 2020. And in 2020, what will happen? It will be more urgent to upgrade as not only will your Joomla version no longer be supported, but most PHP versions that will run Joomla! 3 will be unsupported, as will many server software packages and distributions.

How will this impact the core code?

With Joomla! 3’s minimum PHP version being PHP 5.3.10, there are numerous features and optimisations that we can make in our code as we phase out PHP 5 support. There will be a lot of changes made without impacting the existing public API. When Joomla 4! will be released, you should care the following policies:

  • All new classes and methods in the new major versions may make use of all features available in PHP 7, including scalar typehints and return type declarations
  • Private methods and methods in final classes (which cannot be extended by definition) may be updated to use PHP 7 typing
  • Public and protected methods in existing classes generally will not have their method signatures changed unless the change improves understanding and use of the code (for example, methods which could use variadic signatures)
  • We are firmly committed to making the next generation of Joomla the best generation and feel that embracing PHP 7 going forward will help to deliver the highest quality product for our users.

 

151 Read Last modified on Sunday, 22 October 2017

Related items

  • [solved] How to delete text symbol from php line?
    in PHP
    $string = 'Some Text .... 1. 2 .3.  Buy';
    $string = preg_replace('~[^0-9]+~','',$string);
    echo $string;
    // 123 
  • How to show all errors in php?
    in PHP

    If you need show some errors in your php code - use this php notation:

    // enable showing errors in PHP
    ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT);
    ini_set('display_errors','On');
  • [solved] Deprecated: Methods with the same name as their class will not be constructors ... www/plugins/content/jw_sigpro/jw_sigpro.php on line 19

    If you update your hosting to v7.1 & more - you can look same notification 'Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgContentJw_sigpro has a deprecated constructor in .../www/plugins/content/jw_sigpro/jw_sigpro.php on line 19'

    This code fix this problem you need Open plugins/content/jw_sigpro/jw_sigpro.php find this code in line 28:

    function plgContentJw_sigpro(&$subject, $params)
    	{
    		parent::__construct($subject, $params);
    
    		// Define the DS constant under Joomla! 3.0
    		if (!defined('DS'))
    		{
    			define('DS', DIRECTORY_SEPARATOR);
    		}
    	}

     And replase it to this code:

    public function __construct(&$subject, $params) {
    	parent::__construct($subject, $params);
    
    	// Define the DS constant under Joomla! 3.8.2+
    	if (!defined('DS')){
    		define('DS', DIRECTORY_SEPARATOR);
    	}
    }

    Awesome - it work done! :-)

    If you see same problem with jw_sig.php  - just download free new plugin from GitHub and install it: https://github.com/joomlaworks/simple-image-gallery

  • [php] How to make function for compress css using regular expression
    in PHP
    function compresscss ( $data, $url ) {
            global $current_css_url;
            $current_css_url = $url;
            /* remove comments */
            $data = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $data);
            /* remove tabs, spaces, new lines, etc. */
            $data = str_replace(array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), ' ', $data);
            /* remove unnecessary spaces */
            $data = preg_replace('/[ ]+([{};,:])/', '\1', $data);
            $data = preg_replace('/([{};,:])[ ]+/', '\1', $data);
            /* remove empty class */
            $data = preg_replace('/(\}([^\}]*\{\})+)/', '}', $data);
            /* remove PHP code */
            $data = preg_replace('/<\?(.*?)\?>/mix', '', $data);
            /* replace url*/
            $data = preg_replace_callback('/url\(([^\)]*)\)/', 'replaceurl', $data);
            return $data;
    }

     

  • 7 tips to improve Joomla website performance [part 2]

    To continue with the tips to improve Joomla website performance, in the previous part, I had introduced how to use caching and .htaccess Optimization Rules, in this part, I will show you some other tips and hope you find it useful.

    Joomla Compression

    This is also an effective feature to optimize your website performance. When you enable this feature, the web page will be compressed and of course, the compressed page will take less time to load. Here is the way to enable Joomla Compression: