?
avatar C-Lodder
C-Lodder
1 Jun 2017

Steps to reproduce the issue

In my module, I'm using the following to get the current version being installed:

public function preflight($type, $parent)
{
    $this->release = $parent->get('manifest')->version;
}

which was working fine in J3.x, however in J4 it results in:

Fatal error: Call to undefined method Joomla\CMS\Installer\Adapter\ModuleAdapter::get()

System information (as much as possible)

  • Joomla 4.0-nightly
  • PHP 5.6 and 7.0.10

Download module to test

mod_shoutbox.zip

avatar C-Lodder C-Lodder - open - 1 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Jun 2017
avatar C-Lodder C-Lodder - change - 1 Jun 2017
The description was changed
avatar C-Lodder C-Lodder - edited - 1 Jun 2017
avatar mbabker
mbabker - comment - 1 Jun 2017

Known B/C break, the install adapters no longer extend JObject. Use
$parent->manifest->version instead on 4.0 (I don't remember if that
property is declared in 3.x off hand).

On Thu, Jun 1, 2017 at 5:49 PM Lodder notifications@github.com wrote:

Steps to reproduce the issue

In my module, I'm using the following to get the current version being
installed:

public function preflight($type, $parent)
{
$this->release = $parent->get('manifest')->version;
}

which was working fine in J3.x, however in J4 it results in:

Fatal error: Call to undefined method
Joomla\CMS\Installer\Adapter\ModuleAdapter::get()

System information (as much as possible)

  • Joomla 4.0-nightly
  • PHP 5.6 and 7.0.10

Module download to test

mod_shoutbox.zip
https://github.com/joomla/joomla-cms/files/1045330/mod_shoutbox.zip


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#16433, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWfoTbVXMg10uCdoD2TJaiTGXCjD0xEks5r_t14gaJpZM4NtLWv
.

--

  • Michael Please pardon any errors, this message was sent from my iPhone.
avatar C-Lodder C-Lodder - close - 1 Jun 2017
avatar C-Lodder
C-Lodder - comment - 1 Jun 2017

Yup, that seemed to work.

avatar C-Lodder C-Lodder - change - 1 Jun 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-06-01 15:55:19
Closed_By C-Lodder
avatar laoneo
laoneo - comment - 3 Jun 2017

Can you please test if it works on J3 as well when directing accessing the property. Otherwise we need to port that back into J3.

Add a Comment

Login with GitHub to post a comment