Blogs from Virya Technologies staff

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Bloggers
    Bloggers Search for your favorite blogger from this site.
  • Team Blogs
    Team Blogs Find your favorite team blogs here.
  • Login
    Login Login form
Posted by on in Joomla! Content Management System
  • Font size: Larger Smaller
  • Hits: 35368
  • Print

Checking whether your Joomla Component will be compatible with Joomla 3.0

I tweeted a link to the Joomla documentation of potential backwards compatability issues for Joomla 3.0.

There's quite a long list of things there to check, and the easiest way to test may be to download Joomla 3, install and see if anything breaks. Where your extension is quite complex, however, this may not be possible (we all know exhaustive testing just isn't possible). Rather than having to manually check each item on that page, I thought I'd create a script to do some checks for me. Truth be told, I'm rather regretting it now, having had to put each and every item into an array.

However, should it be of use to anyone, the result can be downloaded here.

The tarball contains just one file - J3_Compat.php, released under GNU GPL V2. The rest of this post details how to use it.

You'll need shell level access (I haven't tested it in a browser, but suspect you'll either hit memory_limit or max_execution_time).

Download the PHP file, and extract with tar

tar xvzf J3_Compat.tar.gz

Change directory to the one containing your component (I'm assuming you're doing this on a development machine, but it should also work on a live install)

cd /home/ben/Documents/src/com_mycomponent

Copy the file to the current directory

cp ~/Downloads/J3_Compat.php ./

Now run it

php J3_Compat.php

The script will check every PHP and/or XML file in this directory and it's subdirectories. The output isn't that helpful except to tell you which file, and what it thinks it's found. Where the match involves a class (e.g. JRequest::clean) it's worth checking that the function of variable for that class is actually being used with that class. It may be that the file contains JRequest and contains clean() but clean() has been used with a completely different class. Once you're sure, head over to the Joomla Documentation to see what you need to do/change.

Tidying up afterwards is nice and easy

rm J3_Compat.php


The code comes with no warranty what-so-ever, I'm pretty certain it won't trash your machine but can't accept responsibility if it does. I also can't accept any responsibility if it slows your machine down whilst running, it's perhaps not as efficient as it could be but it works well. Any bugs will probably be answered with "It works on my machine!" but please do send them through so I can fix them.


Fixed the broken links to the file, sorry! Had uploaded the archives in a different format and forgot to update the links when I changed it!

Also, it's occurred to me that whilst this should be obvious, I should say: Just because this script doesn't find anything doesn't guarantee that your extension will work with Joomla 3.0!

Rate this blog entry:
Ben is a Network Security and Linux specialist with experience on a wide range of Unix based Operating Systems, as well as a serious amount of experience with the Microsoft Windows Operating Systems. Ben is also an amateur photographer and enjoys writing articles on technical subjects.


  • Guest
    Blogger tips and tricks Saturday, 14 December 2013

    Thx, but how can I run it using xampp? I tried the commands you showed, nothing worked.

  • Ruth Cheesley
    Ruth Cheesley Monday, 06 January 2014

    You need to just extract the file into the root of your directory, and then at command line (when you are in that directory) run the following command:

    php J3_Compat.php


Leave your comment

Guest Monday, 20 May 2019

Looking for our open source software?


We release and support our open source software at Virya Software

Forthcoming events

No events found

Latest tweets

Virya Technologies If you work in Marketing, SEO, SEM, or any related fields and you're based in/around Suffolk, make sure this is on y…
Friday, 06 February 2015 08:43
Virya Technologies We will be conducting essential hardware maintenance from 11pm GMT tonight on our Prajna server, which will result in a period of downtime
Sunday, 01 February 2015 14:48
Virya Technologies We are aware of an outage on our shared hosting server Prajna and are working to resolve this urgently
Monday, 13 October 2014 12:43

Follow ViryaTech on Twitter