Girgias
Repos
39
Followers
154
Following
42

The PHP Interpreter

C
1
0

French translation of the PHP documentation

0
0

Events

pull request closed
translation error in version changes.

"accepted" was translated as a past participle ("acceptée") although it is a simple past (=> imparfait: "acceptait").

Also, a simple "Avant" instead of "Antérieur à" makes this sentence more understandable.

Created at 9 hours ago

Update reference/strings/functions/number-format.xml

Co-authored-by: Anna Filina afilina@gmail.com

Created at 9 hours ago
closed issue
array_fill documentation, when start_index is negative.

On array_fill() manual page https://www.php.net/manual/en/function.array-fill.php, at the start_index parameter description it reads

If start_index is negative, the first index of the returned array will be start_index and the following indices will start from zero (see example).

Example given

$b = array_fill(-2, 4, 'pear');
print_r($b);

Output from the documentation

Array
(
    [-2] => pear
    [0] => pear
    [1] => pear
    [2] => pear
)

Running the same example on PHP 8.1.7 (cli) (built: Jun 9 2022 14:21:07) (NTS), I get different indexing.

Array
(
    [-2] => pear
    [-1] => pear
    [0] => pear
    [1] => pear
)

Am I missing something here, or should the documentation get updated?

Created at 9 hours ago
issue comment
array_fill documentation, when start_index is negative.

Fixed by ce882c196dce81bf6bd4d94af4fa4110ddc49ef4

Created at 9 hours ago
pull request closed
translations(array_fill): php8

the result in php8 is different from the result in php7 for the negative keys

Created at 9 hours ago
issue comment
translations(array_fill): php8

Fixed by 6223e27294c7b058f0db54f07050997158803d9f

Created at 9 hours ago
push

Sync existing Reflection docs with EN

Sync SessionHandler

This is just EN typos and generated from stub changes

Created at 9 hours ago
push

Sync Mysqli INI settings with EN

Created at 9 hours ago
push

Sync SQLite3 INI setting docs

Apply a109454179d046c2083baffbbc09898fb01b1853

Although some of the English probably needs fixing

Created at 9 hours ago
push

Apply f92fc517966b7efcc3e7f140ec5a117184d0422d

Apply ce882c196dce81bf6bd4d94af4fa4110ddc49ef4

Created at 10 hours ago
push

Apply cacd59edbdbc120c6e7cc4d0726829915d64383c

Apply f92fc517966b7efcc3e7f140ec5a117184d0422d

Created at 10 hours ago
push

Apply revision 19e8122137a1d42ed60f17fe2c0c2b69b0b2d16b

And drive-by fixes

Created at 10 hours ago
issue comment
Fix GH-8329 Print true/false instead of bool in error and debug messages

https://3v4l.org/jvaCB true type is now native type, can this PR be merged?

True might be a native type but it remains a literal type i.e. a value within a type. So I'm sceptical of the improvement.

Created at 1 day ago
delete branch
Girgias delete branch dnf-iterable-object-gh9556
Created at 1 day ago
pull request closed
Fix UPGRADING and #9556 "iterable" alias "array|Traversable" breaks PHP 8.1 code

This kinda address #9556 by making it a documentation issue, and adds tests to verify the behaviour.

Created at 1 day ago
closed issue
"iterable" alias "array|Traversable" breaks PHP 8.1 code

Description

I just recognized a problem in a project when testing it with PHP 8.2RC2 (API Platform 3.0).

There is an interface that contains a method with the return type definition "object|iterable|null". In PHP 8.2 "iterable" becomes "array|Traversable" and so the return type definition results in "object|array|Traversable|null", which now contains the redundant "Traversable" type (although "object" is already contained) and leads to a fatal error.

Eample...

The following code:

<?php
class Foo
{
    public function bar(): object|iterable|null
    {
        return null;
    }
}

echo 'baz';

Resulted in this output:

Fatal error: Type Traversable|object|array|null contains both object and a class type, which is redundant in [...

But I expected this output instead:

baz

As a workaround one could use "object|array" instead of "object|iterable", but best would be if the change in PHP 8.2 handles this special case, to avoid this break... Otherwise this should be listed in "Backward Incompatible Changes" instead of "Other Changes".

PHP Version

PHP 8.2.0RC2

Operating System

No response

Created at 1 day ago

Move object/class redundancy check into union type handling

As such a redundancy can only happen for union types

Fix GH-9556 "iterable" alias "array|Traversable" breaks PHP 8.1 code

Closes GH-9558

Created at 1 day ago

Fix UPGRADING by adding DBA constants

Move object/class redundancy check into union type handling

As such a redundancy can only happen for union types

Fix GH-9556 "iterable" alias "array|Traversable" breaks PHP 8.1 code

Closes GH-9558

Created at 1 day ago
issue comment
add docs for `ini_parse_quantity` function

Just landed 0f8b9eb49bd644f07175e9191d2cc146737446ad to add support for 0b and 0o prefixes, wondering if it makes sense to add examples with prefixes in the docs? (hex has worked since forever)

Created at 1 day ago
issue comment
Actually fix GH-9583

That actually looks correct. While I don't like to refer to mod_user_names in session.c, that ship has obviously sailed long ago. However, the implementation of session_regenerate_id() might also need that hack:

https://github.com/php/php-src/blob/8e1cef43414c41fec033596072290c855c79029c/ext/session/session.c#L2250-L2270

Otherwise we would always create the session ID twice for mod_user.

I'm very confused by the whole check here... at it seems to be kinda weirdly implemented? I tried to fix it let me know what you think.

Created at 1 day ago

Improve CS in FPM Tester Response

Do not check X-Powered-By header in FPM tester if expose_php off

Closes GH-9508

fix php_init_crypt_r/php_shutdown_crypt_r signatures warning.

add missing CVEs

Actually fix GH-9583

The issue is that PS(mod)->s_validate_sid is always defined for user modules, thus we need to check that the actual callable is set Add another regression test to ensure current working behaviour is not broken (which was by the previous incorrect fix)

Also amend session_regenerate_id()

Created at 1 day ago
delete branch
Girgias delete branch ini-prefixed-quantities
Created at 1 day ago

Add support for binary and octal number prefixes for INI settings

Closes GH-9560

Created at 1 day ago