Repository navigation
Conversation
…he_list This fixed the following failed tests(This is PHP-5.3 only): Phar: copy-on-write test 13 [cache_list] [ext/phar/tests/cache_list/copyonwrite13.phar.phpt] Phar: copy-on-write test 14 [cache_list] [ext/phar/tests/cache_list/copyonwrite14.phar.phpt] Phar: copy-on-write test 21 [cache_list] [ext/phar/tests/cache_list/copyonwrite21.phar.phpt] Phar: copy-on-write test 22 [cache_list] [ext/phar/tests/cache_list/copyonwrite22.phar.phpt] Phar: copy-on-write test 4a [cache_list] [ext/phar/tests/cache_list/copyonwrite4a.phpt] Phar front controller other [ext/phar/tests/cache_list/frontcontroller1.phpt] Phar front controller mime type extension is not a string [cache_list] [ext/phar/tests/cache_list/frontcontroller11.phpt] Phar front controller PHP test [cache_list] [ext/phar/tests/cache_list/frontcontroller2.phpt] Phar: phpinfo display 3 [ext/phar/tests/phpinfo_003.phpt]
|
Comment on behalf of laruence at php.net: thanks, fixed in : 8848778 |
heyJordanParker
added a commit
to heyJordanParker/php-sharp
that referenced
this pull request
Oct 12, 2026
…uctors, events and init Mago php#152 merged Mago master's named constructors (php#161), events (php#162) and the `init` accessor (php#169), so this branch pinned a Mago without them, and the spec examples that use them still failed here. The engine now builds from Mago 1b517f4. The generated header changes only in the commit it names. Six more spec examples pass and leave the baseline, written with the `cp` command `sharp/bin/test --spec` prints: - §9.1 constructor-call-this, named-constructors and set-once - §15 extern-event, extern-event-effects and standalone-event ext/sharp/sharp_unit.h <- names Mago 1b517f4 sharp/baseline/spec <- the six examples that now pass leave it
heyJordanParker
added a commit
to heyJordanParker/php-sharp
that referenced
this pull request
Oct 13, 2026
feat: named constructors, spec section 9.1
heyJordanParker
added a commit
to heyJordanParker/php-sharp
that referenced
this pull request
Oct 13, 2026
Problem master gained named constructors (php#161), which take bit 46 of `MetadataFlags` for `NAMED_CONSTRUCTOR` and build a `MethodParts` of their own. Solution `MetadataFlags::EVENT` moves to bit 47, and a named constructor listens to no event, as an operator does. Files crates/ ├── codex/src/metadata/flags.rs <- EVENT is 1 << 47 └── names/src/binding.rs <- of_named_constructor sets `on: None`
heyJordanParker
added a commit
to heyJordanParker/php-sharp
that referenced
this pull request
Oct 13, 2026
Problem Section 15 lands in fewer PRs: a listener's `on` clause joins `emit` in one mago-sharp PR, instead of a third PR of its own. feat/events-on also brings master's named constructors (php#161) and `init` accessor (php#169), which take bits 46 and 47 of `MetadataFlags`. Each branch had its own test of what an event is. Solution - `MetadataFlags::EVENT` is `1 << 48`, after `NAMED_CONSTRUCTOR` and `INIT`. - The listener checks use `is_event_class`, the one test `emit` uses, so an `extern event` counts only on a class for both. - The fingerprint tests keep both new rows. Files crates/ ├── codex/src/metadata/flags.rs <- EVENT is 1 << 48 ├── analyzer/src/statement/class_like/listener.rs <- uses is_event_class └── fingerprint/tests/signature_changes.rs <- both rows
heyJordanParker
added a commit
to heyJordanParker/php-sharp
that referenced
this pull request
Oct 13, 2026
Problem: master merged php#161, named constructors, and php#162, events and the interface's get-only property, after d3adf51, the last master this branch merged. Both change `new`, the class member parser, the checker's walk, the analyzer's `return` and lambda lowering, which the generics slice changes too, so 15 files conflicted and the PR could not merge. Solution: merge 7236cd0 with no rebase, keeping both sides' behavior in every conflict, then fix four places where one side stopped the other's behavior from taking effect: Keep both sides of each conflict: - `new` carries both the type arguments and the named constructor, so `new PaginatedList<Order>(rows)` and `new Artifact.fromJson(json)` both lower - the `return` check takes master's named constructor return type and this branch's `expect_type` and generic `static` type - a lambda keeps this branch's lowering, which also captures its method's type arguments; master's `Node` argument to `closure_uses` read only a span - the checker's notes name type parameters and named constructors together Write `Class<Order>` as a member's type again: - master's nested-type refusal took any member that starts with `class` for a nested class; `class` followed by `<` is now the type `Class<…>`, since a declared class names itself first Refuse a named constructor in a generic class with a true message: - a named constructor runs as a static method, which a generic class's type arguments reach only in R4, so a generic class declared one with the false error "`Box` needs its type argument"; it is now "not supported yet", and a call of one adds no type argument error the user has no place to write Check a generic interface's property against the header's type argument: - master's check compared a class's property with the interface's raw type parameter, so `string item` under `: Holder<int>` compiled; the stated type now reads `TItem` as the header's `int` Keep an event's header type arguments for the engine: - an event's header, as in `: Holder<int>`, now lowers its type text list as a class's does, so the engine knows the event is a `Holder<int>` crates/ ├── analyzer/ │ ├── src/expression/instantiation.rs <- `new` takes type arguments and a named constructor │ ├── src/statement/class_like/mod.rs <- both signature checks, the localized interface property type │ ├── src/statement/return.rs <- named constructor return type with expect_type │ └── tests/sharp.rs <- both sides' tests, the named constructor call and generic interface property tests ├── codex/src/scanner/ │ ├── class_like.rs <- an event declares no type parameters │ └── function_like.rs <- an event's parameters read an empty type context ├── names/ │ ├── src/binding.rs <- a named constructor declares no type parameters │ └── src/internal/walker.rs <- the event walk beside the method type parameters ├── semantics/ │ ├── src/internal/checker/sharp.rs <- both sides' places and notes, the generic class named constructor refusal │ └── tests/sharp.rs <- the arity test, the merged notes, the refusal test ├── sharp-bridge/ │ ├── src/lower.rs <- named constructor and generic `new`, lambdas, the event's header type arguments │ └── tests/lower.rs <- both sides' tests, the event header test └── syntax/ ├── src/cst/cst/instantiation.rs <- `new` holds both fields ├── src/cst/node.rs, src/walker/mod.rs <- both fields are walked ├── src/parser/internal/class_like/method.rs <- `class<` is the type `Class<…>` ├── src/parser/internal/expression.rs <- a named constructor call has no type arguments ├── src/parser/internal/instantiation.rs <- `new` parses type arguments, no named constructor ├── src/parser/internal/statement.rs <- the event statement beside a `Class<…>` local └── tests/sharp.rs <- named constructors leave the not-supported rows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when specify an invalide phar.cache_list in PHP5.3 will report hashtable inconsist.
$php -d phar.cache_list=/invalid a.php
The reason and the fix is almost the same as @laruence ever fixed bug#62597 (segfault in php_stream_wrapper_log_error with ZTS build) in PHP-5.4 e7535e0 .
but crash in different place. so I didn't fill a bug.
either merge or cherry-pick from 5.4 are fine for me :)
BT:
And this fixed the following failed tests(PHP-5.3):