Skip to content

Updates for apache 2.4 - #154

Closed
crrodriguez wants to merge 6 commits into
php:masterfrom
crrodriguez:master
Closed

crrodriguez wants to merge 6 commits into
php:masterfrom
crrodriguez:master

Conversation

@crrodriguez

Copy link
Copy Markdown
Contributor

-Fix per module logging.
-Use ap_state_query where possible instead of old method of creating a pool userdata entry.

@travisbot

Copy link
Copy Markdown

This pull request fails (merged b2b4866 into c835912).

@smalyshev

Copy link
Copy Markdown
Contributor

Why fpm changes are there - are they related to Apache too?

@crrodriguez

Copy link
Copy Markdown
Contributor Author

No, for some reason when I pushed new commits to my personal repo the changes were added to this request, I likely messed somethin up.

@lstrojny

Copy link
Copy Markdown
Contributor

@crrodriguez could you cleanup the pull request (maybe close it and reopen one with a feature branch)?

@php-pulls

Copy link
Copy Markdown

Comment on behalf of stas at php.net:

I'll close it for now to avoid accidental bad merge, please clean it up and resubmit.

@php-pulls php-pulls closed this Aug 26, 2012
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
…sharp-subclass

fix: decide a call is php# by the class that declares the member
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
…ackages

Problem

patch-coverage measured only the PHP# suites: analyzer's and
semantics' tests/sharp.rs and the bridge's tests. crates/analyzer/src
and crates/semantics/src also hold the plain PHP code those suites
never run, which the packages' other tests cover. A correct pull
request that changes such a line, as php#154 changed
get_parameter_type, failed patch-coverage, and its mutants survived
in mutants because no PHP test ran against them.

Solution

patch-coverage runs every test target of mago-analyzer,
mago-semantics and mago-sharp-bridge in one cargo llvm-cov run.
mutants runs every test target of the three packages against each
mutant (--tests, the targets cargo llvm-cov runs), instead of only
sharp, lower and unit.

.github/workflows/
  ci.yml   patch-coverage and mutants run every test of the three packages
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
mago-sharp measured each pull request's new lines from php#158 on. php#150, module laws, and php#154, a call decided by the class that declares the member, merged before it, so seven of their lines never ran under a test. php-sharp measures the whole subtree pull, so patch-coverage failed on them.

- A plain PHP call that spreads a list of known count through a PHP# subclass is checked against the parent's docblock type.
- A module outside Module.sharp adds no analyzer issue, and a plain PHP class that holds the module's name makes the module a duplicate.
- A module's metadata is looked up as an event's is: the scanner always registers the name, so the lookup has no warning branch.
- The note for a refusal inside a module is unreachable!: a module holds only laws, and semantics takes each one.

Co-Authored-By: Claude <noreply@anthropic.com>
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
Problem:
Master gained php#153, php#154 and #130. php#153 makes the same `None` fix to
`check_changed_collection` that the previous merge made, so it merges cleanly.

php#154 gives `get_parameter_type` the invocation target, so a plain PHP caller reads a PHP
declaration only of a method a PHP# file declares. This branch's call in
`analyze_invocation`, which fixes a PHP# method value's type arguments from its parameter's
function type, still passed six arguments.

#130 fails any test whose `.sharp` issue names a word only PHP has, `mixed` among them. This
branch prints the type a generic member erases to as PHP declares it, so an unbounded type
parameter's erased type read "PHP's `mixed`", and six erased-signature tests failed the
check. `crates/analyzer/src/expression/access/mod.rs` gained an import on both sides.

Solution:
- `analyze_invocation` passes `&invocation.target` to `get_parameter_type`, as php#154's other
  callers do.
- `display_erased` prints an erased `mixed` as PHP# writes it, `Any?`, through
  `display_sharp_type`. Only `array`, `Closure` and `callable` stay PHP's, since PHP# has
  no name for them. The six tests pin "must take at least `Any?`" and "erases to `Any?`".
- `access/mod.rs` keeps both imports.

crates/analyzer/
├── src/expression/access/mod.rs                     <- conflict: both imports
├── src/invocation/analyzer.rs                       <- php#154's invocation target
├── src/statement/class_like/method_signature.rs     <- display_erased names `Any?`
└── tests/sharp.rs                                   <- six erased-signature texts
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.

5 participants