Commit graph

43 commits

Author SHA1 Message Date
Peter Kokot
bd77462c7c
Update sqlite3 and pdo_sqlite preprocessor macros help texts (#15291) 2024-08-09 14:51:05 +02:00
Peter Kokot
f66feaec0f
Sync HAVE_<extension> help texts (#15167)
This syncs all help texts of extension preprocessor macros to the same
style "Define to 1 if the PHP extension '<ext>' is available.".
[skip ci]
2024-08-02 01:41:47 +02:00
Peter Kokot
1ceadaed52
Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144)
This adds Autoconf quote characters to all PHP_NEW_EXTENSION arguments
and syncs the CS across the php-src Autotools build system.
2024-07-29 00:14:59 +02:00
Peter Kokot
2b97c84d4c
Autotools: Quote PHP_CHECK_LIBRARY arguments (#15136)
This syncs the quotes across the PHP_CHECK_LIBRARY macro arguments.
2024-07-28 18:39:14 +02:00
Peter Kokot
bee84c0468
Autotools: Quote PHP_SUBST arguments in extensions (#14748) 2024-07-02 06:56:18 +02:00
Peter Kokot
cba3891d53
Join SQLite library setup M4 macros to PHP_SETUP_SQLITE (#14372)
Macro can simplify managing minimum version of SQLite library on less
places.
2024-05-30 18:16:30 +02:00
Radosław Kowalewski
3a4d0d360d
Require sqlite >= 3.7.7 for URI in DSN (#7347)
SQLITE_OPEN_URI introduced in #6610 is available from sqlite version 3.7.7.
2021-08-11 10:31:28 +02:00
David Carlier
1b21b56074 sqlite3 linkage issue on some systems/package combination fix.
Checking the version is not enough, the function might be available
but the symbols are not present still.

Closes GH-5993
2020-08-21 15:45:51 +02:00
Nikita Popov
1dcdcd79ba Fixed bug #79056 2020-01-03 11:08:48 +01:00
Peter Kokot
6de97402b5 Remove unused sqlite symbols
- HAVE_SQLITE3_KEY is no longer used in php-src
- SQLITE_ENABLE_COLUMN_METADATA is no longer used in php-src

Closes GH-4443
2019-07-20 00:27:10 +02:00
Peter Kokot
e39296d10b Remove unsed zts check for sqlite3
This check was relevant with bundled sqlite library. Removed via
6083a387a8

Closes GH-4403
2019-07-14 21:06:15 +02:00
Remi Collet
24206783c3 fix typo breaking shared build 2019-05-21 14:25:55 +02:00
Peter Kokot
47350ba6e7 Use pkg-config for sqlite3 and pdo_sqlite
Following other migrations to pkg-config usage for the *nix build system
this migrates also sqlite3 and pdo_sqlite extensions.
2019-05-14 03:14:33 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Christoph M. Becker
3815a03117 Remove superfluous variable
This has been missed when libsqlite3 has been unbundled.
2019-01-21 15:32:34 +01:00
Christoph M. Becker
a757ebb5b5 Require SQLite ≥ 3.7.4 for ext/sqlite3
`SQLite3::readOnly()` uses `sqlite3_stmt_readonly()` which is only
available as of libsqlite 3.7.4.  For older SQLite3 versions we return
always `false`, which can be confusing.  Instead of sticking with this
behavior, or even undefining the method for old SQLite3 versions, we
lift the requirements to SQLite 3.7.4 (released on 2010-12-08),
according to a respective discussion[1].

Since pdo_sqlite doesn't use `sqlite3_stmt_readonly()`, we stick with
the minimum requirement of SQLite 3.5.0.

[1] <https://github.com/php/php-src/pull/3614>
2018-11-29 15:10:39 +01:00
Christoph M. Becker
87392eff1a Require SQLite ≥ 3.5.0 for ext/sqlite3 and ext/pdo_sqlite
It is possible to pass flags when opening an SQLite database.  For
Sqlite < 3.5.0 these are ignored, since `sqlite3_open` doesn't support
flags.  Neither a warning or notice is raised in this case, nor is this
behavior documented in the PHP manual.  Instead of fixing it either
way, we lift the requirement to SQLite 3.5.0 (released on 2007-09-04)
instead of the former SQLite 3.3.9 (released on 2007-01-04).
2018-10-13 12:15:58 +02:00
Christoph M. Becker
6083a387a8 Unbundle libsqlite3
Since there is no need to patch libsqlite3 for our purposes, and since
libsqlite3 ≥ 3.3.9 (which is our current requirement) is widely
available on distros, there is no reason anymore to bundle the library.

Besides removing the bundled libsqlite, and adapting the configuration
respectively, we also fix the use of the SQLITE_ENABLE_COLUMN_METADATA
compile time constant to detect whether sqlite3_column_table_name() is
available by a working feature detection (otherwise bug_42589.phpt
would fail).  We also skip bug73068.phpt for libsqlite 3.11.0 to
3.14.1 which have a bug (<https://sqlite.org/src/info/ef360601>).

We also completely drop support for the obscure pdo_sqlite_external
extension (which could have been enabled on Windows only by passing
`--pdo-sqlite-external` to configure), since it is not needed anymore.

Furthermore, we remove references to the bundled libsqlite from
Makefile.gcov, CONTRIBUTING.md and README.REDIST.BINS.
2018-10-06 12:36:55 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Morva Kristóf
ed0a58d0ae Enable JSON1 for bundled libsqlite 2017-11-22 12:00:13 +01:00
Remi Collet
3239f6d679 move AC_DEFINE in the right position (in bundled lib conditon) 2017-08-31 07:55:45 +02:00
Remi Collet
159e5c1048 use AC_DEFINE + win32 2017-08-04 13:21:28 +02:00
Remi Collet
666cb6c802 fix build with old system libsqlite (sqlite3_errstr may be missing) 2017-08-02 14:01:56 +02:00
Anatol Belski
ef55a4b5b3 Enable FTS4 and FTS5 for bundled libsqlite
FTS3 is already enabled by default, and the other FTS versions
seems just to have been missed. Given that, the other FTS plugins
look like a low impact so worth a try. The current bundled libsqlite
versions in 7.x are proven stable already and support FTS5.
2016-11-08 02:26:43 +01:00
Anatol Belski
aac7b1db7c converted ext/sqlite and ext/pdo_mysql to use static tsrmls cache 2014-10-16 18:50:19 +02:00
Christopher Jones
c6d977dd39 Fix long-standing visual pain point: the misalignment of './configure help' text.
Whitespace changes and a couple of grammar fixes.
2013-08-06 11:06:09 -07:00
Remi Collet
67e67c254d Fixed Bug #63149 Feature missing with system SQLite
In pdo_sqlite, getColumnMeta should return the table name.
With bundled SQLite library, -DSQLITE_ENABLE_COLUMN_METADATA=1 (other_flags)
enable the feature in SQLite (function sqlite3_column_table_name).
With system SQLite library, this fix detects if sqlite3_column_table_name is
available and add SQLITE_ENABLE_COLUMN_METADATA macro to get the same behavior.

Test already exists: ext/pdo_sqlite/tests/bug_42589.phpt
2012-11-24 17:47:51 +01:00
Johannes Schlüter
f3e6597500 Install SQLite3 header 2010-06-23 15:11:02 +00:00
Scott MacVicar
b64b74fe9f MFH Fix bug #47826 - Building with system sqlite3 can miss a symbol. 2009-03-29 21:34:13 +00:00
Scott MacVicar
bc486b4c7e MFH Fix bug #47678 - Allow loadExtension to be disabled in SQLite3 2009-03-17 02:45:12 +00:00
Scott MacVicar
efaba65cf5 MFH Add table key to getColumnMeta() with SQLite 2009-01-13 02:50:54 +00:00
Scott MacVicar
cb4d76b505 Fix bug #47055 - When intl is shared dont enable icu support in SQLite3 2009-01-10 01:46:55 +00:00
Scott MacVicar
178e0c726e MFH Enable ICU support within bundled SQLite if intl is enabled but not shared. 2008-12-22 16:43:21 +00:00
Hannes Magnusson
a31dc0ccd0 Which means do not include.., thanks Jani :) 2008-07-31 22:30:25 +00:00
Hannes Magnusson
f2d88b3efa Say without, since its enabled by default 2008-07-31 22:28:51 +00:00
Scott MacVicar
9abe173e8c Enable by default and fix compile error 2008-07-31 22:24:05 +00:00
Jani Taskinen
96ea7313a6 MFH: build fixes, cs, ws, etc. 2008-07-26 23:42:53 +00:00
Jani Taskinen
d448b6b70d - No tabs. 2008-07-26 22:14:52 +00:00
Jani Taskinen
fd3b5bcc5a - Fix description 2008-07-25 12:04:54 +00:00
Jani Taskinen
213fd450fa - No tabs, fix indent in configure --help 2008-07-25 12:01:47 +00:00
Scott MacVicar
d584ed4a01 SQLite3 extension, still has 2 failing tests that will be sorted tomorrow. Will merge to head tomorrow as well. 2008-07-25 02:44:59 +00:00