- 🇨🇴Colombia sergiogsanchez
I made a patch with the fixes for the d10 compatibility issues reported by the rector module and added the d10 readiness and the Symfony ldap library update, which is hopefully useful for d10 portability.
- 🇨🇴Colombia sergiogsanchez
Adding a new patch without the ci php-ldap command.
The last submitted patch, 5: 3297516-drupal-10-compatibility-fixes-no-ci.patch, failed testing. View results →
- Status changed to Needs work
almost 2 years ago 4:20am 17 February 2023 - 🇨🇴Colombia sergiogsanchez
Adding a patch with adjustments regarding to the new external auth version.
- Status changed to Needs review
almost 2 years ago 4:38am 17 February 2023 - 🇪🇸Spain ecdani
The updated dependency to "externalauth" isn't taken into account when "composer" resolves the dependencies, the patching is done after that.
So, although the module has been patched, it is preventing from update "externalauth". The patch in #3297516-7: Automated Drupal 10 compatibility fixes → replaces the grahl/ldap dependency. There is a separate issue for that: ✨ Switch grahl/ldap to symfony/ldap Closed: duplicate .
An another one: 🐛 [PHP 8.1] [Drupal 10] Upgrade grahl/ldap fork to follow symfony/ldap 5.4.x and require graph/ldap:^5.4 Closed: outdated
- First commit to issue fork.
- First commit to issue fork.
- @solideogloria opened merge request.
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
+++ b/composer.json @@ -5,9 +5,12 @@ + "symfony/ldap": "^5.4",
Shouldn't this be 5 or 6? We use symfony 6 in Drupal 10
Will commit it as is so we can get a test run, but we'll likely need a follow up
-
larowlan →
committed 8f57b42e on 8.x-4.x authored by
sergiogsanchez →
Issue #3297516 by sergiogsanchez, ecdani, Project Update Bot: Automated...
-
larowlan →
committed 8f57b42e on 8.x-4.x authored by
sergiogsanchez →
- Status changed to Fixed
almost 2 years ago 3:33am 8 March 2023 - Status changed to Postponed
almost 2 years ago 3:44am 8 March 2023 - 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Ok, looks like we're now blocked on https://www.drupal.org/project/authorization →
@larowlan So ✨ Switch grahl/ldap to symfony/ldap Closed: duplicate is outdated now, right?
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Yeah, that one can be closed as a duplicate of this I think
I think maybe this is the only issue needed for Authorization?
📌 Drupal 10 patch (rector) Fixed
FYI, there are no active maintainers for Authorization, AFAIK. The commit log shows that grahl made all the recent commits there, and nothing has been committed since September 2021. So if you want to volunteer as a maintainer there, the RTBC patches could get committed.
Can we have a new release that contains this commit? It's not possible to patch this with Composer, because the composer.json file will be patched after the old dependencies (grahl/ldap) have already been installed.
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
@sergiogsanchez are you interested in following the same process as you did to become an LDAP maintainer for the authorization module? e.g. open a support issue, send a link to the issue via contact forms etc. If there's no reply, then you can move to the process → after two weeks.
- 🇮🇳India raveendrab
Hi,
I am trying to install the dev version on a clean drupal 10 using composer.
I am able to install authorization dev version as the drupal 10 patch has been applied. However, while installing ldap dev module using compser, i am getting the following errors.
- drupal/ldap 4.x-dev is an alias of drupal/ldap dev-4.x and thus requires it to be installed too.
- drupal/ldap dev-4.x requires drupal/ldap_servers * -> satisfiable by drupal/ldap_servers[4.0.0, 4.1.0, 4.2.0, 4.3.0].
- Root composer.json requires drupal/ldap 4.x-dev@dev -> satisfiable by drupal/ldap[4.x-dev (alias of dev-4.x)]. - Status changed to Needs review
over 1 year ago 1:43pm 27 March 2023 Setting to Needs Review, as the Drupal 10 fixes were committed for Authorization. If someone can verify that everything works as it should, this can be set to Fixed.
@raveendrab I set up a clean install, both for Drupal 9 and Drupal 10, and installing drupal/ldap:4.x-dev via composer works. You don't need to require authorization, as it's a dependency of ldap. If you want the dev version of authorization, you'll have to install the stable version, then add the later commits as patches to your composer file(s).
- 🇸🇦Saudi Arabia ishore
Hi!
Core 9.5.7
Authorization 8.x-1.0-beta6 plus 3327917-full-d10-upgrade.patch
TFA 2.0.0-alpha2
PHP 8.1
PostgreSQL 13.7In preparation for migration to Drupal 10, I tried updating ldap module to latest dev version. The upgrade seemed to go well:
drupal@dev1:/srv/www$ composer require 'drupal/ldap:4.x-dev@dev' --with-all-dependencies
./composer.json has been updated
Running composer update drupal/ldap --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 2 updates, 1 removal
- Removing grahl/ldap (v5.2.0.1)
- Upgrading drupal/externalauth (1.4.0 => 2.0.3)
- Upgrading drupal/ldap (4.3.0 => dev-4.x 9e018e7)
- Locking symfony/ldap (v6.2.8)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 2 updates, 1 removal
- Downloading drupal/externalauth (2.0.3)
- Syncing drupal/ldap (dev-4.x 9e018e7) into cache
- Downloading symfony/ldap (v6.2.8)
- Removing grahl/ldap (v5.2.0.1)
- Upgrading drupal/externalauth (1.4.0 => 2.0.3): Extracting archive
- Removing drupal/ldap (4.3.0)
- Installing symfony/ldap (v6.2.8): Extracting archive
- Installing drupal/ldap (dev-4.x 9e018e7): Cloning 9e018e757d from cache
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
Generating autoload files
77 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Endroid Installer did not detect a specific framework for auto-configuration
No security vulnerability advisories foundI cleared the cache after the update.
Now, when I try to login as an LDAP user it fails, after entering the password, with the following message:
The website encountered an unexpected error. Please try again later.
Error: Class "Symfony\Component\Ldap\Ldap" not found in Drupal\ldap_servers\LdapBridge->setServer() (line 109 of modules/contrib/ldap/ldap_servers/src/LdapBridge.php).I can login okay as a local user, but still get the above message after entering the password. After re-entering the website URL, I do get the home page and see that I am logged in. The home page however does have another couple of error messages:
Warning: include(/srv/www/vendor/composer/../grahl/ldap/Ldap.php): Failed to open stream: No such file or directory in include() (line 571 of /srv/www/vendor/composer/ClassLoader.php).
Warning: include(): Failed opening '/srv/www/vendor/composer/../grahl/ldap/Ldap.php' for inclusion (include_path='/srv/www/vendor/pear/archive_tar:/srv/www/vendor/pear/console_getopt:/srv/www/vendor/pear/pear-core-minimal/src:/srv/www/vendor/pear/pear_exception:.:/usr/share/pear:/usr/share/php:/usr/share/pear:/usr/share/php') in include() (line 571 of /srv/www/vendor/composer/ClassLoader.php).
I have not tried a clean install yet.
- 🇸🇦Saudi Arabia ishore
Update - clearing the cache a second time and/or restarting Apache appears to have fixed all issues.
- 🇺🇦Ukraine deimos
Hi,
During project (site) preparation to the D10 I tried latest module's dev version, i.e.
composer require 'drupal/ldap:4.x-dev@dev' --with-all-dependencies
And I can confirm that the module basically works with D10 after upgrade from D9. (I haven't got a chance to test the module on actual site after upgrade to D10 yet.)
Here is a short info about environment setup:- Core - 10.0.9
- PHP - 8.1.20
- MariaDB - 10.4.28-MariaDB-1:10.4.28+maria~ubu2004-log
For LDAP server I used setup provided by LDAP module itself - Hogwarts
Before upgrade from D9 to D10 I run upgrade-status analysis (
drush upgrade_status:analyze ldap
) and got the following report. So I added fixed based on it (see attached patch file).Also I run unit-tests after upgrade to D10 and got a couple of PHP errors like
PHPUnit\Framework\Exception: PHP Fatal error: Declaration of Drupal\ldap_servers_dummy\FakeQuery::execute() must be compatible with Symfony\Component\Ldap\Adapter\QueryInterface::execute()
So patch-file has corrections for that too.In general, patch-file provides:
- Add->accessCheck()
- Fix PHP Fatal error in testsPatch file doesn't provide (I skipped that because don't feel confident to fix LDAP module's tests):
- Fixes in tests when deprecated PHPUnit methods are used. For example,Call to deprecated method setMethods() of class PHPUnit\Framework\MockObject\MockBuilder
- last update
over 1 year ago 45 pass - 🇨🇴Colombia sergiogsanchez
Thanks for the heads up @Deimos; I recently merged some fixes for the unit test, so I created a new one based on your patch.
- last update
over 1 year ago 45 pass - Status changed to RTBC
over 1 year ago 8:20pm 20 June 2023 - last update
over 1 year ago Patch Failed to Apply - 🇨🇴Colombia jidrone
As explained in the change record related with the Access Check → , only the content entities are affected by this change.
Most of the code changes in previous patches are related to that change record, but applied to config entities like ldap_server, user_role, etc.
So I think there is only one change related with Drupal 10 compatibility fixes, but it was already fixed on 🐛 Automated testing symfony/ldap 6.x issues Fixed
+++ b/ldap_servers/tests/modules/ldap_servers_dummy/src/FakeQuery.php @@ -28,7 +29,7 @@ class FakeQuery implements QueryInterface { + public function execute(): CollectionInterface {
From my perspective all the things related to D10 compatibility are fixed, so I'm moving this to RTBC and other CS issues can be fixed in a separate issue.
- Status changed to Fixed
over 1 year ago 2:29am 21 June 2023 Automatically closed - issue fixed for 2 weeks with no activity.