Skip to content

Conversation

zsistla
Copy link
Contributor

@zsistla zsistla commented Aug 8, 2025

No description provided.

lavarou and others added 7 commits June 25, 2025 16:22
With recent official PHP docker images the Zend OPCache extension is
loaded by default. This is causing some test failures as PHP will output
a warning message when the `integration_runner` attempts to load this
extension. As a result any `EXPECT` statements in tests will fail due to
this extra output.

The solution chosen was to use the “-m” option for the `php` and
`php-cgi` binaries to probe if the Zend OPCache module is loaded by
default in the PHP environment. Both binaries are used in testing so the
defaults of both are considered. The value of the integration_runner
command line option `opcache_off` is also noted. When a test is going to
be run this information is used to determine if the
`zend_extension=opcache.so` is needed as well as setting the values of
`opcache.enable` and `opcache.enable_cli`. These INI values needed
special handling because it is possible these are overwritten by values
in the INI stanza of a given test case. Also consideration is needed to
if the `PHPMODULES` stanza exists in the test case and specifies loading
the `opcache.so` module.

---------

Co-authored-by: Michal Nowacki <[email protected]>
When Composer runtime API is used to get packages information, the
agent should not generate packages information using legacy methods.
This solves the problem of package data detected with the help of
Composer's runtime API not to be sent to the backend in environments
using “once-per-process” setting. The reason for is that the first 
request generates package information using Composer's runtime API
but every next request only generates package information using legacy
method. This in conjunction with the fact that daemon is only sending
the last package information received from the daemon leads to a
situation that package information returned by Composer runtime API
is lost and never makes it to the backend.
@zsistla zsistla requested a review from bduranleau-nr August 8, 2025 21:25
@newrelic-php-agent-bot
Copy link

newrelic-php-agent-bot commented Aug 8, 2025

Test Suite Status Result
Multiverse 16/16 passing
SOAK 85/85 passing

@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2025

Codecov Report

❌ Patch coverage is 71.18644% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.12%. Comparing base (765888d) to head (eb011f0).

Files with missing lines Patch % Lines
agent/fw_zend3.c 0.00% 5 Missing ⚠️
agent/php_call.c 42.85% 4 Missing ⚠️
agent/fw_drupal8.c 75.00% 3 Missing ⚠️
agent/lib_composer.c 72.72% 3 Missing ⚠️
agent/lib_zend_http.c 0.00% 1 Missing ⚠️
agent/php_agent.c 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1110      +/-   ##
==========================================
+ Coverage   77.27%   78.12%   +0.84%     
==========================================
  Files         199      193       -6     
  Lines       28342    27989     -353     
==========================================
- Hits        21902    21866      -36     
+ Misses       6440     6123     -317     
Flag Coverage Δ
agent-for-php-7.2 78.37% <50.84%> (+0.89%) ⬆️
agent-for-php-7.3 78.38% <55.93%> (+0.89%) ⬆️
agent-for-php-7.4 78.24% <73.68%> (+0.88%) ⬆️
agent-for-php-8.0 77.45% <72.54%> (+0.88%) ⬆️
agent-for-php-8.1 77.77% <72.54%> (+0.88%) ⬆️
agent-for-php-8.2 77.38% <72.54%> (+0.87%) ⬆️
agent-for-php-8.3 77.38% <72.54%> (+0.87%) ⬆️
agent-for-php-8.4 77.40% <72.54%> (+0.87%) ⬆️

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.

@zsistla zsistla merged commit 2f79c48 into main Aug 9, 2025
128 checks passed
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.

7 participants