APP-CLI-DOEXECUTE-001

class MyCli extends JApplicationCli

JApplicationCli is abstract — implement doExecute()

CliApplication (and WebApplication) are abstract in Joomla 4+. The entry point is doExecute(), not a custom execute() you invent.

class MyCli extends JApplicationCliCliApplication + doExecute()

Dies at Joomla 3 → 4J3: Works nativelyJ4: Changed behaviourJ6: Removed — fatalBC plugin: partialPatch possible — review itJoomla API

What you will see

  • Cannot instantiate abstract class
  • Class ... contains 1 abstract method and must therefore be declared abstract

Symptoms people search

CLI script abstract class · doExecute

Replace this code

Swap class MyCli extends JApplicationCli for CliApplication + doExecute().

Joomla 3

Remove or stop calling this

class LmsCli extends JApplicationCli {
    public function execute() { /* old */ }
}

Joomla 4 / 6

Use this instead

class LmsCli extends \Joomla\CMS\Application\CliApplication {
    protected function doExecute(): void { /* your CLI work */ }
}

How to fix it

  1. 1Implement protected doExecute().
  2. 2Do not instantiate CliApplication directly.

Also known as

doExecute · CliApplication abstract · JApplicationWeb abstract

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

Fill out the quick form and we'll reach out.