Skip to content

Conversation

heelc29
Copy link
Contributor

@heelc29 heelc29 commented Jul 6, 2025

Summary of Changes

deprecate $app property in FieldsPlugin

Testing Instructions

only deprecation > code review
check fields plugin still working

Link to documentations

Please select:

heelc29 added a commit to heelc29/joomla-manual that referenced this pull request Jul 6, 2025
@heelc29 heelc29 marked this pull request as draft July 6, 2025 20:46
@ceford
Copy link
Contributor

ceford commented Jul 22, 2025

I have tested this item ✅ successfully on 7b55457

Just a thought: would it be better to use a local $language variable:

$language = $app->getLanguage()

and then use that in the loops. Otherwise, this looks OK to me.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45695.

@laoneo
Copy link
Member

laoneo commented Jul 25, 2025

I have tested this item ✅ successfully on 7b55457


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45695.

@richard67
Copy link
Member

@heelc29 Is there a reason why this PR is still draft?

@heelc29
Copy link
Contributor Author

heelc29 commented Jul 28, 2025

@heelc29 Is there a reason why this PR is still draft?

Since I discovered an use of the variable in the core and updated the testing instructions and also have to update the baseline file.

@heelc29 heelc29 marked this pull request as ready for review July 28, 2025 15:59
@brianteeman
Copy link
Contributor

we need to do better than this. Instead of adding an exception why not fix it. I was taught by @nibra that when we deprecate something we should stop using it in the core at the same time.

@richard67
Copy link
Member

we need to do better than this. Instead of adding an exception why not fix it. I was taught by @nibra that when we deprecate something we should stop using it in the core at the same time.

@brianteeman In general that's right, but here we need the exclusion due to the b/c code:

$app   = $this->getApplication() ?: $this->app;

The ?: $this->app part has to be kept for b/c until Joomla 7, and this part causes the PHPstan complaint.

@laoneo
Copy link
Member

laoneo commented Jul 28, 2025

But then it would be better to add a phpstan ignore on that line.

@richard67
Copy link
Member

But then it would be better to add a phpstan ignore on that line.

@laoneo I don't know. Maybe yes. As it is a relative new thing that we do not ignore PHPstan in CI, we don't have much practice with that yet. Up to now we were using the baseline file to ignore errors and as a task list.

I think we should discuss that and find a common way in the maintainers team.

@brianteeman
Copy link
Contributor

Shouldn't there be some documentation explaining why this is being deprecated

@heelc29
Copy link
Contributor Author

heelc29 commented Jul 28, 2025

Shouldn't there be some documentation explaining why this is being deprecated

In future it is no longer supported by CMSPlugin #38060

@trigger_error('The application should be injected through setApplication() and requested through getApplication().', E_USER_DEPRECATED);

@brianteeman
Copy link
Contributor

that isnt a why? and its not in the accompanying manual entry

@richard67
Copy link
Member

RTC as the previous human tests are still valid. There was only a change on the PHPstan baseline file after that and a clean branch update.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45695.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 9, 2025
@richard67
Copy link
Member

To me the joomla/Manual#488 documentation PR looks complete.

@muhme
Copy link
Contributor

muhme commented Aug 9, 2025

✅ Final test before merge, JBT graft full package

  • Enabled Log Almost Everything
  • Created custom field 'color' and featured article and tested in administrator backend and site frontent
  • Created one more article, a field group and fields user, url and usergroup and assigned to the group
  • No entries in administrator/logs/*

@muhme muhme merged commit 8d1d99a into joomla:5.4-dev Aug 9, 2025
40 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 9, 2025
@muhme muhme added this to the Joomla! 5.4.0 milestone Aug 9, 2025
@muhme
Copy link
Contributor

muhme commented Aug 9, 2025

Thank you @heelc29 for your contribution. Thank you @brianteeman for support. Thank you @ceford and @laoneo for testing.

richard67 pushed a commit to joomla/Manual that referenced this pull request Aug 10, 2025
@heelc29 heelc29 deleted the 5.4/deprecations/fieldsplugin branch August 17, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants