Skip to content

[RFC] Optional interfaces #17288

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

Closed
wants to merge 25 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4358a05
Add syntax for optional interfaces
tontonsb Dec 28, 2024
a0fe072
Remove resolved comments
tontonsb Dec 29, 2024
4ed9176
Move the `num_interfaces` mutation to a safer place
tontonsb Dec 29, 2024
eba9a20
Test optional interfaces
tontonsb Feb 9, 2025
1386ca2
Fix memory leak
tontonsb Feb 9, 2025
686d2e9
Add test for Stringable with optional interfaces
tontonsb Feb 9, 2025
b00e2f3
Simplify test
tontonsb Feb 9, 2025
99f0837
Make test line-trimming-resilient
tontonsb Feb 9, 2025
48ab59a
Test Optional interfaces on OPCache
tontonsb Feb 9, 2025
8a90459
Specify conflict on an OPCache test
tontonsb Feb 9, 2025
fd190aa
Generate test script
tontonsb Feb 9, 2025
44f1a63
Enable OPCache in the optional interface test
tontonsb Feb 9, 2025
77f5ebc
Fix permissions
tontonsb Feb 9, 2025
9efccd2
Update Zend/zend_compile.c
tontonsb Feb 14, 2025
a64d1e9
Clean up
tontonsb Feb 14, 2025
35a5491
Make const naming more precise
tontonsb Feb 14, 2025
c3efd97
Move efree back
tontonsb Feb 14, 2025
d216c35
Make name qualifying checks safe
tontonsb Feb 14, 2025
de36608
Fix mask
tontonsb Feb 14, 2025
74b524f
[skip ci] Fix spacing
iluuu1994 Feb 18, 2025
2f8405c
Fix ZEND_NAME_ for new class name in const expr
iluuu1994 Feb 18, 2025
62171fd
Fix leaking of interface_names when interface count goes to 0
iluuu1994 Feb 18, 2025
3e461b8
Fix shm modification
iluuu1994 Feb 18, 2025
821ec0f
Fix optional interface test on windows
tontonsb Feb 20, 2025
b7e513e
Rework optional interface opcache test
tontonsb Feb 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Generate test script
  • Loading branch information
tontonsb committed Feb 14, 2025
commit fd190aad50c1ab71e64d31034b3a17a11ec559c2
17 changes: 17 additions & 0 deletions ext/opcache/tests/optional_interfaces.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ server

$interfaceFile = __DIR__.'/optional_interfaces_interface.inc';

file_put_contents(__DIR__.'/optional_interfaces_script.php', <<<SCRIPT
<?php

@(include __DIR__.'/optional_interfaces_interface.inc');

if (interface_exists('OpcachedInterface'))
echo "OpcachedInterface is defined\n";
else
echo "OpcachedInterface is not defined\n";

include __DIR__.'/optional_interfaces_class.inc';

echo "OpcachedClass implements:".implode(', ', class_implements('OpcachedClass'))."\n\n";
SCRIPT);

include __DIR__.'/php_cli_server.inc';
php_cli_server_start('-d opcache.enable=1 -d opcache.enable_cli=1');

Expand All @@ -27,6 +42,8 @@ unlink($interfaceFile);

echo file_get_contents($uri);

unlink(__DIR__.'/optional_interfaces_script.php');

?>
--EXPECT--
OpcachedInterface is not defined
Expand Down