1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Commit Graph

238 Commits

Author SHA1 Message Date
Matteo Beccati 53d7c17474 pdo_pgsql: escaped question marks inside dollar quoted strings
Allow "??" in dollar quoted strings for backwards compatibility,
as it was a viable workaround to insert question marks without them
being parsed as placeholders.

Add a deprecation notice to tell that the escape is no longer
necessary within dollar quotes and that its usage is deprecated.

Ref bug #14244
2024-06-17 23:31:25 +02:00
Matteo Beccati 01879ec254 pdo_pgsql: add support for dollar-quotes
RFC: http://wiki.php.net/rfc/pdo_driver_specific_parsers
2024-06-17 23:31:24 +02:00
Matteo Beccati e82c486918 pdo_pgsql: add support for "escape" string literals
RFC: http://wiki.php.net/rfc/pdo_driver_specific_parsers
2024-06-17 23:31:24 +02:00
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
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
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 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 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
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
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] <https://github.com/php/php-src/commit/caa710037e663fd78f67533b29611183090068b2>
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
Nikita Popov 1e012ecb3f Fix bug #81405: Restore old PDO::PARAM_* values
Doctrine hardcodes the values of these constants, avoid changing
them.

Closes GH-7445.
2021-09-01 13:54:41 +02:00
Philip Hofstetter ace8fba759 Fix bug #81343: inconsistent type conversion after closeCursor
S->cols is already freed in the statement destructor and since
caa710037e the column data is only
populated on the first execute() which means that on subsequent
execute()s after closeCursor was called, all meta-data for column types
was removed and never restored

Closes GH-7355.
2021-08-11 18:24:13 +02:00
Patrick Allaert ac18dd0dc7 Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
Nikita Popov 39131219e8 Migrate more SKIPIF -> EXTENSIONS (#7139)
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
2021-06-11 12:58:44 +02:00
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00
Matteo Beccati f84936b30c Merge branch 'PHP-8.0'
* PHP-8.0:
  Revert "Fix #80892: PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
2021-04-29 12:06:11 +02:00
Matteo Beccati 7bc9df4af2 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Revert "Fix #80892: PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
2021-04-29 12:05:49 +02:00
Matteo Beccati b8e49fe872 Revert "Fix #80892: PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
This reverts commit 340a06778c.
2021-04-29 11:59:16 +02:00
Matteo Beccati d0229374ce Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80892: PDO::PARAM_INT is treated the same as PDO::PARAM_STR
2021-04-12 08:06:38 +02:00
Matteo Beccati 4f236635e7 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80892: PDO::PARAM_INT is treated the same as PDO::PARAM_STR
2021-04-12 08:05:41 +02:00
Matteo Beccati 340a06778c Fix #80892: PDO::PARAM_INT is treated the same as PDO::PARAM_STR 2021-04-12 08:03:07 +02:00