Peter Kokot [Wed, 24 Oct 2018 15:06:21 +0000 (17:06 +0200)]
Remove ext/json parser files generated by bison
The parser files for ext/json are generated by bison from the *.y file.
Parser files in Zend and sapi/phpdbg already follow such approach of
these files being ignored from tracking in the Git repository and they
are shipped via the release packages later on. This way the end users
still don't need to have bison dependency installed to install PHP.
The genfiles script was refactored to generate the ext/json parser and
lexer files.
Peter Kokot [Fri, 19 Oct 2018 23:05:00 +0000 (01:05 +0200)]
Fix run-tests.php for running phpdbg and certain test sections
Certain sections, such as --EXTENSIONS--, --SKIPIF--, and --CLEAN--
require to be executed using only PHP CLI or PHP CGI SAPIs and cannot be
processed with the phpdbg.
Peter Kokot [Thu, 18 Oct 2018 06:56:38 +0000 (08:56 +0200)]
Normalize .gitignore
Changes:
- Added introductory paragraph to explain the file for newcomers and
where to ignore local editor configurations as a common practice
when using Git.
- Patterns organized into several main context sections for a better
overview of the php-src directory structure and which files get
generated where.
- Added comments describing reasons for ignoring particular file(s).
- Patterns normalized according to Git ignore blob patterns. Absolute
paths are different than relative paths and similar fixes.
- Folders patterns have appended ending slash for readability to
distinguish them from files.
Removed ignore patterns:
- Removed `sapi/phpdbg/build` pattern since it doesn't seem to be
relevant anymore in the php-src repository.
- The `acconfig.h` pattern removed in favor of the more recent Autoconf
versions.
- Removed patterns for `.FBCIndex` `.FBCLockFolder` folders. These were
generated on old Mac OS systems [1] using the Sherlock [2] software
and can be today ignored using a global gitignore file if needed.
Newer macOS systems don't generate these anymore.
- Removed `php_version.h` pattern since the `main/php_version.h` file is
tracked by Git.
- Removed `*.mk` pattern since few *.mk files are tracked by Git and new
ones aren't generated during build process.
- Removed `**/tests/**/*.txt` pattern. This has been refactored via 595a395cb911a4ef54cbaf11cd0056d38316c87c and current tests also clean
the generated `*.txt` files as soon as they are executed. Since there
are several `*.txt` files in the repository tracked by Git already and
renaming them would be counter productive so the pattern is now removed.
In case there will be a need to adjust it, we can rename the generated
`*.txt` into something else instead (ideally into `*.tmp`) to not
conflict with already tracked `*.txt` files in tests.
- Removed `ext/*/scan_makefile_in.awk` and `scan_makefile_in.awk` patterns
since these are already included in the `/ext/*/build/` pattern.
- Removed the `/ext/*/libs.mk` pattern since these auxilary Makefiles
have been used in previous build system and made obsolete via the commit 9d9d39a0de3bec962c343051011f5a2ed7d7b242.
- Removed pattern for configuration header `ext/pdo_sqlite/sqlite3.h` since
it is not generated anymore in the current code.
- Removed `main/streams/build-defs.h` pattern since this file is not
generated.
- Removed `test.php3` pattern. These don't seem to be present in the current
PHP source code nor used since PHP 3.
- Removed `/ext/oci8/tests/*.vglog` pattern since the tests don't seem to
produce these files.
- Removed pattern for Visual Studio's `*.ncb` files. Since the Visual
Studio 2010 they are no longer used.
- Removed `ext/sqlite3/tests/phpsql*` pattern. It was part of the `ext/sqlite/tests`.
- Removed `shlibtool` pattern since the shlibtool file is not generated
anymore. It was once part of the libtool usage and customized naming
used in the previous build system in Makefiles. Such naming was later
removed and only libtool was used.
- Removed `meta_ccld` pattern since it is no longer relevant via a5b55416f4bf48e475b30bb86b120c83efccca53
- Pattern `meta_cc` has been removed via e5176fe60a9ffbe211ee016acdcddb18118e4487.
- Pattern `dynlib.m4` removed since the file is no longer generated via 9d9d39a0de3bec962c343051011f5a2ed7d7b242
- Pattern `debug.log` removed since the Autoconf Macro PHP_DEBUG_MACRO
is not called anymore and this file not generated anymore.
- Pattern `results.txt` removed. It was once part of the logging results
of test files by Netware and previous Windows builds.
- Removed `_libs` pattern in favor of only `.libs`. These directories
were once generated by Automake and Libtool on systems that didn't
support the dot folder `.libs` (MS-DOS).
- Removed `*.opt` pattern since it was used by Visual Studio 6. Later
versions of Visual Studio don't use these anymore.
- Removed `*.plg` pattern. It was build log generated by Visual Studio 6.
- Removed `core` pattern since it was probably related to commit fd7153b0f3047e6a96344dc3b4ca2632d5acc898 and is today not used.
- Removed ˙*.˙, ˙diff`, and ˙*.tgz` patterns since they don't seem to be
generated in the current code on the first glance. In case these will be
one day required to ignore again, they can be simply added back again.
- Removed Emacs specific interlock files pattern `.#*`. The number of
editors and IDEs specific files is very big. Emacs editors also produce
some other files such as `#*#` for autosave feature, which were previously
not ignored. To fully and properly support all additional patterns these
could be added to .gitignore files. A much more sustainable and better
practice is to use a global gitignore file on the local system or the
`.git/info/exclude` per repository basis for these in particular.
Added patterns:
- Added new pattern for `*.obj` standard object files in the Windows
section. These are generated by Visual Studio.
- Added `/ext/*/run-tests.php` patterns for extensions.
- Reversed patterns for particular tracked `/win32/build/Makefile`, `config.h`
files and `.patch` files.
- Added patterns for generated dtrace files `/ext/oci8/oci8_dtrace_gen.h`
Other changes:
- All `conftest*` patterns merged into a single one.
- Pattern `*.mem` made more specific where the memory check files get
generated by `run-tests.php -m`, i.e. `**/tests/**/*.mem`.
- Fixed `/Zend/zend_dtrace_gen.h.bak` `hbak` typo.
Peter Kokot [Sat, 20 Oct 2018 20:06:04 +0000 (22:06 +0200)]
Remove phpdbg parser files generated by bison
The parser files for phpdbg are generated by bison from the *.y file.
Parser files in Zend already follows such approach of these files being
ignored from tracking in the Git repository and they are shipped via
the release packages. This way the end user still don't need to have
bison dependency installed to install PHP.
The genfiles script was refactored to generate the phpdbg parser and lexer
files.
Empty comment in phpdbg parser y template file has been changed to the
YACC compliant /* empty */ instead of custom one.
Since we allow ext/xmlrpc to be built against a system libxmlrpc(-epi),
we must not `efree` memory which has been allocated via `malloc`. To
distinguish bundled and system libxmlrpc(-epi) we introduce the macro
`HAVE_XMLRPC_BUNDLED` (analogous to how it is done by ext/gd). We
deliberately keep the ugly `#ifdef`s, instead of tucking them away in
an `XMLRPC_FREE()` macro, to not forget that it is a bad idea to fork
and bundle a library, but to also allow building against an unpatched
system lib.
Peter Kokot [Sat, 6 Oct 2018 06:43:50 +0000 (08:43 +0200)]
Fix .gitattributes
The `crlf` Git attribute has been long deprecated and made obsolete. A
replacement for using `-crlf` is `-text`. That way Git doesn't do
newlines normalization on any system.
Since the phpt files don't need specific line endings in any files
except for some special CR characters in some, this can be also removed
and line normalization can happen on all phpt files. The run-tests.php
file converts the CRLF to LF before running the test.
This patch also sets a `diff` attributes for all *.phpt files. It
helps showing diffs for some phpt files with special characters such
as ASCII control characters which makes Git recognize them as binary and
stops showing commit diffs otherwise
Some additional short info about used Git attributes has been also added
as comments for easier understanding.
Peter Kokot [Fri, 19 Oct 2018 19:33:58 +0000 (21:33 +0200)]
Rename two *.php files in tests folders
Current run-tests.php script produces the `*.php` files from the
*.phpt. So all *.php files in tests folders are ignored by Git.
To avoid confusion and to for bettere consistency this patch renames
two remaining tests/*/*.php files to *.inc and *.phar as current
practice in *.phpt files.
- The `ext/curl/tests/resonder/get.php` to .inc extension
- The `ext/phar/tests/files/pear2coverage.phar.php` to .phar extension
Peter Kokot [Fri, 19 Oct 2018 08:00:16 +0000 (10:00 +0200)]
Remove mkdep.awk
The `mkdep.awk` file was part of the previous *nix build system and was
used to create a .deps file with a list of dependencies that could be
processed by Automake further on.
Additionally, the *.slo files were processed by this file. The *.slo
files also used to be generated by older libtool so today, these don't
get generated anymore.
Peter Kokot [Thu, 18 Oct 2018 22:02:09 +0000 (00:02 +0200)]
Fix #77035: The phpize and ./configure create redundant .deps file
The `.deps` file(s) was once used by Automake and created to write
dependencies to it. The file creation has been removed via the commit 779c11af21cf8a627b8f2f2edef9e9073c76ed94.
The phpize and ./configure script create a redundant .deps file in a
PECL extension directory which might cause confusions why is it used.
Today it is no longer relevant so this redundant artefact can be
removed in the phpize configure script.
Peter Kokot [Thu, 18 Oct 2018 11:43:34 +0000 (13:43 +0200)]
Remove outdated PEAR artefacts
The `pear/scripts`, `pear/php-config`, `pear/phpize`, and
`pear/run-tests` used to be part of the PEAR installation. Now, the
pear installation PHAR file is directly downloaded from pear.php.net
instead.
Peter Kokot [Wed, 17 Oct 2018 04:06:50 +0000 (06:06 +0200)]
Remove stamp-h
The stamp-* files can be used as helpers for Makefiles to not redo
certain targets again. The stamp-h are mentioned in the Autoconf docs [1]
to help generate the config.h file.
This patch also removes two occurrences of `main/stamp-h1` and
`main/streams/stamp-h1` rules in the .gitignore file since they are not
generated with the current build systems anymore. The `stamp-h$am_indx` files
were once generated using aclocal and automake.
Peter Kokot [Sun, 7 Oct 2018 02:31:59 +0000 (04:31 +0200)]
Move all testing docs to qa.php.net
The qa.php.net currently includes nice collection of information about
tests and how to run them. Instead of maintaining two locations of this
information, this patch removes the README.TESTING from the php-src
repo. Patch for qa.php.net has been sent separately to that repo.
This is especially noteworthy since `tidy_get_relase()` returns
'unknown' when built against libtidyp, which might break some code
which relies on `tidy_get_release()` to return a date formatted as
`yyyy/mm/dd`.
Fix #77027: tidy::getOptDoc() not available on Windows
We define the `HAVE_TIDYOPTGETDOC` macro unconditionally, since the
Windows PHP SDK ships libtidy 2009/04/06 or newer for a long time.
We do not add a regression test, since 021.phpt already tests
`tidy_get_opt_doc`, but has previously been skipped due to
unavailability of the function.
Nikita Popov [Wed, 17 Oct 2018 10:47:45 +0000 (12:47 +0200)]
Remove the "auto" encoding
"auto" is only meaningful in functions which accept an encoding
*list* and support encoding detection. These functions have
explicit checks for "auto". It cannot be used as a standalone
encoding in any meaningful capacity, so I'm dropping it entirely.
Nikita Popov [Wed, 17 Oct 2018 10:37:52 +0000 (12:37 +0200)]
Fixed bug #77025
Implements 8bit conversions equivalently to iso-8859-1 conversions.
This seems quite dubious to me, but seems to match the previous
behavior.
It might make more sense to map the characters into a private area
instead, so that the 8bit encoding is treated as binary data with
no case conversions (including no case conversions in the ascii
range).
Peter Kokot [Tue, 16 Oct 2018 20:33:04 +0000 (22:33 +0200)]
Remove unused variable makefile_am_files
The `makefile_am_files` was part of the previous build system where
automake was used to build Makefiles. Since 9d9d39a0de3bec962c343051011f5a2ed7d7b242
this is not used anymore and can be removed.
Add support for getting SKIP_TAGSTART and SKIP_WHITE options
When `XML_OPTION_SKIP_TAGSTART` and `XML_OPTION_SKIP_WHITE` had been
introduced[1], it had been overlooked to also support them for
`xml_parser_get_option()`. We catch up on that.