Skip to content

merge #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 107 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
a07c1f5
Fix infinite loop on string offset during by-ref list assign
nikic Sep 2, 2020
605ee9c
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 2, 2020
aedc7b0
Merge branch 'PHP-7.4'
nikic Sep 2, 2020
8b6b2bd
Fix by-ref list assign LIST_W+MAKE_REF separation
nikic Sep 2, 2020
c98e174
Minimal JIT support for JMP_NULL
dstogov Sep 2, 2020
2e9e706
Fix throwing of yield from related exceptions into generator
nikic Sep 2, 2020
c6fd37c
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 2, 2020
ddc2a2d
Merge branch 'PHP-7.4'
nikic Sep 2, 2020
3e800e9
Move custom type checks to ZPP
kocsismate Aug 24, 2020
225cd9d
Improved JIT for VERIFY_RETURN_TYPE
dstogov Sep 2, 2020
4d97ab2
Added missing helper
dstogov Sep 2, 2020
cb284f6
Fix typo in test description
mvorisek Sep 2, 2020
c3299d7
X86: Fast CRC32 computation using PCLMULQDQ instruction
frankdjx Sep 2, 2020
0d157cf
Micro-optimization
dstogov Sep 2, 2020
54dbd3e
Fix binary-safety of parse_url
nikic Sep 2, 2020
81811db
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 2, 2020
0bc2657
Merge branch 'PHP-7.4'
nikic Sep 2, 2020
05cd31e
Extend function blacklist in execute fuzzer
nikic Sep 2, 2020
3d1e7d3
hash: Fix warning in the bench script
weltling Sep 2, 2020
1d84a58
libmagic: Move the allocation on the stack
weltling Sep 2, 2020
8c31001
libmagic: Constify arg
weltling Sep 2, 2020
f3f5719
JIT for FE_FETCH_R
dstogov Sep 2, 2020
f2b4077
Revert "libmagic: Move the allocation on the stack"
weltling Sep 2, 2020
8b37c1e
Change Attribute Syntax from @@ to #[]
beberlei Aug 15, 2020
842be67
Update NEWS, UPGRADING
beberlei Sep 2, 2020
73dcfb6
Fix typos in mbstring tests
alexdowad Jul 30, 2020
e64c386
libmagic: Update patch
weltling Sep 2, 2020
508f828
Reorder switch cases for consistency between zend_jit() and zend_jit_…
dstogov Sep 2, 2020
91edb90
JIT for FETCH_CONSTANT
dstogov Sep 2, 2020
573ad18
Handle memory limit error during string reallocation correctly
nikic Sep 3, 2020
6b521a9
Fixed support for deprecated constants (Zend/tests/const_deprecation.…
dstogov Sep 3, 2020
0fc65ed
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 3, 2020
daf222c
Merge branch 'PHP-7.4'
nikic Sep 3, 2020
3b853c9
Fixed bug #80045
nikic Sep 3, 2020
c70a938
Skip test if A: drive exists
cmb69 Sep 3, 2020
658ad4d
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Sep 3, 2020
7769ae1
Merge branch 'PHP-7.4' into master
cmb69 Sep 3, 2020
67e9b3b
JIT for FE_FETCH_R
dstogov Sep 3, 2020
04e77d2
Fixed bug #80046
nikic Sep 3, 2020
ce74ff2
Merge branch 'PHP-7.4'
nikic Sep 3, 2020
8516434
Fixed bug #80046
nikic Sep 3, 2020
397a692
Merge branch 'PHP-7.4'
nikic Sep 3, 2020
c4016ec
Remove CG(filenames_table)
nikic Sep 3, 2020
7620ea1
Don't intern compiled_filename
nikic Sep 3, 2020
9464576
Fix leaks in sapi tests
nikic Sep 3, 2020
7b3ac29
Fix mismatch between macro and struct definition
Girgias Sep 3, 2020
430b3ac
Refactor parts of SPL Dir/SplFileObject
Girgias Sep 3, 2020
94fd52d
Add Z_PARAM_ITERABLE and co
morrisonlevi Sep 3, 2020
42a6ff4
Try to fix windows build
nikic Sep 3, 2020
5fdabeb
Fix Windows build
cmb69 Sep 3, 2020
1848ccd
Fix #80048: Bug #69100 has not been fixed for Windows
cmb69 Sep 3, 2020
2f4a2a9
Merge branch 'PHP-7.3' into PHP-7.4
cmb69 Sep 3, 2020
c7cba01
Merge branch 'PHP-7.4' into master
cmb69 Sep 3, 2020
409aa20
Refactor mbfl_convert.c
alexdowad Jul 15, 2020
dcd6c60
Remove unneeded function mbfl_filt_conv_common_dtor
alexdowad Jul 16, 2020
a2b40ee
Remove unneeded function mbfl_filt_ident_common_dtor
alexdowad Jul 16, 2020
f699d65
Add comment to mbfilter_tl_jisx0201_jisx0208.h
alexdowad Jul 17, 2020
ec60991
Remove unused 'from' field from mbfl_buffer_converter struct
alexdowad Jul 28, 2020
a81061d
Use symbolic constants in Japanese kana conversion code (not magic nu…
alexdowad Aug 7, 2020
9dc9534
If we don't know the return address, just escape to VM, instead of ad…
dstogov Sep 3, 2020
46a49be
Fixed bug #80049
nikic Sep 3, 2020
2dabc4c
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 3, 2020
cd1c36f
Merge branch 'PHP-7.4'
nikic Sep 3, 2020
4a438b4
Warning to Error promotion in ext/standard
Girgias Sep 3, 2020
61c299f
Error promotions in SPL
Girgias Sep 3, 2020
c58c4be
Reorder DynAsm macros (no other changes)
dstogov Sep 3, 2020
531d17f
Load EX(opline) in one instuction if possible
dstogov Sep 3, 2020
3f4a500
Cleanup macro/function names
dstogov Sep 3, 2020
56a9eed
Avoid unnecessary IP initiliaization on trace linking
dstogov Sep 4, 2020
e8d36ce
Avoid duplicate octal warning during heredoc scan ahead
nikic Sep 4, 2020
e0a14bc
Merge branch 'PHP-7.3' into PHP-7.4
nikic Sep 4, 2020
2f95af9
Disable InfiniteIterator class while fuzzing
nikic Sep 4, 2020
fc8cfb1
Merge branch 'PHP-7.4'
nikic Sep 4, 2020
67e1f23
Make gethostbyname() test more liberal
nikic Sep 4, 2020
c0d6b05
Update travis to bionic
nikic Sep 4, 2020
2e21818
Release call trampolines in zpp fcc
nikic Sep 4, 2020
7805b97
Extract common flock code
Girgias Sep 3, 2020
e50cb32
Add the Z_PARAM_ARRAY_HT_OR_NULL and Z_PARAM_OBJ macros
kocsismate Sep 4, 2020
e50449b
Use the canonical order of types in array|string ZPP error messages
kocsismate Sep 4, 2020
8107a1d
Use ZPP instead of custom type checks
kocsismate Sep 4, 2020
36cdbd0
Promote warnings to exceptions in ext/ldap
kocsismate Sep 3, 2020
2ee2335
Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not popu…
derickr Sep 4, 2020
edc8dec
Reenable s390x on travis
nikic Sep 4, 2020
d57f9e5
Handle null encoding in mb_http_input()
nikic Sep 4, 2020
4ebc04c
Fix azure i386 build
nikic Sep 5, 2020
aa613f8
Merge branch 'PHP-7.4'
nikic Sep 5, 2020
9439ca5
Improve handling of `#[` in `php -a`
TysonAndre Sep 5, 2020
1fc961e
Improve handling of `#[` attributes in `php -a`
TysonAndre Sep 6, 2020
ace876c
Fix incorrect/unused macro
TysonAndre Sep 6, 2020
623bf96
Throw on invalid mb_http_input() type
nikic Sep 7, 2020
e0c9467
Add phpunit to community project tests
nikic Sep 4, 2020
8e05c44
Opcache JIT, code simplification for Haiku.
devnexen Sep 5, 2020
d1ac7e3
Remove some unnecessary HAVE_EXTNAME guards
nikic Sep 7, 2020
85b5dc4
Private/public split curl header
nikic Sep 7, 2020
f5dbebd
Accept zend_string instead of zval in zend_compile_string
nikic Sep 7, 2020
9475bcb
Avoid large eval inputs in fuzzer
nikic Sep 7, 2020
f4b2497
Allocate temporary PCRE match data using ZMM
nikic Sep 7, 2020
032f862
Drop support for crypt() without explicit salt
nikic Sep 7, 2020
2a334f1
Don't leave behind temporary file in bug70362.phpt
nikic Sep 7, 2020
a249980
Merge branch 'PHP-7.4'
nikic Sep 7, 2020
2c96780
Fix UNKNOWN default values in ext/standard
kocsismate Aug 20, 2020
628db3f
Fix UNKNOWN default values in various extensions
kocsismate Sep 4, 2020
174dadf
Don't allow dynamic properties on generators
nikic Sep 7, 2020
fd0b399
Promote warnings to exceptions in ext/intl
kocsismate Aug 10, 2020
4a2ae84
Add "const". Move constant strings to read-only memory.
dstogov Sep 7, 2020
af0ba0b
Reduce input size limit in execute fuzzer
nikic Sep 7, 2020
8a49310
Adjust assignment line number for match
iluuu1994 Sep 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
git:
quiet: true

dist: xenial
dist: bionic
language: c
os: linux
addons:
Expand Down Expand Up @@ -74,8 +74,9 @@ jobs:
arch: amd64
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 ARM64=1
arch: arm64
#- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 S390X=1
# arch: s390x
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 S390X=1
arch: s390x
if: type = cron

before_script:
- ccache --version
Expand Down
9 changes: 9 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.0.0rc1

- Core:
. Implement #[Attr] Attribute syntax as per final vote in RFC
https://wiki.php.net/rfc/shorter_attribute_syntax_change
. Fixed bug #80045 (memleak after two set_exception_handler calls with
__call). (Nikita)

- Date:
. Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not populate
time). (Derick)

03 Sep 2020, PHP 8.0.0beta3

Expand Down
12 changes: 8 additions & 4 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ PHP 8.0 UPGRADE NOTES
Additionally, care should be taken that error messages are not displayed in
production environments, which can result in information leaks. Please
ensure that display_errors=Off is used in conjunction with error logging.
. Adding more than one @ operator to an expression is no longer supported,
since this syntax is now used for attributes (previously extra @ operators
had no effect).
RFC: https://wiki.php.net/rfc/shorter_attribute_syntax
. Following the hash comment operator # immediately with an opening bracket
is not supported as a comment anymore since this syntax is now used for
attributes.
RFC: https://wiki.php.net/rfc/shorter_attribute_syntax_change
. Inheritance errors due to incompatible method signatures (LSP violations)
will now always generate a fatal error. Previously a warning was generated
in some cases.
Expand Down Expand Up @@ -576,6 +576,9 @@ PHP 8.0 UPGRADE NOTES

$ctx = stream_context_create(['http' => ['protocol_version' => '1.0']]);
echo file_get_contents('http://example.org', false, $ctx);
. Calling crypt() without an explicit salt is no longer supported. If you
would like to produce a strong hash with an auto-generated salt, use
password_hash() instead.

- Sysvmsg:
. msg_get_queue() will now return an SysvMessageQueue object rather than a
Expand Down Expand Up @@ -687,6 +690,7 @@ PHP 8.0 UPGRADE NOTES
RFC: https://wiki.php.net/rfc/attributes_v2
RFC: https://wiki.php.net/rfc/attribute_amendments
RFC: https://wiki.php.net/rfc/shorter_attribute_syntax
RFC: https://wiki.php.net/rfc/shorter_attribute_syntax_change
. Added support for constructor property promotion (declaring properties in
the constructor signature).
RFC: https://wiki.php.net/rfc/constructor_promotion
Expand Down
2 changes: 1 addition & 1 deletion UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES
- zend_multibyte_set_filter()
- zend_lex_tstring()
- _zend_module_entry module_startup_func, module_shutdown_func,
request_startup_func, and request_shutdown_func function pointers
request_startup_func, request_shutdown_func, and post_deactivate_func function pointers
- (*zend_encoding_list_parser) typedef
- (*zend_encoding_internal_encoding_setter) typedef
- zend_multibyte_set_functions()
Expand Down
26 changes: 13 additions & 13 deletions Zend/tests/attributes/001_placement.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ Attributes can be placed on all supported elements.
--FILE--
<?php

@@A1(1)
#[A1(1)]
class Foo
{
@@A1(2)
#[A1(2)]
public const FOO = 'foo';
@@A1(3)

#[A1(3)]
public $x;
@@A1(4)
public function foo(@@A1(5) $a, @@A1(6) $b) { }

#[A1(4)]
public function foo(#[A1(5)] $a, #[A1(6)] $b) { }
}

$object = new @@A1(7) class () { };
$object = new #[A1(7)] class () { };

@@A1(8)
#[A1(8)]
function f1() { }

$f2 = @@A1(9) function () { };
$f2 = #[A1(9)] function () { };

$f3 = @@A1(10) fn () => 1;
$f3 = #[A1(10)] fn () => 1;

$ref = new \ReflectionClass(Foo::class);

Expand All @@ -43,11 +43,11 @@ $sources = [
foreach ($sources as $r) {
$attr = $r->getAttributes();
var_dump(get_class($r), count($attr));

foreach ($attr as $a) {
var_dump($a->getName(), $a->getArguments());
}

echo "\n";
}

Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/attributes/002_rfcexample.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Attributes: Example from Attributes RFC
namespace My\Attributes {
use Attribute;

@@Attribute
#[Attribute]
class SingleArgument {
public $argumentValue;

Expand All @@ -19,7 +19,7 @@ namespace My\Attributes {
namespace {
use My\Attributes\SingleArgument;

@@SingleArgument("Hello World")
#[SingleArgument("Hello World")]
class Foo {
}

Expand Down
12 changes: 6 additions & 6 deletions Zend/tests/attributes/003_ast_nodes.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Attributes can deal with AST nodes.

define('V1', strtoupper(php_sapi_name()));

@@A1([V1 => V1])
#[A1([V1 => V1])]
class C1
{
public const BAR = 'bar';
Expand All @@ -20,7 +20,7 @@ var_dump(count($args), $args[0][V1] === V1);

echo "\n";

@@A1(V1, 1 + 2, C1::class)
#[A1(V1, 1 + 2, C1::class)]
class C2 { }

$ref = new \ReflectionClass(C2::class);
Expand All @@ -35,7 +35,7 @@ var_dump($args[2] === C1::class);

echo "\n";

@@A1(self::FOO, C1::BAR)
#[A1(self::FOO, C1::BAR)]
class C3
{
private const FOO = 'foo';
Expand All @@ -52,20 +52,20 @@ var_dump($args[1] === C1::BAR);

echo "\n";

@@ExampleWithShift(4 >> 1)
#[ExampleWithShift(4 >> 1)]
class C4 {}
$ref = new \ReflectionClass(C4::class);
var_dump($ref->getAttributes()[0]->getArguments());

echo "\n";

@@Attribute
#[Attribute]
class C5
{
public function __construct() { }
}

$ref = new \ReflectionFunction(@@C5(MissingClass::SOME_CONST) function () { });
$ref = new \ReflectionFunction(#[C5(MissingClass::SOME_CONST)] function () { });
$attr = $ref->getAttributes();
var_dump(count($attr));

Expand Down
10 changes: 5 additions & 5 deletions Zend/tests/attributes/004_name_resolution.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ namespace Foo {
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Attributes;

@@Entity("imported class")
@@ORM\Entity("imported namespace")
@@\Doctrine\ORM\Mapping\Entity("absolute from namespace")
@@\Entity("import absolute from global")
@@Attributes\Table()
#[Entity("imported class")]
#[ORM\Entity("imported namespace")]
#[\Doctrine\ORM\Mapping\Entity("absolute from namespace")]
#[\Entity("import absolute from global")]
#[Attributes\Table()]
function foo() {
}
}
Expand Down
20 changes: 10 additions & 10 deletions Zend/tests/attributes/005_objects.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Attributes can be converted into objects.
--FILE--
<?php

@@Attribute(Attribute::TARGET_FUNCTION)
#[Attribute(Attribute::TARGET_FUNCTION)]
class A1
{
public string $name;
Expand All @@ -16,7 +16,7 @@ class A1
}
}

$ref = new \ReflectionFunction(@@A1('test') function () { });
$ref = new \ReflectionFunction(#[A1('test')] function () { });

foreach ($ref->getAttributes() as $attr) {
$obj = $attr->newInstance();
Expand All @@ -26,7 +26,7 @@ foreach ($ref->getAttributes() as $attr) {

echo "\n";

$ref = new \ReflectionFunction(@@A1 function () { });
$ref = new \ReflectionFunction(#[A1] function () { });

try {
$ref->getAttributes()[0]->newInstance();
Expand All @@ -36,7 +36,7 @@ try {

echo "\n";

$ref = new \ReflectionFunction(@@A1([]) function () { });
$ref = new \ReflectionFunction(#[A1([])] function () { });

try {
$ref->getAttributes()[0]->newInstance();
Expand All @@ -46,7 +46,7 @@ try {

echo "\n";

$ref = new \ReflectionFunction(@@A2 function () { });
$ref = new \ReflectionFunction(#[A2] function () { });

try {
$ref->getAttributes()[0]->newInstance();
Expand All @@ -56,13 +56,13 @@ try {

echo "\n";

@@Attribute
#[Attribute]
class A3
{
private function __construct() { }
}

$ref = new \ReflectionFunction(@@A3 function () { });
$ref = new \ReflectionFunction(#[A3] function () { });

try {
$ref->getAttributes()[0]->newInstance();
Expand All @@ -72,10 +72,10 @@ try {

echo "\n";

@@Attribute
#[Attribute]
class A4 { }

$ref = new \ReflectionFunction(@@A4(1) function () { });
$ref = new \ReflectionFunction(#[A4(1)] function () { });

try {
$ref->getAttributes()[0]->newInstance();
Expand All @@ -87,7 +87,7 @@ echo "\n";

class A5 { }

$ref = new \ReflectionFunction(@@A5 function () { });
$ref = new \ReflectionFunction(#[A5] function () { });

try {
$ref->getAttributes()[0]->newInstance();
Expand Down
16 changes: 8 additions & 8 deletions Zend/tests/attributes/006_filter.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ Attributes can be filtered by name and base type.
--FILE--
<?php

$ref = new \ReflectionFunction(@@A1 @@A2 function () { });
$ref = new \ReflectionFunction(#[A1] #[A2] function () { });
$attr = $ref->getAttributes(A3::class);

var_dump(count($attr));

$ref = new \ReflectionFunction(@@A1 @@A2 function () { });
$ref = new \ReflectionFunction(#[A1] #[A2] function () { });
$attr = $ref->getAttributes(A2::class);

var_dump(count($attr), $attr[0]->getName());

$ref = new \ReflectionFunction(@@A1 @@A2 @@A2 function () { });
$ref = new \ReflectionFunction(#[A1] #[A2] #[A2] function () { });
$attr = $ref->getAttributes(A2::class);

var_dump(count($attr), $attr[0]->getName(), $attr[1]->getName());
Expand All @@ -25,27 +25,27 @@ class A1 implements Base { }
class A2 implements Base { }
class A3 extends A2 { }

$ref = new \ReflectionFunction(@@A1 @@A2 @@A5 function () { });
$ref = new \ReflectionFunction(#[A1] #[A2] #[A5] function () { });
$attr = $ref->getAttributes(\stdClass::class, \ReflectionAttribute::IS_INSTANCEOF);
var_dump(count($attr));
print_r(array_map(fn ($a) => $a->getName(), $attr));

$ref = new \ReflectionFunction(@@A1 @@A2 function () { });
$ref = new \ReflectionFunction(#[A1] #[A2] function () { });
$attr = $ref->getAttributes(A1::class, \ReflectionAttribute::IS_INSTANCEOF);
var_dump(count($attr));
print_r(array_map(fn ($a) => $a->getName(), $attr));

$ref = new \ReflectionFunction(@@A1 @@A2 function () { });
$ref = new \ReflectionFunction(#[A1] #[A2] function () { });
$attr = $ref->getAttributes(Base::class, \ReflectionAttribute::IS_INSTANCEOF);
var_dump(count($attr));
print_r(array_map(fn ($a) => $a->getName(), $attr));

$ref = new \ReflectionFunction(@@A1 @@A2 @@A3 function () { });
$ref = new \ReflectionFunction(#[A1] #[A2] #[A3] function () { });
$attr = $ref->getAttributes(A2::class, \ReflectionAttribute::IS_INSTANCEOF);
var_dump(count($attr));
print_r(array_map(fn ($a) => $a->getName(), $attr));

$ref = new \ReflectionFunction(@@A1 @@A2 @@A3 function () { });
$ref = new \ReflectionFunction(#[A1] #[A2] #[A3] function () { });
$attr = $ref->getAttributes(Base::class, \ReflectionAttribute::IS_INSTANCEOF);
var_dump(count($attr));
print_r(array_map(fn ($a) => $a->getName(), $attr));
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/attributes/008_wrong_attribution.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Attributes: Prevent Attribute on non classes
--FILE--
<?php

@@Attribute
#[Attribute]
function foo() {}
?>
--EXPECTF--
Expand Down
Loading