Commit graph

475 commits

Author SHA1 Message Date
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
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Eli Schwartz
bdd4eb2d9e ext/pdo_pgsql: drop unneeded code
This check was added in 0db373883f and
greps for a private implementation detail of the postgres headers,
removed in 3c4768d0d1

It hasn't worked as intended for 12 years, and can safely be assumed to
not be needed.
2018-12-09 17:15:58 +01:00
Gabriel Caruso
cdd8368d6f Clean up unnecessary ternary expressions and simplify some returns
- Simplify conditions
- Use ZEND_HASH_APPLY_* instead of hard-coded booleans
- Use ZEND_NORMALIZE_BOOL
- Drop sign in favor of ZEND_NORMALIZE_BOOL
2018-12-03 01:22:14 +01:00
Dmitry Stogov
0f7f1498be Use ZEND_THIS macro to hide implementation details in extensions code. 2018-11-15 19:54:19 +03:00
Dmitry Stogov
c6ad0b92b7 Replace getThis() by EX(This), when additional check is not necessary. 2018-11-14 02:44:25 +03:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Anatol Belski
093cb1d7c6 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75402 Possible Memory Leak using PDO::CURSOR_SCROLL option
2018-07-30 18:29:40 +02:00
Anatol Belski
d207d6a57f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75402 Possible Memory Leak using PDO::CURSOR_SCROLL option
2018-07-30 18:28:53 +02:00
Anatol Belski
cc69950b15 Fixed bug #75402 Possible Memory Leak using PDO::CURSOR_SCROLL option 2018-07-30 18:27:59 +02:00
Peter Kokot
cf8ef08e20 Fix typos in code 2018-07-27 16:27:41 +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
Anatol Belski
117c37da76 Merge branch 'PHP-7.2'
* PHP-7.2:
  Add missing flag
2018-07-09 15:15:08 +02:00
Anatol Belski
a6e8c73c43 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add missing flag
2018-07-09 15:14:30 +02:00
Anatol Belski
2c43fb49d6 Add missing flag 2018-07-09 15:12:52 +02:00
Dmitry Stogov
dd932f7e63 Changed php_add[c]slashes prototypes (removed should_free argument) 2018-06-29 00:19:16 +03:00
Peter Kokot
25c35ab30a Sync phpinfo output for pdo_pgsql
This patch removes the module version and revision from the phpinfo
output to sync the phpinfo with the rest of the bundled extensions.
2018-06-08 23:06:22 +02:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Anatol Belski
1bb1f17827 Fix default credentials when none was passed 2018-05-07 12:14:38 +02:00
Anatol Belski
a1a3361552 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix heap use after free
2018-03-12 21:03:36 +01:00
Anatol Belski
c469213e7b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix heap use after free
2018-03-12 21:02:40 +01:00
Anatol Belski
4cd64aad8a Fix heap use after free
The value may only be used until PGresult was destroyed, thus it needs
to be copied.
2018-03-12 20:57:21 +01:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Dmitry Stogov
b3e22da745 Use OBJ_FLAGS() macro to access object flags (even if they are currently stored together with GC_FLAGS) 2018-01-22 15:57:00 +03:00
Dmitry Stogov
b2c060a291 Eliminate useless separation 2018-01-17 12:09:38 +03:00
Anatol Belski
205f527379 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix tests
2018-01-04 16:10:37 +01:00
Anatol Belski
fc6a990891 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix tests
2018-01-04 16:09:51 +01:00
Anatol Belski
1448f0912f Fix tests 2018-01-04 16:08:41 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
0d484172fe Turn "pdo_stmt_methods" into constants. 2017-12-14 22:59:58 +03:00
Dmitry Stogov
83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Anatol Belski
0ab89a5d37 Merge branch 'PHP-7.2'
* PHP-7.2:
  Skip test on PostgreSQL 10
2017-10-27 16:24:22 +02:00
Anatol Belski
cbf385e68c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Skip test on PostgreSQL 10
2017-10-27 16:23:50 +02:00
Anatol Belski
005205714b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Skip test on PostgreSQL 10
2017-10-27 16:23:19 +02:00
Anatol Belski
15a71fe045 Skip test on PostgreSQL 10
The 42P18 error is not produced by the server anymore.
2017-10-27 16:19:42 +02:00
Kalle Sommer Nielsen
c34ba92782 Get rid of all these old package[2].xml files, most of these had no had a release since PHP4, or any release at all in close to 10 years, some even did not have a package registered at pecl
OCI, PDO_OCI and zip are left as they are actively developed and released there
2017-08-17 22:09:29 +02:00
Joe Watkins
0877839469
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed #73959 - lastInsertId fails to throw an exception in pdsql
2017-01-20 20:12:30 +00:00
Joe Watkins
d6feb2edbd
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #73959 - lastInsertId fails to throw an exception in pdsql
2017-01-20 20:11:49 +00:00
andrewnester
21ac79e94b
Fixed #73959 - lastInsertId fails to throw an exception in pdsql 2017-01-20 20:10:55 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Adam Baratz
d58231dda3 Add "Sent SQL" to debug dump for emulated prepares 2016-12-20 11:07:04 -05:00
Anatol Belski
b441ff6cf9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  make timing check more forgiving in these tests
2016-12-15 12:32:35 +01:00
Anatol Belski
8bc3f179ce make timing check more forgiving in these tests
Particularly on slower VMs, the sporadic fails can still happen.
The timing is kept in an uncritical range, but allows the tests
pass there. Mayby, it'd make sense to introduce a new group for
this kind of tests, so tests requiring exact time measurement
can be avoided on unsuitable environments.
2016-12-15 12:20:37 +01:00