php / php/php-src

arginfo_zpp_mismatch.phpt and friends only tests statically built extensions on CI

Open
#15,392 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Category: Tests Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

There are a couple of tests (see below) which iterate over all declared classes, and instantiate them. However, these tests don't load any shared extensions on CI, so the respective classes are not tested. I don't think this is intentional, but rather an oversight (when we switched to loading shared extensions via dl()).

Test that there is no arginfo/zpp mismatch [.\Zend\tests\arginfo_zpp_mismatch.phpt]
Test that there is no arginfo/zpp mismatch in strict mode [.\Zend\tests\arginfo_zpp_mismatch_strict.phpt]
Try to instantiate all classes without arguments [.\Zend\tests\instantiate_all_classes.phpt]
Object free handler must call zend_weakrefs_notify [.\Zend\tests\weakrefs\notify.phpt]
PHP Version

PHP 8.1

Operating System

any

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading Zend/tests/arginfo_zpp_mismatch.phpt, Zend/tests/arginfo_zpp_mismatch_strict.phpt, Zend/tests/instantiate_all_classes.phpt, and Zend/tests/weakrefs/notify.phpt, along with the CI setup that loads extensions. Run these tests in the current CI configuration and verify that shared extensions are loaded and covered. Done means the listed tests exercise both statically built and shared extensions on CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
ci-cd, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.