1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Commit Graph

630 Commits

Author SHA1 Message Date
Guillaume Outters
a9259c0496 Add Pdo\Pgsql::setNoticeCallback() (#14299)
This moves the new method from magically being added to the PDO class from the driver to just be available on the dedicated subclass. 

Drive-by fixes to NEWS and UPGRADING
2024-06-09 03:04:51 +01:00
Peter Kokot
df481ef941 Simplify PDO include paths (#14444)
PDO include paths can be simplified and synced as done in other
extensions: either the project root directory or the phpincludedir (for
the system installation). The 'ext' include is automatically appended
when doing phpize build. In php-src it is only present on Windows build.
The PHP_CHECK_PDO_INCLUDES is left intact working as before and checks
if PDO headers are found.
2024-06-03 12:56:21 +02:00
Gina Peter Banyard
25a5146180 Clean-up unused headers (#14365)
* ext/mbstring.c: clean-up headers and include intrinsics
2024-06-01 17:12:42 +01:00
Máté Kocsis
6ec4220148 Amend PDO driver-specific class names (#14069)
As suggested in https://externals.io/message/123166
2024-05-30 20:15:42 +02:00
Guillaume Outters
c265b9085a ext/pdo_pgsql: adding pgsqlSetNoticeCallback
Allows a callback to be triggered on every notice sent by PostgreSQL.

Such notices can be sent with a RAISE NOTICE in PL/pgSQL; in a long running
stored procedure, they prove useful as realtime checkpoint indicators.

close GH-6764
2024-05-22 12:32:11 +01:00
武田 憲太郎
b7dd3d8347 ext/pdo_pgsql: Retrieve the memory usage of the query result resource (#14260)
`getAttribute()` can now retrieve the memory usage of query results.
`PDO::PGSQL_ATTR_RESULT_MEMORY_SIZE` was added for this feature.

closes #14260
2024-05-20 09:08:54 +09:00
KentarouTakeda
dde5c65bfd ext/pdo_pgsql: fix typo (#14263) 2024-05-18 19:29:26 +09:00
David CARLIER
51dafc6054 Fix GH-13745: fix header inclusion in pdo_pgsql.c (#13749)
pdo/php_pdo_int.h is not part of the PDO's headers to install.
2024-03-18 23:07:41 +00:00
Máté Kocsis
330cc5cdb2 Deprecate implicit nullable parameter types (#12959)
RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-03-13 21:40:26 +01:00
Peter Kokot
42a4e50513 Sync logical operators in shell scripting code (#13560)
This updates the obsolescent `-a` and `-o` binary primaries to `&&` and
`||`.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
2024-03-01 20:40:16 +01:00
Máté Kocsis
10957e498c Do not generate frameless info items when func info generation is disabled
While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
2024-02-18 11:39:00 +01:00
Peter Kokot
085da2725f Merge branch 'PHP-8.3'
* PHP-8.3:
  Use EXTENSIONS instead of SKIPIF sections in *.phpt
2024-01-31 11:20:56 +01:00
Peter Kokot
8d5fc8d23f Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use EXTENSIONS instead of SKIPIF sections in *.phpt
2024-01-31 11:20:44 +01:00
Peter Kokot
218a93b898 Use EXTENSIONS instead of SKIPIF sections in *.phpt
This also fixes skipped tests due to different naming "zend-test"
instead of "zend_test" and "PDO" instead of "pdo":

- ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt
- ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt
- ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt
- ext/zend_test/tests/observer_sqlite_create_function.phpt

EXTENSIONS section is used for the Windows build to load the non-static
extensions.

Closes GH-13276
2024-01-31 11:18:21 +01:00
Máté Kocsis
d6a0b3af68 Implement PDO driver-specific subclasses
RFC: https://wiki.php.net/rfc/pdo_driver_specific_subclasses
Closes GH-12804

Co-Authored-By: Danack <Danack@basereality.com>
2024-01-11 23:22:41 +01:00
Niels Dossche
c3f6579f93 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12969: Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FETCHES
2023-12-22 15:07:10 +01:00
SakiTakamachi
b333164423 Fix GH-12969: Fixed PDO::getAttribute() to get PDO::ATTR_STRINGIFY_FETCHES
Partial backport of GH-12793.

Closes GH-12970.
2023-12-22 15:06:01 +01:00
Saki Takamachi
866aa12bcd ext/pdo: Fixed PDO::setAttribute() and PDO::getAttribute() (#12793) 2023-12-04 16:05:30 +00:00
Máté Kocsis
7d5b754fd3 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix the default value of fetchMode in PDO::pgsqlGetNotify()
2023-12-03 09:17:22 +01:00
Máté Kocsis
b500ddd7a9 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix the default value of $fetchMode in PDO::pgsqlGetNotify()
2023-12-03 09:11:43 +01:00
Máté Kocsis
8387f2dfd4 Fix the default value of $fetchMode in PDO::pgsqlGetNotify() 2023-12-03 09:01:06 +01:00
Máté Kocsis
f4a5db3e08 Parallelize pdo tests (dblib, firebird, oci, odbc, pgsql) (#12395)
Co-authored-by: George Peter Banyard <girgias@php.net>
Co-authored-by: Jorg Adam Sowa <jorg.sowa@gmail.com>
2023-10-28 12:35:57 +01:00
Saki Takamachi
cf701fb4fc Optimized pdo_pgsql connection test (#12454) 2023-10-23 12:18:55 +01:00
Yurun
6d10a69898 Fix the incorrect data type of float values in PDO query results
Close GH-12476
2023-10-20 12:49:25 +01:00
David CARLIER
95f829db13 ext/pdo_pgsql: cleanup the 3rd protocol is supported since circa 2010. (#12464) 2023-10-18 05:29:14 +01:00
Saki Takamachi
47c6b3bd45 Fixed regular expression to get password from dsn (#12448) 2023-10-16 12:49:33 +01:00
David CARLIER
4bb75058a3 Fix 12424 PDO_PGSQL unit test unexistent variables (#12446)
* Fix 12424 PDO_PGSQL unit test unexistent variables
Co-authored-by: Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com>
2023-10-16 08:04:55 +01:00
SakiTakamachi
b5c287e4b4 Fix GH-12423: Changed to prioritize DSN authentication information over arguments.
Added connection test

Close GH-12424
2023-10-15 20:24:30 +01:00
Alexandre Daubois
4f84b159b9 ext/pdo_pgsql: Improve tests cleanup (#11855) 2023-08-05 02:11:57 +01:00
Alexandre Daubois
e5b2590041 Improve database naming in ext/pdo_pgsql for better para-tests (#11872) 2023-08-04 16:37:42 +01:00
David CARLIER
ec3daea1d6 ext/pdo_pgsql: connection status update to distinguish from truly bad quality connections.
Close GH-11443
2023-06-13 18:08:06 +01:00
Christoph M. Becker
c8955c078a Revert GH-10220
Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit ecc880f491.
This reverts commit 588a07f737.
This reverts commit f377e15751.
This reverts commit b4ba16fe18.
This reverts commit 694ec1deea.
This reverts commit 6b34de8eba.
This reverts commit aa1cd02a43.
This reverts commit 308fd311ea.
This reverts commit 16203b53e1.
This reverts commit 738fb5ca54.
This reverts commit 9fdbefacd3.
This reverts commit cd4a7c1d90.
This reverts commit 928685eba2.
This reverts commit 01e5ffc85c.
2023-01-16 12:27:33 +01:00
Max Kellermann
308fd311ea ext/{standard,json,random,...}: add missing includes 2023-01-10 14:19:03 +00:00
Christoph M. Becker
15405c60da Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-9411: PgSQL large object resource is incorrectly closed
2022-09-05 17:28:23 +02:00
Christoph M. Becker
b5cad508fe Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9411: PgSQL large object resource is incorrectly closed
2022-09-05 17:26:13 +02:00
Yurun
6ac3f7c84d Fix GH-9411: PgSQL large object resource is incorrectly closed
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-9411.
2022-09-05 16:37:54 +02:00
Máté Kocsis
c547fc183c Add support for validation of missing class synopses (#9472) 2022-09-05 14:21:15 +02:00
George Peter Banyard
bac8ccef09 Remove SIZEOF_OFF_T undef in PDO PGSQL driver (#8301)
This has been introduced as part of fixing https://bugs.php.net/79532 (67f9b0b754) because ``pg_config.h`` was included.

As this is no longer the case we don't need this undef any more.
2022-06-09 13:29:20 +01:00
Christoph M. Becker
b94452c269 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix test case
2022-06-08 17:07:32 +02:00
Christoph M. Becker
8e2378a4e0 Fix test case
This test case has apparently been overlooked, when the PDO result
bindings had been rewritten[1].

[1] <caa710037e>
2022-06-08 17:06:06 +02:00
David Carlier
59503c0518 Merge branch 'PHP-8.1' 2022-06-02 17:36:02 +01:00
David Carlier
0f428ae240 Merge branch 'PHP-8.0' into PHP-8.1 2022-06-02 17:35:45 +01:00
Yurun
df52903ee0 Closes GH-8626: Fix PDOStatement->execute() failed.
Then execute successfully, errorInfo() information is incorrect
2022-06-02 17:32:43 +01:00
Christoph M. Becker
3acf63245a Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix error message allocation of PDO PgSQL
2021-12-12 15:18:58 +01:00
Christoph M. Becker
926dee1b6f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix error message allocation of PDO PgSQL
2021-12-12 15:18:32 +01:00
SATO Kentaro
778513f605 Fix error message allocation of PDO PgSQL
Closes GH-7723.
2021-12-12 15:17:36 +01:00
Nikita Popov
902d64390e Deprecate implicit dynamic properties
Writing to a proprety that hasn't been declared is deprecated,
unless the class uses the #[AllowDynamicProperties] attribute or
defines __get()/__set().

RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
2021-11-26 14:10:11 +01:00
Nikita Popov
90ceac6f7c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix failing PDO PgSQL test
2021-10-07 20:11:53 +02:00
Nikita Popov
56c9ea1881 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix failing PDO PgSQL test
2021-10-07 20:11:26 +02:00
Nikita Popov
c0cbf3a6eb Fix failing PDO PgSQL test
This now prints an additional

> CONTEXT:  unnamed portal parameter $1 = ''

on azure, presumably as a result of a version update or configuration
change. Strip this additional line from the error info, the same as
already done in one other place in the test.
2021-10-07 20:10:45 +02:00