Repository navigation
Conversation
This test was affected: ext/standard/tests/general_functions/phpcredits2.phpt see https://github.com/php/php-src/pull/132/files#diff-3 This makes constant PHP_CREDITS_FULLPAGE didn't functional anymore.
Contributor
|
Ah, my bad, my bad. Have you tested and made sure it embeds the credits properly in phpinfo()? |
Contributor
Author
|
Yes, it did embed correctly. and the test passed :) I was trying to contact you on irc but I can't login seems been banned because of share ip :( |
Contributor
|
Have incorporated into this PR: #156 |
Contributor
Author
|
cool then this one could be closed Reeze 在 2012年8月10日星期五,2:10,Andrew Faulds 写道:
|
|
Comment on behalf of laruence at php.net: included in PR 156 |
heyJordanParker
added a commit
to heyJordanParker/php-sharp
that referenced
this pull request
Oct 11, 2026
Problem: The note gave the computed-parameter and `lazy` errors as "A constructor parameter cannot be …". The parser and check_slice raise both on every PHP# parameter, method and lambda parameters included, so the text was false where it fired. The note also did not say that `lazy` stays a name before `(`, `)`, `,` or `=`. Solution: - The computed-parameter error reads "A parameter cannot be a computed property: a computed property has no incoming value to receive.", at the `=>`, team-lead's ruling on php#155's review. - The `lazy` error reads "A parameter cannot be `lazy`: …", as PR 1 builds it. A parameter with only `lazy` is no promoted property, and `(lazy) => lazy` keeps compiling. docs/architecture/slices/ └── 09-constructors.md <- the two parameter errors, under "`lazy`, computed properties and `static`"
heyJordanParker
added a commit
to heyJordanParker/php-sharp
that referenced
this pull request
Oct 13, 2026
Problem: - `(lazy) => lazy ? 1 : 0` and `(lazy, int fallback) => …` compiled on master and gave a parse error here: `lazy` before `)` or `,` was read as a modifier. - The computed-parameter error said "A constructor parameter" on every PHP# parameter, method and lambda parameters included. - `public int Report() => 1;` followed by the constructor `Report` was called a second constructor, beside the method's own error. - `lazy int extra` on a method parameter also got PHP's "Promoted properties are not allowed outside of constructors.", because any modifier counted as promotion. - Deleting the `is_sharp()` check, or widening the guard clause to `break`, `continue` or a loop body, failed no test. Solution: - parse_optional_modifier reads a word as a modifier only when the next token is not `(`, `)`, `,` or `=`, the rule parse_parameter uses. - The computed-parameter error reads "A parameter cannot be a computed property: a computed property has no incoming value to receive." - check_members records the main constructor's span and reports only a constructor after a constructor. A constructor after a method of its name is not reported again; the method keeps its own error. - is_promoted_property does not count `lazy`, which declares no member. - New test rows pin each case. crates/ ├── syntax/src/ │ ├── parser/internal/modifier.rs <- a word before `(`, `)`, `,` or `=` is a name │ ├── error.rs <- "A parameter cannot be a computed property" │ └── cst/cst/function_like/parameter.rs <- is_promoted_property skips `lazy` ├── semantics/src/internal/checker/class_like/mod.rs <- the main constructor's span decides a second one ├── syntax/tests/sharp.rs <- lambda parameters named `lazy`; a computed method parameter ├── semantics/tests/sharp.rs <- loop and `break`/`continue` rows; a method then a constructor; │ `lazy` on a method parameter is one error └── semantics/tests/duplicate_members.rs <- a PHP method defined twice keeps PHP's message
heyJordanParker
added a commit
to heyJordanParker/php-sharp
that referenced
this pull request
Oct 13, 2026
feat: accept the guard clause and name section 9's constructor refusals
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
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.
This test was affected: ext/standard/tests/general_functions/phpcredits2.phpt
https://github.com/php/php-src/pull/132/files#diff-3
This makes constant PHP_CREDITS_FULLPAGE didn't functional anymore.
see: http://php.net/phpcredits
Hi, @TazeTSchnitzel you might want to take a look at this :)