Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not implicitly fall back to spl_autoload() if no autoloader is registered on PHP 7 #2822

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

bwoebi
Copy link
Collaborator

@bwoebi bwoebi commented Aug 29, 2024

This could lead to accidental inclusion of files, breaking __autoload() and possibly including the wrong file.

@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.97%. Comparing base (5513f97) to head (0b1f9b0).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2822      +/-   ##
============================================
- Coverage     75.31%   73.97%   -1.34%     
  Complexity     2516     2516              
============================================
  Files           146      173      +27     
  Lines         14650    18679    +4029     
  Branches          0      975     +975     
============================================
+ Hits          11033    13818    +2785     
- Misses         3617     4324     +707     
- Partials          0      537     +537     
Flag Coverage Δ
appsec-extension 69.12% <ø> (?)
tracer-extension 78.19% <ø> (ø)
tracer-php 74.10% <ø> (ø)

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

see 27 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5513f97...0b1f9b0. Read the comment docs.

…istered on PHP 7

This could lead to accidental inclusion of files, breaking __autoload() and possibly including the wrong file.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@pr-commenter
Copy link

pr-commenter bot commented Aug 29, 2024

Benchmarks

Benchmark execution time: 2024-08-29 20:46:23

Comparing candidate commit 0b1f9b0 in PR branch bob/fix-autoload with baseline commit 5513f97 in branch master.

Found 5 performance improvements and 1 performance regressions! Performance is the same for 172 metrics, 0 unstable metrics.

scenario:ContextPropagationBench/benchExtractHeaders128Bit-opcache

  • 🟩 execution_time [-49.927ns; -30.073ns] or [-4.758%; -2.866%]

scenario:EmptyFileBench/benchEmptyFileBaseline-opcache

  • 🟥 execution_time [+133.203µs; +235.477µs] or [+5.038%; +8.906%]

scenario:EmptyFileBench/benchEmptyFileOverhead

  • 🟩 execution_time [-204.548µs; -64.472µs] or [-7.234%; -2.280%]

scenario:PDOBench/benchPDOOverhead

  • 🟩 execution_time [-18.204µs; -15.852µs] or [-6.625%; -5.769%]

scenario:PDOBench/benchPDOOverheadWithDBM

  • 🟩 execution_time [-18.433µs; -16.419µs] or [-6.205%; -5.527%]

scenario:WordPressBench/benchWordPressOverhead

  • 🟩 execution_time [-21.761ms; -21.507ms] or [-83.901%; -82.920%]

Copy link
Contributor

@iamluc iamluc left a comment

Choose a reason for hiding this comment

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

Except the comment of one test, LGTM!

@@ -0,0 +1,23 @@
--TEST--
Execute the default spl_autoload implementation if spl_autoload_register() is called without args
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong comment

@bwoebi bwoebi merged commit d03ef3f into master Aug 30, 2024
10 of 14 checks passed
@bwoebi bwoebi deleted the bob/fix-autoload branch August 30, 2024 09:28
@bwoebi bwoebi added this to the 1.3.0 milestone Sep 6, 2024
estringana pushed a commit that referenced this pull request Sep 12, 2024
…istered on PHP 7 (#2822)

* Do not implicitly fall back to spl_autoload() if no autoloader is registered on PHP 7

This could lead to accidental inclusion of files, breaking __autoload() and possibly including the wrong file.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
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