Class Registry ranking with substituting classes

Bug #1029983 reported by Bill Gosse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PHPDevShell
Invalid
Undecided
Unassigned

Bug Description

I just worked through the "Plugin Class Sharing and Substituting" section of the doc and had one small issue.

I created a new plugin from the existing userAction plugin and made the suggested changes to its config file.

I installed my new plugin but I couldn't get it to work right away. I tried changing its ranking in the Class Registry without success. This change included trying both a higher and a lower rank number then the original plugin it was copied from.

I originally assumed that a rank of 1 has a higher priority then a rank 3, but I wasn't sure.

I finally got my new substituting plugin to work after I uninstalled the original plugin that it was created from. I'm assume deleting the original userAction class from the registry would have worked as well.

Revision history for this message
Greg (gregfr) wrote :

I think the "higher" priority is to be taken literally: the class actually used is the class with the higher rank.

The purpose is precisely not to be forced to un-install the "replaced" plugin, so something must be wrong. Can you please include the xml declaration inside plugin.config.xml?

Revision history for this message
Bill Gosse (bill-gosse) wrote : RE: [Bug 1029983] Re: Class Registry ranking with substituting classes

Hi Greg,

I'm not sure what you mean by " Can you please include the xml declaration inside plugin.config.xml?".

Regards,
Bill

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Greg
Sent: Friday, July 27, 2012 7:35 PM
To: Bill Gosse
Subject: [Bug 1029983] Re: Class Registry ranking with substituting classes

I think the "higher" priority is to be taken literally: the class actually used is the class with the higher rank.

The purpose is precisely not to be forced to un-install the "replaced"
plugin, so something must be wrong. Can you please include the xml declaration inside plugin.config.xml?

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1029983

Title:
  Class Registry ranking with substituting classes

Status in Open Source PHP RAD Framework with UI.:
  New

Bug description:
  I just worked through the "Plugin Class Sharing and Substituting"
  section of the doc and had one small issue.

  I created a new plugin from the existing userAction plugin and made
  the suggested changes to its config file.

  I installed my new plugin but I couldn't get it to work right away. I
  tried changing its ranking in the Class Registry without success. This
  change included trying both a higher and a lower rank number then the
  original plugin it was copied from.

  I originally assumed that a rank of 1 has a higher priority then a
  rank 3, but I wasn't sure.

  I finally got my new substituting plugin to work after I uninstalled
  the original plugin that it was created from. I'm assume deleting the
  original userAction class from the registry would have worked as well.

To manage notifications about this bug go to:
https://bugs.launchpad.net/phpdevshell/+bug/1029983/+subscriptions

Revision history for this message
Greg (gregfr) wrote :

I think this is not a bug, but maybe an imprecision in the docs: when two classes have the same name in the class registry, the one with the highest rank is used. BTW you can also dis-enable a specific class by setting "enable" to 0 in the database.

Changed in phpdevshell:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.