Skip to content

bug #62844; relative URL schemes in parse_url() - #169

Closed
hikari-no-yume wants to merge 2 commits into
php:masterfrom
hikari-no-yume:parse_url_relative_scheme
Closed

hikari-no-yume wants to merge 2 commits into
php:masterfrom
hikari-no-yume:parse_url_relative_scheme

Conversation

@hikari-no-yume

Copy link
Copy Markdown
Contributor

'//example.com' is parsed correctly.

https://bugs.php.net/bug.php?id=62844

@travisbot

Copy link
Copy Markdown

This pull request fails (merged 0cdda05 into cd18e20).

@travisbot

Copy link
Copy Markdown

This pull request fails (merged 2b9a7a9 into cd18e20).

@php-pulls

Copy link
Copy Markdown

Comment on behalf of stas at php.net:

merged

@php-pulls php-pulls closed this Aug 20, 2012
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: build the `init` accessor, set only while the object is created
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
Problem

master gained the `init` accessor (php#169), which takes bit 47 of `MetadataFlags`
for `INIT`, the bit `EVENT` held after the last merge.

Solution

`MetadataFlags::EVENT` moves to bit 48.

Files

crates/
└── codex/src/metadata/flags.rs               <- EVENT is 1 << 48
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#169, the `init` accessor, after 7236cd0, and it
changes the property hook loop and the checker's field note, which the
generics slice changes too.

Solution: merge c3a2b5a with no rebase and keep both sides:
- an `init` body lowers as the `set` hook, and its value from plain PHP is
  checked against the property's type arguments as a `set` body's is; testing
  the accessor's name for `set` alone would have added a second, checked `set`
  hook beside the `init` one, which PHP refuses
- the field note names `init` and type parameters together

crates/
├── semantics/src/internal/checker/sharp.rs  <- the field note names `init` and generic types
└── sharp-bridge/
    ├── src/lower.rs                          <- an `init` body is a checked `set` hook
    └── tests/lower.rs                        <- an `init` property with type arguments gets one checked `set` hook
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