Skip to content

Don't install headers headers which are not supposed to be published #16070

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
254 changes: 245 additions & 9 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@
"ABI break":
- changed-files:
- any-glob-to-any-file:
- 'TSRM/*.h'
- 'Zend/*.h'
- 'TSRM/TSRM.h'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have these lists generated by a small php script which can be added into https://github.com/php/php-src/blob/master/.github/actions/verify-generated-files/action.yml to assert all lists are always in sync and up-to-date?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #15682 (comment); Windows only; I wouldn't know how to do this for other systems (i.e. via autoconf).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this PR proposes to hardcode the files, we do not need to generate them on each local build, but we need to assert that the hardcoded lists are up-to-date - for that purpose, there is https://github.com/php/php-src/blob/master/.github/actions/verify-generated-files/action.yml CI and we need a simple PHP script which will discover all *.h files.

In that script, published files can be hardcoded and the rest assumed as non-published. The script can then locate the lists in all files where the hardcoded lists are to be present and replace the lists will up-to-date lists.

The CI job would then check if the files in git are matching the generated outputs the same as we do for stubs and other generated files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does not propose the list; that already happened via #15682. I agree that auto-generating and checking the list would be good, but I still have not been able to figure out how to do that on non Windows systems; and doing it only on Windows might miss headers from Windows incompatible stuff.

- 'TSRM/tsrm_win32.h'
- 'Zend/Optimizer/zend_call_graph.h'
- 'Zend/Optimizer/zend_cfg.h'
- 'Zend/Optimizer/zend_dfg.h'
Expand All @@ -404,6 +404,90 @@
- 'Zend/Optimizer/zend_optimizer.h'
- 'Zend/Optimizer/zend_ssa.h'
- 'Zend/Optimizer/zend_worklist.h'
- 'Zend/zend.h'
- 'Zend/zend_API.h'
- 'Zend/zend_alloc.h'
- 'Zend/zend_alloc_sizes.h'
- 'Zend/zend_arena.h'
- 'Zend/zend_ast.h'
- 'Zend/zend_atomic.h'
- 'Zend/zend_attributes.h'
- 'Zend/zend_bitset.h'
- 'Zend/zend_build.h'
- 'Zend/zend_builtin_functions.h'
- 'Zend/zend_call_stack.h'
- 'Zend/zend_closures.h'
- 'Zend/zend_compile.h'
- 'Zend/zend_config.w32.h'
- 'Zend/zend_constants.h'
- 'Zend/zend_cpuinfo.h'
- 'Zend/zend_dtrace.h'
- 'Zend/zend_enum.h'
- 'Zend/zend_errors.h'
- 'Zend/zend_exceptions.h'
- 'Zend/zend_execute.h'
- 'Zend/zend_extensions.h'
- 'Zend/zend_fibers.h'
- 'Zend/zend_float.h'
- 'Zend/zend_frameless_function.h'
- 'Zend/zend_gc.h'
- 'Zend/zend_gdb.h'
- 'Zend/zend_generators.h'
- 'Zend/zend_globals.h'
- 'Zend/zend_globals_macros.h'
- 'Zend/zend_hash.h'
- 'Zend/zend_highlight.h'
- 'Zend/zend_hrtime.h'
- 'Zend/zend_inheritance.h'
- 'Zend/zend_ini.h'
- 'Zend/zend_ini_scanner.h'
- 'Zend/zend_interfaces.h'
- 'Zend/zend_iterators.h'
- 'Zend/zend_language_scanner.h'
- 'Zend/zend_lazy_objects.h'
- 'Zend/zend_list.h'
- 'Zend/zend_llist.h'
- 'Zend/zend_long.h'
- 'Zend/zend_map_ptr.h'
- 'Zend/zend_max_execution_timer.h'
- 'Zend/zend_mmap.h'
- 'Zend/zend_modules.h'
- 'Zend/zend_multibyte.h'
- 'Zend/zend_multiply.h'
- 'Zend/zend_object_handlers.h'
- 'Zend/zend_objects.h'
- 'Zend/zend_objects_API.h'
- 'Zend/zend_observer.h'
- 'Zend/zend_operators.h'
- 'Zend/zend_portability.h'
- 'Zend/zend_property_hooks.h'
- 'Zend/zend_ptr_stack.h'
- 'Zend/zend_range_check.h'
- 'Zend/zend_signal.h'
- 'Zend/zend_smart_str.h'
- 'Zend/zend_smart_str_public.h'
- 'Zend/zend_smart_string.h'
- 'Zend/zend_smart_string_public.h'
- 'Zend/zend_sort.h'
- 'Zend/zend_stack.h'
- 'Zend/zend_stream.h'
- 'Zend/zend_string.h'
- 'Zend/zend_strtod.h'
- 'Zend/zend_system_id.h'
- 'Zend/zend_type_info.h'
- 'Zend/zend_types.h'
- 'Zend/zend_variables.h'
- 'Zend/zend_verify_type_inference.h'
- 'Zend/zend_virtual_cwd.h'
- 'Zend/zend_vm.h'
- 'Zend/zend_vm_def.h'
- 'Zend/zend_vm_execute.h'
- 'Zend/zend_vm_handlers.h'
- 'Zend/zend_vm_opcodes.h'
- 'Zend/zend_vm_trace_handlers.h'
- 'Zend/zend_vm_trace_lines.h'
- 'Zend/zend_vm_trace_map.h'
- 'Zend/zend_weakrefs.h'
- 'ext/curl/php_curl.h'
- 'ext/date/lib/timelib.h'
- 'ext/date/lib/timelib_config.h'
Expand All @@ -413,7 +497,21 @@
- 'ext/dom/xml_common.h'
- 'ext/dom/xpath_callbacks.h'
- 'ext/filter/php_filter.h'
- 'ext/gd/libgd/*.h'
- 'ext/gd/libgd/bmp.h'
- 'ext/gd/libgd/gd.h'
- 'ext/gd/libgd/gd_errors.h'
- 'ext/gd/libgd/gd_intern.h'
- 'ext/gd/libgd/gd_io.h'
- 'ext/gd/libgd/gd_tga.h'
- 'ext/gd/libgd/gdcache.h'
- 'ext/gd/libgd/gdfontg.h'
- 'ext/gd/libgd/gdfontl.h'
- 'ext/gd/libgd/gdfontmb.h'
- 'ext/gd/libgd/gdfonts.h'
- 'ext/gd/libgd/gdfontt.h'
- 'ext/gd/libgd/gdhelpers.h'
- 'ext/gd/libgd/jisx0208.h'
- 'ext/gd/libgd/wbmp.h'
- 'ext/gd/php_gd.h'
- 'ext/gmp/php_gmp_int.h'
- 'ext/hash/php_hash.h'
Expand Down Expand Up @@ -457,8 +555,40 @@
- 'ext/mbstring/php_onig_compat.h'
- 'ext/mysqli/mysqli_mysqlnd.h'
- 'ext/mysqli/php_mysqli_structs.h'
- 'ext/mysqlnd/*.h'
- 'ext/pcre/pcre2lib/*.h'
- 'ext/mysqlnd/config-win.h'
- 'ext/mysqlnd/mysql_float_to_double.h'
- 'ext/mysqlnd/mysqlnd.h'
- 'ext/mysqlnd/mysqlnd_alloc.h'
- 'ext/mysqlnd/mysqlnd_auth.h'
- 'ext/mysqlnd/mysqlnd_block_alloc.h'
- 'ext/mysqlnd/mysqlnd_charset.h'
- 'ext/mysqlnd/mysqlnd_commands.h'
- 'ext/mysqlnd/mysqlnd_connection.h'
- 'ext/mysqlnd/mysqlnd_debug.h'
- 'ext/mysqlnd/mysqlnd_enum_n_def.h'
- 'ext/mysqlnd/mysqlnd_ext_plugin.h'
- 'ext/mysqlnd/mysqlnd_libmysql_compat.h'
- 'ext/mysqlnd/mysqlnd_plugin.h'
- 'ext/mysqlnd/mysqlnd_portability.h'
- 'ext/mysqlnd/mysqlnd_priv.h'
- 'ext/mysqlnd/mysqlnd_protocol_frame_codec.h'
- 'ext/mysqlnd/mysqlnd_ps.h'
- 'ext/mysqlnd/mysqlnd_read_buffer.h'
- 'ext/mysqlnd/mysqlnd_result.h'
- 'ext/mysqlnd/mysqlnd_result_meta.h'
- 'ext/mysqlnd/mysqlnd_reverse_api.h'
- 'ext/mysqlnd/mysqlnd_statistics.h'
- 'ext/mysqlnd/mysqlnd_structs.h'
- 'ext/mysqlnd/mysqlnd_vio.h'
- 'ext/mysqlnd/mysqlnd_wireprotocol.h'
- 'ext/mysqlnd/php_mysqlnd.h'
- 'ext/pcre/pcre2lib/config.h'
- 'ext/pcre/pcre2lib/pcre2.h'
- 'ext/pcre/pcre2lib/pcre2_internal.h'
- 'ext/pcre/pcre2lib/pcre2_intmodedep.h'
- 'ext/pcre/pcre2lib/pcre2_jit_neon_inc.h'
- 'ext/pcre/pcre2lib/pcre2_jit_simd_inc.h'
- 'ext/pcre/pcre2lib/pcre2_ucp.h'
- 'ext/pcre/php_pcre.h'
- 'ext/pdo/pdo_sql_parser.h'
- 'ext/pdo/php_pdo.h'
Expand Down Expand Up @@ -487,11 +617,117 @@
- 'ext/spl/spl_heap.h'
- 'ext/spl/spl_iterators.h'
- 'ext/spl/spl_observer.h'
- 'ext/standard/*.h'
- 'ext/standard/base64.h'
- 'ext/standard/basic_functions.h'
- 'ext/standard/crc32.h'
- 'ext/standard/crc32_x86.h'
- 'ext/standard/credits.h'
- 'ext/standard/credits_ext.h'
- 'ext/standard/credits_sapi.h'
- 'ext/standard/crypt_blowfish.h'
- 'ext/standard/crypt_freesec.h'
- 'ext/standard/css.h'
- 'ext/standard/datetime.h'
- 'ext/standard/dl.h'
- 'ext/standard/exec.h'
- 'ext/standard/file.h'
- 'ext/standard/flock_compat.h'
- 'ext/standard/fsock.h'
- 'ext/standard/head.h'
- 'ext/standard/html.h'
- 'ext/standard/html_tables.h'
- 'ext/standard/info.h'
- 'ext/standard/md5.h'
- 'ext/standard/pack.h'
- 'ext/standard/pageinfo.h'
- 'ext/standard/php_array.h'
- 'ext/standard/php_assert.h'
- 'ext/standard/php_browscap.h'
- 'ext/standard/php_crypt.h'
- 'ext/standard/php_crypt_r.h'
- 'ext/standard/php_dir.h'
- 'ext/standard/php_dns.h'
- 'ext/standard/php_ext_syslog.h'
- 'ext/standard/php_filestat.h'
- 'ext/standard/php_fopen_wrappers.h'
- 'ext/standard/php_http.h'
- 'ext/standard/php_image.h'
- 'ext/standard/php_incomplete_class.h'
- 'ext/standard/php_mail.h'
- 'ext/standard/php_math.h'
- 'ext/standard/php_math_round_mode.h'
- 'ext/standard/php_net.h'
- 'ext/standard/php_password.h'
- 'ext/standard/php_smart_string.h'
- 'ext/standard/php_smart_string_public.h'
- 'ext/standard/php_standard.h'
- 'ext/standard/php_string.h'
- 'ext/standard/php_uuencode.h'
- 'ext/standard/php_var.h'
- 'ext/standard/php_versioning.h'
- 'ext/standard/proc_open.h'
- 'ext/standard/quot_print.h'
- 'ext/standard/scanf.h'
- 'ext/standard/sha1.h'
- 'ext/standard/streamsfuncs.h'
- 'ext/standard/url.h'
- 'ext/standard/url_scanner_ex.h'
- 'ext/standard/winver.h'
- 'ext/xml/expat_compat.h'
- 'ext/xml/php_xml.h'
- 'main/*.h'
- 'main/streams/*.h'
- 'main/SAPI.h'
- 'main/fastcgi.h'
- 'main/fopen_wrappers.h'
- 'main/http_status_codes.h'
- 'main/php.h'
- 'main/php_compat.h'
- 'main/php_content_types.h'
- 'main/php_getopt.h'
- 'main/php_globals.h'
- 'main/php_ini.h'
- 'main/php_ini_builder.h'
- 'main/php_main.h'
- 'main/php_memory_streams.h'
- 'main/php_network.h'
- 'main/php_odbc_utils.h'
- 'main/php_open_temporary_file.h'
- 'main/php_output.h'
- 'main/php_reentrancy.h'
- 'main/php_scandir.h'
- 'main/php_streams.h'
- 'main/php_syslog.h'
- 'main/php_ticks.h'
- 'main/php_variables.h'
- 'main/php_version.h'
- 'main/rfc1867.h'
- 'main/snprintf.h'
- 'main/spprintf.h'
- 'main/streams/php_stream_context.h'
- 'main/streams/php_stream_filter_api.h'
- 'main/streams/php_stream_glob_wrapper.h'
- 'main/streams/php_stream_mmap.h'
- 'main/streams/php_stream_plain_wrapper.h'
- 'main/streams/php_stream_transport.h'
- 'main/streams/php_stream_userspace.h'
- 'sapi/cli/cli.h'
- 'sapi/embed/php_embed.h'
- 'win32/*.h'
- 'win32/codepage.h'
- 'win32/console.h'
- 'win32/fnmatch.h'
- 'win32/getrusage.h'
- 'win32/glob.h'
- 'win32/ioutil.h'
- 'win32/ipc.h'
- 'win32/nice.h'
- 'win32/param.h'
- 'win32/php_registry.h'
- 'win32/php_win32_globals.h'
- 'win32/readdir.h'
- 'win32/select.h'
- 'win32/sendmail.h'
- 'win32/signal.h'
- 'win32/sockets.h'
- 'win32/syslog.h'
- 'win32/time.h'
- 'win32/unistd.h'
- 'win32/winutil.h'
2 changes: 1 addition & 1 deletion Zend/zend_strtod_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/

/* internal header; not supposed to be installed; FIXME but unfortunately is */
/* internal header; not supposed to be installed */

#ifndef ZEND_STRTOD_INT_H
#define ZEND_STRTOD_INT_H
Expand Down
Loading
Loading