Skip to content

Add case check for external dependency classes - #2556

Merged
Jeckerson merged 2 commits into
developmentfrom
fix-external-class-case-sensitive
May 30, 2026
Merged

Add case check for external dependency classes#2556
Jeckerson merged 2 commits into
developmentfrom
fix-external-class-case-sensitive

Conversation

@Jeckerson

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I updated the CHANGELOG

Review of #2499 and different vision approach.

@Jeckerson
Jeckerson requested a review from niden May 30, 2026 19:18
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Benchmark report

Comparison against development (7cad41fe7dd8e803608112dd0407ad0b69c07976) on fix-external-class-case-sensitive (6d7a14424e98fb981ee9808bcbe30f250dbde15e).
Each row's mode column shows the head-branch absolute throughput and the percent delta vs base. Positive deltas on Zephir* subjects mean head is faster; deltas on Php* baseline subjects are noise-floor signal.

+---------------------+----------------------------------------+-----+------+-----+----------------+-----------------------+------------------+
| benchmark           | subject                                | set | revs | its | mem_peak       | mode                  | rstdev           |
+---------------------+----------------------------------------+-----+------+-----+----------------+-----------------------+------------------+
| PropertyAccessBench | benchZephirPropertyRead                |     | 500  | 5   | 2.270mb +0.01% | 0.289779ops/μs +0.72% | ±2.43% +35.57%   |
| PropertyAccessBench | benchPhpPropertyRead                   |     | 500  | 5   | 2.270mb +0.01% | 0.665255ops/μs -3.33% | ±1.49% -81.24%   |
| StringConcatBench   | benchZephirStringConcat                |     | 500  | 5   | 2.270mb +0.01% | 0.948668ops/μs -0.82% | ±2.62% +44.93%   |
| StringConcatBench   | benchPhpStringConcat                   |     | 500  | 5   | 2.270mb +0.01% | 0.722274ops/μs -0.08% | ±2.02% -52.24%   |
| NewInstanceBench    | benchZephirNewInstanceLoop             |     | 200  | 5   | 2.270mb +0.01% | 0.079438ops/μs -0.98% | ±1.12% -55.65%   |
| NewInstanceBench    | benchPhpNewInstanceLoop                |     | 200  | 5   | 2.270mb +0.01% | 0.342044ops/μs +0.55% | ±11.18% +389.26% |
| ArrayAccessBench    | benchZephirArrayFetchString            |     | 500  | 5   | 2.270mb +0.01% | 0.345915ops/μs -3.55% | ±1.00% +6.98%    |
| ArrayAccessBench    | benchPhpArrayFetchString               |     | 500  | 5   | 2.270mb +0.01% | 0.363147ops/μs -0.75% | ±3.15% +130.26%  |
| MethodCallBench     | benchZephirMethodDispatch              |     | 500  | 5   | 2.270mb +0.01% | 0.109698ops/μs -0.99% | ±0.87% +6.54%    |
| MethodCallBench     | benchPhpMethodDispatch                 |     | 500  | 5   | 2.270mb +0.01% | 0.456760ops/μs +0.09% | ±3.16% +366.74%  |
| VariadicBench       | benchZephirVariadicNarrow              |     | 1000 | 5   | 2.270mb +0.01% | 0.048614ops/μs +0.68% | ±0.19% -49.05%   |
| VariadicBench       | benchZephirVariadicWide                |     | 1000 | 5   | 2.270mb +0.01% | 0.031402ops/μs +1.50% | ±1.02% +45.37%   |
| VariadicBench       | benchZephirFuncGetArgs                 |     | 1000 | 5   | 2.270mb +0.01% | 0.044871ops/μs +3.89% | ±0.39% -25.94%   |
| VariadicBench       | benchPhpVariadic                       |     | 1000 | 5   | 2.270mb +0.01% | 0.070134ops/μs +0.30% | ±1.37% +227.64%  |
| ForLoopBench        | benchZephirForOverArray                |     | 1000 | 5   | 2.270mb +0.01% | 5.912573ops/μs +5.50% | ±12.03% +243.94% |
| ForLoopBench        | benchPhpForOverArray                   |     | 1000 | 5   | 2.270mb +0.01% | 1.681845ops/μs +4.11% | ±3.60% +31.44%   |
| ForLoopBench        | benchZephirForOverIterator             |     | 1000 | 5   | 2.270mb +0.01% | 0.291185ops/μs -2.96% | ±0.53% -37.98%   |
| ForLoopBench        | benchPhpForOverIterator                |     | 1000 | 5   | 2.270mb +0.01% | 1.996616ops/μs -1.39% | ±4.58% +136.84%  |
| ForLoopBench        | benchZephirForOverIteratorWithContinue |     | 1000 | 5   | 2.270mb +0.01% | 0.287954ops/μs -3.02% | ±0.63% -29.86%   |
| ForLoopBench        | benchPhpForOverIteratorWithContinue    |     | 1000 | 5   | 2.270mb +0.01% | 1.826272ops/μs +1.18% | ±1.79% +32.02%   |
+---------------------+----------------------------------------+-----+------+-----+----------------+-----------------------+------------------+

PHP 8.3 on Linux (X64). Micro-benchmarks are noisy on shared runners (±5-20% per subject); treat any single-digit delta as inconclusive.

@codecov

codecov Bot commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 19.45%. Comparing base (7cad41f) to head (6d7a144).

Additional details and impacted files
@@               Coverage Diff               @@
##           development    #2556      +/-   ##
===============================================
+ Coverage        19.29%   19.45%   +0.16%     
===============================================
  Files              288      288              
  Lines            24501    24504       +3     
===============================================
+ Hits              4728     4768      +40     
+ Misses           19773    19736      -37     
🚀 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.

@Jeckerson
Jeckerson merged commit 317ec27 into development May 30, 2026
36 checks passed
@Jeckerson
Jeckerson deleted the fix-external-class-case-sensitive branch May 30, 2026 21:05
Fenikkusu added a commit to twistersfury/zephir that referenced this pull request Jun 7, 2026
Tested the hypothesis that the case-sensitivity fix (PR zephir-lang#2556/0.23.0) would
finally engage external-dependencies for Phalcon\* interfaces, exposing the
dormant generateClassHeadersPost interface-include-guard bug (the third gap)
as a new C compile failure in phalcon-shared.

Empirically disproven: upgraded a live phalcon-shared image to Zephir 0.23.0
and rebuilt against the real /opt/cphalcon sources - build succeeded, CE
relationship intact, generated C unchanged. locateExternalClassFile() only
tries two casings (exact-FQN or fully-lowercased) and misses Phalcon's actual
hybrid casing convention (lowercase root + PascalCase sub-path), so
external-dependencies stays dormant for Phalcon classes regardless of version.
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.

2 participants