Skip to content

skip test for bug 43130 on firebird , not relevant - #171

Closed
mariuz wants to merge 1 commit into
php:PHP-5.4from
mariuz:issue-43130-5.4
Closed

mariuz wants to merge 1 commit into
php:PHP-5.4from
mariuz:issue-43130-5.4

Conversation

@mariuz

@mariuz mariuz commented Aug 20, 2012

Copy link
Copy Markdown
Contributor

@travisbot

Copy link
Copy Markdown

This pull request fails (merged a900b36 into 12ea5c5).

@reeze

reeze commented Aug 20, 2012

Copy link
Copy Markdown
Contributor

oh... why do you send three pull request. one should be enough.

@php-pulls

Copy link
Copy Markdown

Comment on behalf of laruence 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
…espace's constructor private

Problem: mago-sharp php#171's second round changes three things the §28 note describes. A rule can name a namespace
of plain PHP, in the project or `vendor/`. A `Namespace` built from a string compiled and never fired. A `@[rule]`
added to a Lean file no `.sharp` file reaches was not checked until something else went stale.

Solution: the note's rulings record team-lead's reversal of "namespaces taken from every PHP# class", the private
constructor with `namespace_decl`, the rules check that runs again when a Lean file it builds changes, and Lean's
whole message on a rejected `Module.lean`. The public names, the rule API diff and the flow follow.

docs/architecture/slices/28-verification.md   <- rulings; Facts.lean, package.rs, lean.rs and compile.rs names;
                                                 Code.lean as namespace_decl lines; checked-rules; the flow
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 12, 2026
Problem: the note said no public function turns a String into a Namespace, but Rule.breaks is public, and unsafeCast,
an axiom cast or an elaborator naming the private constructor made one too. It also showed Code as one namespace_decl
per namespace, which mago-sharp php#171 replaced with one command.

Solution: a ruling records that the runner refuses a rule reaching Sharp.Namespace.mk, Sharp.Rule.breaks, an unsafe
constant, implemented_by or extern, sorry, or a non-standard axiom, as one broken-rule issue on every file the rule's
Module.lean judges. The public names, the API diff and the flow show the walk and the single namespace_decl command.

docs/architecture/slices/28-verification.md   <- Rulings: the kernel-checked ruling; Public names: Runner.lean,
                                                 rules.rs, runner.rs, package.rs, Code.lean; the namespace_decl
                                                 diff; Rule.breaks is refused; the flow's runner step
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 12, 2026
Problem: the note said the walk stops at Lean's, the runtime library's and Code's modules, and said nothing of which
PSR-4 folders link into the package. mago-sharp php#171 round 4 found the two disagreed: a Code\Evil\ folder linked and
its Lean files were trusted.

Solution: a ruling records the one list of roots Lean and Mago own (Init, Lean, Std, Lake, Code, Sharp), which the
runner trusts and no PSR-4 folder links, and the true message a Lean file in such a folder gets. The public names gain
ownedRoots, OWNED_ROOTS and Unbuilt.

docs/architecture/slices/28-verification.md   <- Rulings: the kernel-checked ruling's walk, the owned-roots ruling;
                                                 Public names: Runner.lean, rules.rs, package.rs
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
…ames

feat: a structure rule names a namespace by its full name, and a misspelled one is Lean's unknown identifier
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
Problem

This branch makes CI's clippy lint test targets. Master's php#171 added
`an_answer_with_an_unknown_refusal_is_an_error` with four `unwrap()` calls and
`the_runner_trusts_the_roots_lean_and_mago_own` with an `expect()`, so
`cargo clippy --all-targets -D warnings` failed after the merge.

Solution

The runner test returns `Result<(), PayloadError>` and uses `?`, as the
library tests do, and compares the decoded error as an `Option`. The package
test compares the parsed roots as an `Option`, with the old `expect` text as
the assert's message.

crates/sharp-lean/src/
├── runner.rs     an_answer_with_an_unknown_refusal_is_an_error uses ?
└── package.rs    the_runner_trusts_the_roots_lean_and_mago_own compares an Option
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
…rule names

Problem: php#166 (Map methods and section 12 key rules) and php#171 (structure rule
names) merged into master, so php#170 conflicted and its CI did not run. Two
files conflicted, and master changed what a type that names no type gives
a value.

Solution: both sides kept, one shape each.

- report_undefined_types, master's loop over a type a declaration writes,
  calls this branch's report_undefined_type, which the `on` clause check
  also calls. master's known_type_or_error stays.
- statement/mod.rs keeps this branch's analyze_emit, is_event and
  is_event_class beside master's report_keys_sharing_entries, and both
  imports.
- known_type_or_error now gives a value of a type that names no type the
  error type, where it was a reference. analyze_emit skips the error type
  in place of a reference, so `emit missing;` for a parameter
  `Missing missing` adds no "`emit` takes an event, and `` is not one."
  beside the error where the type is written. No reference reaches `emit`
  any more.

crates/analyzer/src/statement/
  function_like/mod.rs   report_undefined_types calls report_undefined_type
  mod.rs                 both sides' functions; emit skips the error type
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
Master brings braces always, case-sensitive keywords, constructors and
file-level statements (php#173), `?.` on a List index (php#176), and the Map
key checks for groupBy and associateBy (php#166), with php#170 and php#171. The
generics slice keeps its type arguments, statics, class values and
argument checks on top. 21 files conflicted, and every one keeps both
sides.

Parse type hints, locals and events with both sides' rules:
- The `.sharp` lexer keeps a keyword only in exact lowercase, so `List`,
  `Class` and `Function` lex as names. The slice's keyword-kind arms
  for them are dead and are gone. A name followed by `<` starts a
  generic hint, and a name followed by `(` starts a function hint
- A statement may start with `const`, a name or `(`, beside master's
  `emit`. A local declaration uses master's uppercase-name test
- The parse errors keep both NamedConstructorTypeParametersInSharp and
  MiscasedKeywordInSharp
- A method's type parameters live in the arena. With master's `on`
  clause, `Method` grew past clippy's large_enum_variant limit for
  ClassLikeMember, and a local's hint already lives in the arena

Check Map keys once, with the slice's class-value rule:
- A key type is a Map key by the slice's `is_map_key`, so a class value
  keys no Map. Master's groupBy and associateBy paths, its mixed
  backed-enum checks and its read-back of keys stay as master wrote them
- `get_backing_key_type`, `get_sole_backed_enum` and
  `ComparisonResult::for_dialect` take the dialect, as the slice changed
  them, at each of master's new call sites
- A groupBy or associateBy key a class value fills is refused with
  template-constraint-violation, master's code for every key position
- The bridge reads a key back through `Types::backed_enum`, and master's
  duplicate `Lowering::backed_enum` is gone

Keep master's other rules beside the slice's:
- A typed local checks its type arguments, then reports master's
  miscased keyword, then an unknown type
- A static write through a class value with type arguments goes to the
  slice's per-type-argument static, and any other write takes master's
  path
- The checker keeps its type parameter, `on` clause and get-only
  interface property rules in one message each, and drops the stale
  "a type parameter as a catch type is not supported yet"
- The name walker keeps master's `walk_in_on` and the slice's deletion
  of `walk_in_inheritance`
- A `.sharp` call into a plain PHP template bound, `Pick.pair(1, "a")`,
  is refused once by template-constraint-violation, as the slice reports
  every PHP# argument outside a bound

crates/
├── syntax/
│   ├── src/cst/cst/class_like/method.rs        type parameters in the arena
│   ├── src/error.rs                            both sides' parse errors
│   ├── src/parser/internal/
│   │   ├── class_like/method.rs                allocates a method's type parameters
│   │   ├── event.rs                            both sides' event forms
│   │   ├── local_declaration.rs                master's uppercase-name test
│   │   ├── statement.rs                        `emit`, `const`, a name or `(`
│   │   └── type_hint.rs                        a name then `<` or `(` starts a hint
│   └── tests/sharp.rs                          reads the arena type parameters
├── hir/src/lower/error/mod.rs                  lowers both parse errors
├── names/src/
│   ├── binding.rs                              passes a method's type parameters on
│   └── internal/walker.rs                      `walk_in_on`, and type parameters
├── semantics/
│   ├── src/internal/checker/sharp.rs           one message per member rule
│   └── tests/sharp.rs                          both sides' checker tests
├── analyzer/
│   ├── src/expression/
│   │   ├── assignment/array_assignment.rs      master's per-entry check by dialect
│   │   ├── call/method_call.rs                 static writes through a class value
│   │   └── instantiation.rs                    both sides' imports
│   ├── src/invocation/
│   │   ├── analyzer.rs                         both sides' argument checks
│   │   └── return_type_fetcher.rs              master's groupBy path, the slice's key test
│   ├── src/resolver/property.rs                both sides' imports
│   ├── src/statement/
│   │   ├── function_like/mod.rs                `is_map_key` with master's null reason
│   │   ├── mod.rs                              typed locals, Map keys and `emit`
│   │   └── return.rs                           both sides' imports
│   ├── src/utils/expression/array.rs           backing key type by dialect
│   └── tests/sharp.rs                          one issue per bound and key
├── orchestrator/src/service/incremental_analysis/compile.rs   both sides' tests
└── sharp-bridge/src/lower.rs                   key read-back through Types
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.

4 participants