Skip to content

chore(agent): remove EOL'ed framework code#1156

Open
ZNeumann wants to merge 7 commits intodevfrom
zjn/eol
Open

chore(agent): remove EOL'ed framework code#1156
ZNeumann wants to merge 7 commits intodevfrom
zjn/eol

Conversation

@ZNeumann
Copy link
Contributor

Removes the code for the frameworks mentioned in the support section of https://github.com/newrelic/newrelic-php-agent/releases/tag/v12.4.0.29. To be included in a release after February

@newrelic-php-agent-bot
Copy link

newrelic-php-agent-bot commented Jan 16, 2026

Test Suite Status Result
Multiverse 0/18 passing
SOAK 141/142 passing

@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2026

Codecov Report

❌ Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.93%. Comparing base (4c7439e) to head (a4edb71).

Files with missing lines Patch % Lines
agent/fw_laravel.c 22.22% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1156      +/-   ##
==========================================
+ Coverage   78.36%   79.93%   +1.57%     
==========================================
  Files         193      189       -4     
  Lines       28278    27715     -563     
==========================================
- Hits        22159    22155       -4     
+ Misses       6119     5560     -559     
Flag Coverage Δ
agent-for-php-7.2 79.91% <25.00%> (+1.65%) ⬆️
agent-for-php-7.3 79.93% <25.00%> (+1.65%) ⬆️
agent-for-php-7.4 79.80% <25.00%> (+1.64%) ⬆️
agent-for-php-8.0 79.32% <22.22%> (+1.64%) ⬆️
agent-for-php-8.1 79.54% <22.22%> (+1.62%) ⬆️
agent-for-php-8.2 79.15% <22.22%> (+1.61%) ⬆️
agent-for-php-8.3 79.22% <22.22%> (+1.61%) ⬆️
agent-for-php-8.4 79.24% <22.22%> (+1.61%) ⬆️
agent-for-php-8.5 78.55% <22.22%> (+1.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@ZNeumann ZNeumann added the on hold This issue or pull request is necessary, but better suited for the future label Jan 26, 2026
nrl_debug(NRL_FRAMEWORK, "Laravel version is " NRP_FMT, NRP_PHP(version));

if (php_version_compare(version, "5.0") < 0) {
NRPRG(framework_version) = 4;
Copy link
Contributor

Choose a reason for hiding this comment

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

A quick scan of the code suggests that if we're removing framework_version && the NR_PHP_WRAPPER_REQUIRE_FRAMEWORK_VERSION macro from Laravel, we may want to remove them from the agent altogether. It doesn't appear to be used anywhere outside of the fw_laravel logic.

Comment on lines 363 to 366
{"Slim", "slim", NR_PSTR("slim/slim/app.php"), 0, nr_slim_enable,
NR_FW_SLIM}, /* 3.x */
{"Slim", "slim", NR_PSTR("slim/slim/slim.php"), 0, nr_slim_enable,
NR_FW_SLIM}, /* 2.x */
Copy link
Contributor

Choose a reason for hiding this comment

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

The Slim 2.x entry should be removed and the 3.x comment should be updated to 4.x

Comment on lines 347 to 356
{"Laravel", "laravel", NR_PSTR("illuminate/foundation/application.php"), 0,
nr_laravel_enable, NR_FW_LARAVEL},
{"Laravel", "laravel", NR_PSTR("bootstrap/compiled.php"), 0, nr_laravel_enable,
NR_FW_LARAVEL}, /* 4.x */
{"Laravel", "laravel", NR_PSTR("storage/framework/compiled.php"), 0,
nr_laravel_enable, NR_FW_LARAVEL}, /* 5.0.0-14 */
{"Laravel", "laravel", NR_PSTR("vendor/compiled.php"), 0, nr_laravel_enable,
NR_FW_LARAVEL}, /* 5.0.15-5.0.x */
{"Laravel", "laravel", NR_PSTR("bootstrap/cache/compiled.php"), 0, nr_laravel_enable,
NR_FW_LARAVEL}, /* 5.1.0-x */
Copy link
Contributor

Choose a reason for hiding this comment

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

EOL'd versions of Laravel should be removed from this list

@bduranleau-nr
Copy link
Contributor

I think there are also Laravel integration tests that can either be removed or modified to reflect these changes- for example, Laravel has mock_artisan.php and mock_artisan.php8.php for PHP > 8.0. Since we won't support any Laravel versions that run on < PHP 8.0, we should probably remove the unsupported file and consolidate all the test logic that checks PHP version and require's one mock file or the other.
I briefly checked the other frameworks being EOL'd for integration tests that may need removal/fixing but I didn't see any. Just Laravel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on hold This issue or pull request is necessary, but better suited for the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants