Skip to content

Fix test failed ext/xmlrpc/tests/bug61264.phpt - #158

Closed
reeze wants to merge 1 commit into
php:PHP-5.3from
reeze:fix-xmlrpc-test-failed
Closed

reeze wants to merge 1 commit into
php:PHP-5.3from
reeze:fix-xmlrpc-test-failed

Conversation

@reeze

@reeze reeze commented Aug 10, 2012

Copy link
Copy Markdown
Contributor

This test failed because of it missing a skipif section

Failed because of missing skipif section
@php-pulls

Copy link
Copy Markdown

Comment on behalf of laruence at php.net:

commit: 7130887

@php-pulls php-pulls closed this Aug 10, 2012
@laruence

Copy link
Copy Markdown
Member

no pull request url was sent, so I can not get that url "git pull https://****/ *" at hand, so didn't commit by merge. thanks

@laruence

Copy link
Copy Markdown
Member

I mean no pull request mail was sent... typo

@reeze

reeze commented Aug 10, 2012

Copy link
Copy Markdown
Contributor Author

Thanks :)

heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
ci: patch coverage on PHP# code, and mutants on the diff
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
Problem

Two commits since php#158 reshaped four spots only so patch-coverage would
find no line that never runs:
- check_element_equality folded Refusal::Identity, NullableOperand and
  UnorderedOperand into the Instance arm behind debug_assert!. A release
  build reported a missing `operator ==` for a refusal that cannot happen.
- collection_call's `element` closure bound the element first, so its
  unreachable! sat on a line that runs.
- Types::element_type skipped each part that is no array, so a non-array
  receiver lowered as a smaller element type instead of stopping.
- analyze_constructor_initializer folded "no class in scope" into the
  `: this(…)` and incomplete-hierarchy guard, so an impossible state
  returned Ok silently.

Solution

patch-coverage now leaves out lines that call unreachable!, so each
impossible case is its own unreachable! arm with its reason again, as
before the reshaping. A method's scope always holds its class, since
analyze_method sets it before it analyzes `: super(…)`.

crates/
├── analyzer/src/expression/binary/comparison.rs  <- check_element_equality: the
│                                                    Identity | NullableOperand |
│                                                    UnorderedOperand unreachable! arm
├── analyzer/src/statement/class_like/method.rs   <- analyze_constructor_initializer:
│                                                    unreachable! without a class, then
│                                                    the super and hierarchy guard
└── sharp-bridge/src/
    ├── lower.rs                                  <- collection_call: the plain element chain
    └── lower/types.rs                            <- element_type: unreachable! on a part
                                                     that is neither null nor an array
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#156 (the Lean setup check), php#155 (constructors) and php#158 (the test guards:
patch-coverage and mutants). One file conflicted: the `check_slice` doc in
`crates/semantics/src/internal/checker/sharp.rs`, where php#155 allows a braceless guard
clause and this branch says a type parameter as a catch type is not supported yet.

Solution:
The doc keeps php#155's guard-clause sentence and this branch's catch-type sentence.

crates/semantics/src/internal/checker/sharp.rs   <- conflict: both doc sentences
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