Skip to content

Commit

Permalink
#2341 - Change to full class with namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Jan 23, 2022
1 parent 7ba67e1 commit dfae418
Show file tree
Hide file tree
Showing 16 changed files with 447 additions and 39 deletions.
6 changes: 5 additions & 1 deletion Library/ArgInfoDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ private function renderPhalconCompatible(): bool
$found = false;
$methodName = $this->functionLike->getName();

foreach ($this->functionLike->getClassDefinition()->getImplementedInterfaces() as $implementedInterface) {
if ($extendsClass !== null) {
$implementedInterfaces = array_merge($implementedInterfaces, [$extendsClass]);
}

foreach ($implementedInterfaces as $implementedInterface) {
if (isset($compatibilityClasses[$implementedInterface][$methodName])) {
$found = true;
foreach ($compatibilityClasses[$implementedInterface][$methodName] as $condition => $args) {
Expand Down
2 changes: 1 addition & 1 deletion config/phalcon-compatibility-headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
],
],

'Noop' => [
'Phalcon\Session\Adapter\Noop' => [
'gc' => [
'#if PHP_VERSION_ID >= 80000' => [
'ZEND_BEGIN_ARG_INFO_EX(__ce__, 0, 0, 1)',
Expand Down
1 change: 1 addition & 0 deletions ext/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if test "$PHP_STUB" = "yes"; then
stub/ooimpl/zbeginning.zep.c
stub/properties/publicproperties.zep.c
stub/arithmetic.zep.c
stub/arrayaccessarr.zep.c
stub/arrayaccessobj.zep.c
stub/arrayaccesstest.zep.c
stub/arrayiterator.zep.c
Expand Down
2 changes: 1 addition & 1 deletion ext/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (PHP_STUB != "no") {
}

ADD_SOURCES(configure_module_dirname + "/stub/invokes", "abstractprotected.zep.c abstractinvoker.zep.c abstractinvokercomplex.zep.c invokeprotected.zep.c invokeprotectedcomplex.zep.c", "stub");
ADD_SOURCES(configure_module_dirname + "/stub", "testinterface.zep.c scallparent.zep.c constantsparent.zep.c methodinterface.zep.c arithmetic.zep.c arrayaccessobj.zep.c arrayaccesstest.zep.c arrayiterator.zep.c arrayiteratortest.zep.c arraymanipulation.zep.c arrayobject.zep.c arraysearch.zep.c assign.zep.c bitwise.zep.c branchprediction.zep.c cast.zep.c cblock.zep.c chars.zep.c closures.zep.c compare.zep.c concat.zep.c constants.zep.c constantsinterface.zep.c constantsinterfacea.zep.c constantsinterfaceb.zep.c declaretest.zep.c diinterface.zep.c echoes.zep.c emptytest.zep.c evaltest.zep.c exception.zep.c exceptions.zep.c exists.zep.c exitdie.zep.c extendedinterface.zep.c factorial.zep.c fannkuch.zep.c fasta.zep.c fcall.zep.c fetchtest.zep.c fibonnaci.zep.c flow.zep.c fortytwo.zep.c functional.zep.c functionexists.zep.c functions.zep.c geometry.zep.c globals.zep.c instance.zep.c instanceoff.zep.c internalclasses.zep.c internalinterfaces.zep.c invoke.zep.c issettest.zep.c issue1134.zep.c issue1404.zep.c issue1521.zep.c issue663.zep.c issue887.zep.c issue893.zep.c issue914.zep.c issues.zep.c json.zep.c logical.zep.c mcall.zep.c mcallchained.zep.c mcalldynamic.zep.c mcallinternal.zep.c methodabstract.zep.c methodargs.zep.c nativearray.zep.c oo.zep.c operator.zep.c pdostatement.zep.c pregmatch.zep.c quantum.zep.c range.zep.c references.zep.c reflection.zep.c regexdna.zep.c requires.zep.c resourcetest.zep.c returns.zep.c router.zep.c scall.zep.c scalldynamic.zep.c scallexternal.zep.c scalllateconstruct.zep.c scope.zep.c sort.zep.c spectralnorm.zep.c spl.zep.c spropertyaccess.zep.c statements.zep.c strings.zep.c stubs.zep.c ternary.zep.c trytest.zep.c typeinstances.zep.c typeoff.zep.c unknownclass.zep.c unsettest.zep.c usetest.zep.c vars.zep.c 0__closure.zep.c 1__closure.zep.c 2__closure.zep.c 3__closure.zep.c 4__closure.zep.c 5__closure.zep.c 6__closure.zep.c 7__closure.zep.c 8__closure.zep.c 9__closure.zep.c 10__closure.zep.c 11__closure.zep.c 12__closure.zep.c 13__closure.zep.c", "stub");
ADD_SOURCES(configure_module_dirname + "/stub", "testinterface.zep.c scallparent.zep.c constantsparent.zep.c methodinterface.zep.c arithmetic.zep.c arrayaccessarr.zep.c arrayaccessobj.zep.c arrayaccesstest.zep.c arrayiterator.zep.c arrayiteratortest.zep.c arraymanipulation.zep.c arrayobject.zep.c arraysearch.zep.c assign.zep.c bitwise.zep.c branchprediction.zep.c cast.zep.c cblock.zep.c chars.zep.c closures.zep.c compare.zep.c concat.zep.c constants.zep.c constantsinterface.zep.c constantsinterfacea.zep.c constantsinterfaceb.zep.c declaretest.zep.c diinterface.zep.c echoes.zep.c emptytest.zep.c evaltest.zep.c exception.zep.c exceptions.zep.c exists.zep.c exitdie.zep.c extendedinterface.zep.c factorial.zep.c fannkuch.zep.c fasta.zep.c fcall.zep.c fetchtest.zep.c fibonnaci.zep.c flow.zep.c fortytwo.zep.c functional.zep.c functionexists.zep.c functions.zep.c geometry.zep.c globals.zep.c instance.zep.c instanceoff.zep.c internalclasses.zep.c internalinterfaces.zep.c invoke.zep.c issettest.zep.c issue1134.zep.c issue1404.zep.c issue1521.zep.c issue663.zep.c issue887.zep.c issue893.zep.c issue914.zep.c issues.zep.c json.zep.c logical.zep.c mcall.zep.c mcallchained.zep.c mcalldynamic.zep.c mcallinternal.zep.c methodabstract.zep.c methodargs.zep.c nativearray.zep.c oo.zep.c operator.zep.c pdostatement.zep.c pregmatch.zep.c quantum.zep.c range.zep.c references.zep.c reflection.zep.c regexdna.zep.c requires.zep.c resourcetest.zep.c returns.zep.c router.zep.c scall.zep.c scalldynamic.zep.c scallexternal.zep.c scalllateconstruct.zep.c scope.zep.c sort.zep.c spectralnorm.zep.c spl.zep.c spropertyaccess.zep.c statements.zep.c strings.zep.c stubs.zep.c ternary.zep.c trytest.zep.c typeinstances.zep.c typeoff.zep.c unknownclass.zep.c unsettest.zep.c usetest.zep.c vars.zep.c 0__closure.zep.c 1__closure.zep.c 2__closure.zep.c 3__closure.zep.c 4__closure.zep.c 5__closure.zep.c 6__closure.zep.c 7__closure.zep.c 8__closure.zep.c 9__closure.zep.c 10__closure.zep.c 11__closure.zep.c 12__closure.zep.c 13__closure.zep.c", "stub");
ADD_SOURCES(configure_module_dirname + "/stub/oo/extend", "exception.zep.c", "stub");
ADD_SOURCES(configure_module_dirname + "/stub/issue2165", "issueextendinterface.zep.c issueinterface.zep.c issue.zep.c", "stub");
ADD_SOURCES(configure_module_dirname + "/stub/oo/extend/db", "exception.zep.c", "stub");
Expand Down
2 changes: 1 addition & 1 deletion ext/kernel/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void zephir_filemtime(zval *return_value, zval *path)
if (EXPECTED(Z_TYPE_P(path) == IS_STRING)) {
#if PHP_VERSION_ID >= 80100
zend_string *file = zend_string_init(Z_STRVAL_P(path), Z_STRLEN_P(path), 0);
php_stat(file, FS_MTIME, &return_value);
php_stat(file, FS_MTIME, return_value);
zval_ptr_dtor(file);
#else
php_stat(Z_STRVAL_P(path), (php_stat_len)(Z_STRLEN_P(path)), FS_MTIME, return_value);
Expand Down
4 changes: 3 additions & 1 deletion ext/stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ zend_class_entry *stub_7__closure_ce;
zend_class_entry *stub_8__closure_ce;
zend_class_entry *stub_9__closure_ce;
zend_class_entry *stub_arithmetic_ce;
zend_class_entry *stub_arrayaccessarr_ce;
zend_class_entry *stub_arrayaccessobj_ce;
zend_class_entry *stub_arrayaccesstest_ce;
zend_class_entry *stub_arrayiterator_ce;
Expand Down Expand Up @@ -292,6 +293,7 @@ static PHP_MINIT_FUNCTION(stub)
ZEPHIR_INIT(Stub_Oo_Scopes_HasPrivateMethod);
ZEPHIR_INIT(Stub_Properties_PublicProperties);
ZEPHIR_INIT(Stub_Arithmetic);
ZEPHIR_INIT(Stub_ArrayAccessArr);
ZEPHIR_INIT(Stub_ArrayAccessObj);
ZEPHIR_INIT(Stub_ArrayAccessTest);
ZEPHIR_INIT(Stub_ArrayIterator);
Expand Down Expand Up @@ -580,7 +582,7 @@ static PHP_MINFO_FUNCTION(stub)
php_info_print_table_start();
php_info_print_table_header(2, "Test Extension support", "Value");
php_info_print_table_row(2, "Lifecycle hooks", "PHP provides several lifecycle events, which extensions can use to perform common initialization or shutdown tasks.");
php_info_print_table_row(2, "Static Analysis", "Test extensions' compiler provides static analysis of the compiled code.");
php_info_print_table_row(2, "Static Analysis", "Test extensions' compiler provides static analysis of the compiled code.");
php_info_print_table_end();
php_info_print_table_start();
php_info_print_table_header(2, "Test variable", "Value");
Expand Down
1 change: 1 addition & 0 deletions ext/stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "stub/ooimpl/zbeginning.zep.h"
#include "stub/properties/publicproperties.zep.h"
#include "stub/arithmetic.zep.h"
#include "stub/arrayaccessarr.zep.h"
#include "stub/arrayaccessobj.zep.h"
#include "stub/arrayaccesstest.zep.h"
#include "stub/arrayiterator.zep.h"
Expand Down
79 changes: 53 additions & 26 deletions ext/stub/arrayaccessobj.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ext/stub/arrayaccesstest.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ext/stub/integration/psr/extendexternal.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions ext/stub/mcall.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions ext/stub/oo/oonativeimplements.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 20 additions & 2 deletions ext/stub/oo/oonativeimplements.zep.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dfae418

Please sign in to comment.