Skip to content

[Share By Email] Fix view model autoloading#490

Merged
Alkarex merged 1 commit into
FreshRSS:mainfrom
JamBalaya56562:fix/share-by-email-view-model
Jul 12, 2026
Merged

[Share By Email] Fix view model autoloading#490
Alkarex merged 1 commit into
FreshRSS:mainfrom
JamBalaya56562:fix/share-by-email-view-model

Conversation

@JamBalaya56562

Copy link
Copy Markdown
Contributor

Summary

  • align the Share By Email view namespace with its Models/View.php path
  • use the typed view model in both the controller and mailer
  • declare rss_url for compatibility with the legacy simple layout
  • bump the Share By Email extension version to 0.3.5

Root cause

The view class was stored in Models/View.php but declared and referenced as ShareByEmail\mailers\View. The extension autoloader therefore looked for a non-existent mailers/View.php file. When loading failed, the controller and mailer fell back to the base Minz_View, causing dynamic-property deprecation warnings on PHP 8.2 and an undefined rss_url warning in the legacy simple layout.

Using ShareByEmail\Models\View makes the namespace resolve to the existing file and keeps all view data on declared typed properties.

Fixes #210
Fixes #363

Validation

  • confirmed every Share By Email view reference uses ShareByEmail\Models\View
  • confirmed no references to ShareByEmail\mailers\View remain
  • confirmed entry, to, subject, content, and rss_url are declared on the view model
  • confirmed the diff is limited to Share By Email view-related files and metadata

PHPStan and PHPCS were not run locally because PHP is unavailable in the local environment. They are expected to run in GitHub Actions.

@Alkarex Alkarex merged commit b94d29d into FreshRSS:main Jul 12, 2026
1 check passed
@JamBalaya56562 JamBalaya56562 deleted the fix/share-by-email-view-model branch July 12, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Share By Email] More warnings... [Share By Email] Warnings

2 participants