Skip to content

PHP 8.2+ modernization, DI mailer injection, and UI refinements.#334

Merged
terabytesoftw merged 9 commits intoyiisoft:masterfrom
terabytesoftw:feature_1
Mar 10, 2026
Merged

PHP 8.2+ modernization, DI mailer injection, and UI refinements.#334
terabytesoftw merged 9 commits intoyiisoft:masterfrom
terabytesoftw:feature_1

Conversation

@terabytesoftw
Copy link
Member

Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Tests pass?

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (74655b7) to head (7a36ac5).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##              master      #334    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity        43        44     +1     
============================================
  Files             10        13     +3     
  Lines            311       479   +168     
============================================
+ Hits             311       479   +168     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Yii2 basic app for PHP 8.2+, refactors layout rendering into partials, and introduces DI-based mailer usage (wired through the Yii container and injected into SiteController) alongside UI refinements for the public pages.

Changes:

  • Add declare(strict_types=1); and introduce typed properties/return types across several app classes.
  • Refactor layout into _head, _header, and _footer partials; update navigation/logout rendering and refresh several public views/styles.
  • Switch contact email sending to use DI (MailerInterface) with test bootstrap support to align DI container mailer with Codeception’s mail capture.

Reviewed changes

Copilot reviewed 27 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
widgets/Alert.php Adds strict types, property typing, and refactors Bootstrap Alert usage.
web/index.php Enables strict types for the web entrypoint.
web/index-test.php Enables strict types for the test entrypoint.
web/css/site.css Updates layout styling to flex-based container and adds centered-page rules.
views/site/index.php Removes h-100 dependency and reformats helper calls for readability.
views/site/error.php Adds strict types and redesigns error page layout (status code + call-to-action).
views/site/contact.php Adds a “success” screen and refactors form field option structure.
views/site/about.php Updates about page presentation and adds a homepage CTA.
views/layouts/main.php Moves head/header/footer responsibilities into partials.
views/layouts/_head.php Centralizes asset/meta/csrf registrations.
views/layouts/_header.php Implements nav items array + logout link using data-method="post".
views/layouts/_footer.php Extracts footer markup and updates formatting.
tests/_bootstrap.php Fixes YII constants setup and adds strict types.
tests/Unit/Models/ContactFormTest.php Updates contact signature usage to pass the mailer + sender details.
tests/Unit/LogoutTest.php Updates controller construction and expected logout link HTML.
tests/Unit/LoginTest.php Updates controller construction for mailer injection.
tests/Support/MailerBootstrap.php Adds bootstrap to bind DI MailerInterface to the app mailer in tests.
models/User.php Adds strict types and typed properties; updates identity method signatures.
models/LoginForm.php Adds strict types and typed properties; refactors cached user loading.
models/ContactForm.php Switches email sending to take MailerInterface + sender details as params.
controllers/SiteController.php Adds constructor mailer injection and updates contact flow to use it.
config/web.php Configures container singleton mailer + maps mailer component to MailerInterface.
config/test.php Adds test bootstrap + tweaks mailer config.
config/db.php Uses ::class constant for DB connection class.
config/console.php Uses ::class constants for components/modules.
commands/HelloController.php Adds strict types and types the action method.
assets/AppAsset.php Adds strict types and replaces string class names with ::class.
docs/images/error-light.png Adds documentation image asset.
docs/images/error-dark.png Adds documentation image asset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 27 out of 33 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 27 out of 33 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 35 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@terabytesoftw terabytesoftw merged commit 43f17ce into yiisoft:master Mar 10, 2026
13 checks passed
@terabytesoftw terabytesoftw deleted the feature_1 branch March 10, 2026 21:37
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.

3 participants