Account created on 10 September 2011, over 13 years ago
#

Recent comments

🇮🇳India hiramanpatil

I am using Drupal 10.3.5 with PHP 8.3.5 and seeing the following warnings in the build logs when running unit tests using ExistingSite base class. Is there any direct patch available to resolve these?

365x: Since twig/twig 3.12: Getting node "filter" on a "Twig\Node\Expression\FilterExpression" class is deprecated.
365x in RisesmartRoutingTest::testAllRoutesAccess from Drupal\Tests\custom_module\ExistingSite

163x: Since twig/twig 3.11: Changing the value of a "filter" node in a NodeVisitor class is not supported anymore.
163x in RisesmartRoutingTest::testAllRoutesAccess from Drupal\Tests\custom_module\ExistingSite

15x: Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "render_var" function of type "Twig\Node\Expression\FunctionExpression" is deprecated.
15x in RisesmartRoutingTest::testAllRoutesAccess from Drupal\Tests\custom_module\ExistingSite

4x: Since twig/twig 3.12: Getting node "filter" on a "Twig\Node\Expression\Filter\DefaultFilter" class is deprecated.
4x in RisesmartRoutingTest::testAllRoutesAccess from Drupal\Tests\custom_module\ExistingSite

Thanks,

🇮🇳India hiramanpatil

Thank you for the quick response. Getting the same error using CURL.

$ curl https://api.openai.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer OPENAI_API_KEY" -d '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "write a haiku about ai"}]}'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 432 100 337 100 95 549 154 --:--:-- --:--:-- --:--:-- 714{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota"
}
}

🇮🇳India hiramanpatil

@marcus_johansson

$ composer why gufy/pdftohtml-php
drupal-composer/drupal-project dev-master requires gufy/pdftohtml-php (~2)

🇮🇳India hiramanpatil

Here is some information from composer.lock file.

{
"name": "gufy/pdftohtml-php",
"version": "v2.0.8",
"source": {
"type": "git",
"url": "https://github.com/mgufrone/pdf-to-html.git",
"reference": "4b0c2c60d48b8e3e08394a3f130606408e7f7d2e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mgufrone/pdf-to-html/zipball/4b0c2c60d48b8e...",
"reference": "4b0c2c60d48b8e3e08394a3f130606408e7f7d2e",
"shasum": ""
},
"require": {
"illuminate/config": "~5",
"paquettg/php-html-parser": "~1"
},
"require-dev": {
"phpunit/phpunit": "~4",
"satooshi/php-coveralls": "^1.0"
},
"type": "library",
"autoload": {
"psr-0": {
"Gufy": "src"
},
"psr-4": {
"Gufy\\PdfToHtml\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mochamad Gufron",
"email": "mgufronefendi@gmail.com"
}
],
"description": "PDF to HTML converter with PHP using Poppler-utils",
"support": {
"issues": "https://github.com/mgufrone/pdf-to-html/issues",
"source": "https://github.com/mgufrone/pdf-to-html/tree/master"
},
"abandoned": true,
"time": "2016-10-11T21:43:48+00:00"
},

"name": "illuminate/config",
"version": "v5.0.33",
"description": "The Illuminate Config package.",
"homepage": "http://laravel.com",

"name": "illuminate/contracts",
"version": "v5.0.33",
"description": "The Illuminate Contracts package.",
"homepage": "http://laravel.com",

"name": "illuminate/support",
"version": "v5.0.33",
"description": "The Illuminate Support package.",
"homepage": "http://laravel.com",

🇮🇳India hiramanpatil

I am using Drupal core version 10.2.7 with PHP 8.1.6 and trying to install the AI module, but I am encountering the following errors:

$ composer require 'drupal/ai:^1.0@alpha'
./composer.json has been updated
Running composer update drupal/ai
Gathering patches for root package.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- drupal/ai 1.0.0-alpha7 requires wpai-inc/anthropic-sdk-php >=0.1.0 -> satisfiable by wpai-inc/anthropic-sdk-php[0.1.0, 0.2.0, 0.2.1, 9999999-dev].
- drupal/ai[1.0.0-alpha1, ..., 1.0.0-alpha6] require drupal/core ^10.3 || ^11 -> found drupal/core[10.3.0-beta1, ..., 10.4.x-dev, 11.0.0-alpha1, ..., 11.x-dev] but it conflicts with your root composer.json require (10.2.7).
- wpai-inc/anthropic-sdk-php 0.1.0 requires illuminate/support ^9.52|^10.0 -> found illuminate/support[v9.52.0, ..., 9.x-dev, v10.0.0, ..., 10.x-dev] but the package is fixed to v5.0.33 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- wpai-inc/anthropic-sdk-php[dev-main, 0.2.0, ..., 0.2.1] require illuminate/support ^9.52|^10.0|^11.0 -> found illuminate/support[v9.52.0, ..., 9.x-dev, v10.0.0, ..., 10.x-dev, v11.0.0, ..., 11.x-dev] but the package is fixed to v5.0.33 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires drupal/ai ^1.0@alpha -> satisfiable by drupal/ai[1.0.0-alpha1, ..., 1.0.0-alpha7].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

------------
It seems the issue is caused by a version conflict between the illuminate/support package required by the wpai-inc/anthropic-sdk-php dependency of the drupal/ai module and the existing illuminate/support version in your project (v5.0.33).

🇮🇳India hiramanpatil

@arshadkhan35,

I have tried it but still getting the same error.

Please check my reply here - https://www.drupal.org/project/drupal/issues/3346242#comment-15387854

Were you able to run any contributed module tests?

Thanks,

🇮🇳India hiramanpatil

@benJBmC,
I am using Drupal 10.1.7 version with below PHPUnit configuration.

"require-dev": {
"phpspec/prophecy": "^1.17",
"phpunit/phpunit": "9.5.28",
"symfony/phpunit-bridge": "^7.0"
}

I am trying to run the dev module test but getting errors.

Command - vendor/bin/phpunit web/modules/contrib/devel/tests/src/Functional/DevelControllerTest.php

Output

PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

Testing Drupal\Tests\devel\Functional\DevelControllerTest
E 1 / 1 (100%)

Time: 00:48.149, Memory: 10.00 MB

There was 1 error:

1) Drupal\Tests\devel\Functional\DevelControllerTest::testRouteGeneration
Error: Class "Behat\Mink\Driver\BrowserKitDriver" not found

C:\xampp\htdocs\projects\drupalten\web\core\tests\Drupal\Tests\BrowserTestBase.php:310
C:\xampp\htdocs\projects\drupalten\web\core\tests\Drupal\Tests\BrowserTestBase.php:222
C:\xampp\htdocs\projects\drupalten\web\core\tests\Drupal\Tests\BrowserTestBase.php:370
C:\xampp\htdocs\projects\drupalten\web\modules\contrib\devel\tests\src\Functional\DevelBrowserTestBase.php:43
C:\xampp\htdocs\projects\drupalten\web\modules\contrib\devel\tests\src\Functional\DevelControllerTest.php:57
C:\xampp\htdocs\projects\drupalten\vendor\phpunit\phpunit\src\Framework\TestResult.php:728

ERRORS!
Tests: 1, Assertions: 1, Errors: 1.

Remaining self deprecation notices (1)

1x: The Drupal\Tests\devel\Functional\DevelControllerTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
1x in DrupalListener::startTest from Drupal\Tests\Listeners

Production build 0.71.5 2024