Skip to content

Conversation

chmst
Copy link
Contributor

@chmst chmst commented Sep 5, 2025

User description

Featured articles are integrated in com_articles


PR Type

Documentation


Description

  • Document featured articles integration into main articles component

  • Add deprecation notices for FeaturedModel, FeaturedController, and HtmlView

  • Provide migration examples for using ArticlesModel with featured filter

  • Update new-deprecations.md with breaking changes for Joomla 7.0


Diagram Walkthrough

flowchart LR
  A["Featured Articles"] --> B["Articles Component"]
  C["FeaturedModel"] --> D["ArticlesModel + filter.featured=1"]
  E["FeaturedController"] --> F["ArticlesController"]
  G["HtmlView"] --> H["Deprecated without replacement"]
Loading

File Walkthrough

Relevant files
Documentation
new-deprecations.md
Document featured articles integration deprecations           

migrations/54-60/new-deprecations.md

  • Add comprehensive documentation for featured articles integration
  • Document deprecation of FeaturedModel, FeaturedController, and
    HtmlView classes
  • Provide code examples for migration to new ArticlesModel approach
  • Include new menu link format for featured articles filtering
+24/-1   

Featured artucesa are integrated in com_articles
Copy link
Contributor

qodo-merge-pro bot commented Sep 5, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Consistency

Maintain punctuation consistency in deprecation entries; earlier entries end sentences with periods, while new entries mix styles and omit trailing periods in some lines.

Replacement: New `batchTags` function which has an additional optional parameter `$removeTags` (default value is `false`) indicating whether the tags in parameter `$value` have to be removed

### Featured articles are integrated into articles 

Since the first Joomla version, the code for featured articles was a duplicate of the articles code, with only minor differences.
Now, featured articles are integrated into articles. This change affects only the administrator.

PR: https://github.com/joomla/joomla-cms/pull/43907

Deprecated: `Joomla\Component\Content\Administrator\Model\FeaturedModel`
Use `Joomla\Component\Content\Administrator\Model\ArticlesModel` with `filter.featured = 1` instead.

New code:
```php
        $model = Factory::getApplication()->bootComponent('com_content')->getMVCFactory()->createModel('Articles', 'Administrator', ['ignore_request' => true]);
        $model->setState('filter.featured', '1');

New menu link to featured articles: administrator/index.php?option=com_content&view=articles&filter[featured]=1

Deprecated: Joomla\Component\Content\Administrator\Controller\FeaturedController
Use Joomla\Component\Content\Administrator\Controller\ArticlesController instead.

Deprecated without replacement: HtmlView - View class for a list of featured articles


</details>

<details><summary><a href='https://github.com/joomla/Manual/pull/517/files#diff-95c7f39a63008ca5fe94b72378c93f17faaf3f9168f672372e1fdcef5004c73cR71-R74'><strong>Accuracy</strong></a>

Verify the exact class name for the deprecated HtmlView (fully qualified class and namespace) to avoid ambiguity in documentation.
</summary>

```markdown
Deprecated: `Joomla\Component\Content\Administrator\Controller\FeaturedController`
Use `Joomla\Component\Content\Administrator\Controller\ArticlesController` instead.

Deprecated without replacement: `HtmlView` - View class for a list of featured articles
Clarity

Consider clarifying the scope "affects only the administrator" and whether any frontend behavior or routes are impacted; also confirm if filter.featured expects string '1' or integer 1 for consistency with existing docs.

Since the first Joomla version, the code for featured articles was a duplicate of the articles code, with only minor differences.
Now, featured articles are integrated into articles. This change affects only the administrator.

PR: https://github.com/joomla/joomla-cms/pull/43907

Deprecated: `Joomla\Component\Content\Administrator\Model\FeaturedModel`
Use `Joomla\Component\Content\Administrator\Model\ArticlesModel` with `filter.featured = 1` instead.

New code:
```php
        $model = Factory::getApplication()->bootComponent('com_content')->getMVCFactory()->createModel('Articles', 'Administrator', ['ignore_request' => true]);
        $model->setState('filter.featured', '1');

New menu link to featured articles: administrator/index.php?option=com_content&view=articles&filter[featured]=1


</details>

</td></tr>
</table>

Copy link
Contributor

qodo-merge-pro bot commented Sep 5, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Clarify namespaces and scope

The deprecation notes should use fully qualified class names and explicitly
state these apply only to Administrator MVC classes (e.g.,
Joomla\Component\Content\Administrator\View\Featured\HtmlView), to avoid
confusion with Site frontend equivalents. As written, “HtmlView deprecated
without replacement” is ambiguous and could be read as removing the frontend
Featured view; instead, clarify that the admin Featured view is deprecated and
the Articles admin view with filter.featured=1 is the functional path forward.

Examples:

migrations/54-60/new-deprecations.md [74]
Deprecated without replacement: `HtmlView` - View class for a list of featured articles

Solution Walkthrough:

Before:

```markdown
### Featured articles are integrated into articles 

This change affects only the administrator.
...
Deprecated: `Joomla\Component\Content\Administrator\Controller\FeaturedController`
Use `Joomla\Component\Content\Administrator\Controller\ArticlesController` instead.
 
Deprecated without replacement: `HtmlView` - View class for a list of featured articles



#### After:
```markdown
```markdown
### Featured articles are integrated into articles 

This change affects only the administrator.
...
Deprecated: `Joomla\Component\Content\Administrator\Controller\FeaturedController`
Use `Joomla\Component\Content\Administrator\Controller\ArticlesController` instead.
 
Deprecated: `Joomla\Component\Content\Administrator\View\Featured\HtmlView`
The functionality is now handled by the `com_content` articles view with the filter `filter[featured]=1`.




<details><summary>Suggestion importance[1-10]: 8</summary>

__

Why: The suggestion correctly identifies that using the simple class name `HtmlView` is ambiguous and that "deprecated without replacement" is misleading, significantly improving the clarity of this critical deprecation notice for developers.


</details></details></td><td align=center>Medium

</td></tr><tr><td rowspan=1>Possible issue</td>
<td>



<details><summary>Fully qualify Factory reference<!-- not_implemented --></summary>

___

**Fully qualify the <code>Factory</code> reference so the example works without requiring a <br>prior import. This prevents an undefined class error when copy-pasting the <br>snippet.**

[migrations/54-60/new-deprecations.md [65]](https://github.com/joomla/Manual/pull/517/files#diff-95c7f39a63008ca5fe94b72378c93f17faaf3f9168f672372e1fdcef5004c73cR65-R65)

```diff
-$model = Factory::getApplication()->bootComponent('com_content')->getMVCFactory()->createModel('Articles', 'Administrator', ['ignore_request' => true]);
+$model = \Joomla\CMS\Factory::getApplication()->bootComponent('com_content')->getMVCFactory()->createModel('Articles', 'Administrator', ['ignore_request' => true]);
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly advises using the fully qualified class name for Factory to make the code example self-contained and prevent potential errors, which improves the quality and usability of the documentation.

Low
General
Use integer for featured filter
Suggestion Impact:The commit updated $model->setState('filter.featured', '1'); to use an integer: $model->setState('filter.featured', 1);

code diff:

         $model = Factory::getApplication()->bootComponent('com_content')->getMVCFactory()->createModel('Articles', 'Administrator', ['ignore_request' => true]);
-        $model->setState('filter.featured', '1');
+        $model->setState('filter.featured', 1);

</details>


___

**Use an integer value for the featured filter to match expected typing and avoid <br>potential strict comparison issues. This ensures the filter is applied <br>consistently.**

[migrations/54-60/new-deprecations.md [66]](https://github.com/joomla/Manual/pull/517/files#diff-95c7f39a63008ca5fe94b72378c93f17faaf3f9168f672372e1fdcef5004c73cR66-R66)

```diff
-$model->setState('filter.featured', '1');
+$model->setState('filter.featured', 1);

[Suggestion processed]

Suggestion importance[1-10]: 4

__

Why: Using an integer 1 instead of a string '1' is more type-correct and consistent with other parts of the documentation, though the original code would likely work due to PHP's type juggling.

Low
  • Update

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.

1 participant