Commit Graph

193 Commits

Author SHA1 Message Date
Máté Kocsis
b3bd55f244 Implement ldap_exop_sync 2023-07-18 12:59:21 +02:00
Andreas Heigl
69a8b63ecf
Deprecate ldap_connect with two parameters (#5177)
* Deprecate ldap_connect with two parameters

ldap_connect should be called with an LDAP-URI as parameter and not with
2 parameters as that allows much more flexibility like differentiating
between ldap and ldaps or setting multiple ldap-servers.

This change requires one to add null as second parameter in case the
underlying library is Oracle and one wants to add wallet-details.

* Modify all ldap-tests to use ldap_connect right

All tests are using ldap_connect now with an URI and not with host and
port as two separarte parameters.

* Verify deprecation of ldap_connect w/h 2 params

This adds a test to verify that calling ldap_connect with 2 parameters
triggers a deprecation notice

* Remove empty test

`ldap_control_paged_result()` is removed as of PHP 8.0.0, so this test
needs to be removed as well.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2023-07-10 10:44:01 +01:00
Christoph M. Becker
018fbd0a68
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
2022-12-16 14:37:39 +01:00
Christoph M. Becker
b8ac2071b8
Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
There is no `ldap_create()`, but rather `ldap_connect()`.

Closes GH-10115.
2022-12-16 14:36:30 +01:00
Nikita Popov
218fd03532 Fix some more CLEANUP sections 2021-09-03 14:10:40 +02:00
Patrick Allaert
ac18dd0dc7 Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
Nikita Popov
849a34e490 Use EXTENSIONS section for ldap 2021-06-14 10:41:33 +02:00
Nikita Popov
748568268a Make LDAPCONF test work on windows
Rather than using putenv(), use the ENV section. This also
required adding {PWD} support for it.
2021-06-14 10:40:18 +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
Ayesh Karunaratne
e0b947a8da
Move resource-object classes of LDAP to \LDAP namespaces (#6963)
Another change as per accepted [namespaces in bundled extensions RFC](https://wiki.php.net/rfc/namespaces_in_bundled_extensions).

Related: #6925, #5945, #6960
2021-05-09 22:20:21 +02:00
Máté Kocsis
cd40fc3cb1
Convert resources to objects in ext/ldap
Closes GH-6770
2021-03-21 10:43:25 +01:00
Máté Kocsis
66f16f4eb2
Merge branch 'PHP-8.0'
* Fix crash in LDAP search functions during argument validation
* Fix ldap_next_entry() parameter name
2021-03-16 09:34:41 +01:00
Máté Kocsis
b03438ba3a
Fix crash in LDAP search functions during argument validation 2021-03-16 09:31:37 +01:00
Nikita Popov
b10416a652 Deprecate passing null to non-nullable arg of internal function
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.

This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)

RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg

Closes GH-6475.
2021-02-11 21:46:13 +01:00
Côme Chilliet
550a4f2fa8 Remove deprecated functions from php-ldap
Remove ldap_control_paged_result and ldap_control_paged_result_response
 which have been deprecated in PHP 7.4, in favor of new $controls
 parameters for ldap request functions.
2020-10-01 10:15:27 +02:00
Côme Chilliet
1d3787ee94 Rename $link parameters to $ldap in ldap functions
Also fixed ldap_set_option places where $newvalue was still used
2020-09-29 16:31:08 +02:00
Côme Chilliet
c2a6da5ab2 Fix parameter names in ext/ldap
Renamed all parameters to be consistent and concise
2020-09-29 16:31:07 +02:00
Nikita Popov
c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
Máté Kocsis
36cdbd0549
Promote warnings to exceptions in ext/ldap
Closes GH-6065
2020-09-04 15:26:16 +02:00
George Peter Banyard
96c7d42a3c Use ZPP callable check for ldap_set_rebind_proc() 2020-08-13 21:14:51 +02:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
Closes GH-5590
2020-07-10 21:05:28 +02:00
Nikita Popov
bc68f10b76 Merge branch 'PHP-7.4'
* PHP-7.4:
  enable ext/ldap/tests on azure
  fix some ext/ldap/tests
2020-07-10 09:57:13 +02:00
Paweł Tomulik
b291c92693 enable ext/ldap/tests on azure 2020-07-10 09:56:02 +02:00
Paweł Tomulik
c6ab3084df fix some ext/ldap/tests 2020-07-10 09:56:02 +02:00
Paweł Tomulik
915abeb699 Add ldap_count_references()
Closes GH-5784
2020-07-01 09:29:46 +02:00
Paweł Tomulik
b3698ed9eb
Promote warning to exception in ldap_set_rebind_proc()
From now on, ldap_set_rebind_proc() will only accept callable or null
as argument 2.

Closes GH-5763
2020-06-30 16:08:34 +02:00
Fabien Villepinte
0c6d06ecfa Replace EXPECTF when possible
Closes GH-5779
2020-06-29 21:31:44 +02:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Christoph M. Becker
0436bc875e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix miscellaneous typos in docs
2019-10-19 19:20:25 +02:00
Tyson Andre
38f388fba4 Fix miscellaneous typos in docs 2019-10-19 19:19:28 +02:00
Nikita Popov
646dc19048 Suppress fsockopen error in ldap_set_rebind_proc_error.phpt 2019-10-01 22:02:47 +02:00
Christoph M. Becker
76179cdf3d Merge branch 'PHP-7.4'
* PHP-7.4:
  Add missing skip keyword in tests
  Update NEWS for 7.4.0RC4
  Update NEWS for PHP 7.4.0RC3
2019-10-01 11:19:43 +02:00
Christoph M. Becker
73f29a5c5e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add missing skip keyword in tests
2019-10-01 11:17:53 +02:00
Nikita Popov
235983dfde Merge branch 'PHP-7.4' 2019-09-30 17:52:39 +02:00
Fabien Villepinte
0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +02:00
Nikita Popov
2879ab46c0 Merge branch 'PHP-7.4' 2019-08-30 10:33:12 +02:00
Fabien Villepinte
e1afd9b213 Modernize some connectors in tests to remove env key duplication 2019-08-30 10:33:01 +02:00
Christoph M. Becker
6cd821b2d1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't modify arrays passed by value
2019-08-25 18:29:08 +02:00
Christoph M. Becker
ac40d0ffbc Don't modify arrays passed by value 2019-08-25 18:27:35 +02:00
Côme Chilliet
a88bfff59a Remove ZPP tests from ext/ldap 2019-06-18 16:11:24 +02:00
Côme Chilliet
890e846d85 Merge branch 'PHP-7.4'
* PHP-7.4:
  Some more string conversion handling, fixing bug #77958
  Avoid converting zval when not needed
2019-06-13 22:15:41 +02:00
Côme Chilliet
9684d5f282 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Some more string conversion handling, fixing bug #77958
  Avoid converting zval when not needed
2019-06-13 22:15:13 +02:00
Côme Chilliet
5d2fe48785 Some more string conversion handling, fixing bug #77958 2019-06-13 22:12:34 +02:00
Nikita Popov
0715aeeef2 Merge branch 'PHP-7.4' 2019-06-11 15:49:36 +02:00
Nikita Popov
8d3a2a4a12 Remove ext/ldap/tests/bug76248.phpt
I wasn't able to make this test work reliably in CI, and the thing
it's testing does not seem worth spending more time on it.
2019-06-11 15:47:01 +02:00
Nikita Popov
14692df82b Remove ldap zpp tests
Missed these in the zpp test purge -- they've been failing on master
for a while, but nobody compiles with ldap.
2019-06-11 10:09:40 +02:00
Peter Kokot
87cfcb0b7c Merge branch 'PHP-7.4'
* PHP-7.4:
  [ci skip] Migrate tests READMEs to Markdown
2019-05-12 22:03:35 +02:00