GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MSSQL - DBAL - Symfony / enqueue - Issue with Uuid · Issue #1358 · php-enqueue/enqueue-dev

MSSQL - DBAL - Symfony / enqueue - Issue with Uuid #1358

New issue
Copy link
New issue
Copy link
Open
Open
MSSQL - DBAL - Symfony / enqueue - Issue with Uuid#1358
Copy link

Description

@svI24
svI24
opened on Sep 16, 2024
Issue body actions

I have a Symfony 6.4 application and have an issue with enqueue.
My Symfony Database is a MSSQL Server.
I have installed the enqueue modules with composer. This worked fine. The table enqueue got created.

When I now try to save a command to the Queue, I get an error:

$cmd = new RunCommand('debug:container', ['--tag=form.type']);
$producer->sendCommand(Commands::RUN_COMMAND, $cmd);

Error:

[Doctrine\DBAL\Exception\DriverException (-16)]
An exception occurred while executing a query: SQLSTATE [IMSSP, -16]: An invalid PHP type for parameter 1 was specified

While debugging I found out that parameter 1 of the error is the id field of the database.
The Id is set at L69 https://github.com/php-enqueue/dbal/blob/2375961434e2a69b8710875f1c4e56f01b348a47/DbalProducer.php#L69 with Uuid:uuid4() function. 'id' => Uuid::uuid4(),
It returns an object for id:

Array
(
    [id] => Ramsey\Uuid\Lazy\LazyUuidFromString Object
        (
            [unwrapped:Ramsey\Uuid\Lazy\LazyUuidFromString:private] => 
            [uuid:Ramsey\Uuid\Lazy\LazyUuidFromString:private] => 5909c9e3-1690-4cd0-b0f0-0151e6f7996a
        )

    [published_at] => 17252753310188
    // [body]  =>... more fields of enqueue table
)

When I change now L69 to 'id' => \Enqueue\Util\UUID::generate(), it returns the Uuid String and saving to database works.

Array
(
    [id] => 6f9cfd8d-4f3a-4675-9f95-a2099de60457
    [published_at] => 17252757497569
    //[body] => ... 
)

There seems to be an issue to convert the Object to an Uuid string somewhere later or it is only MSSQL related.

Can you please check, if you can reproduce this issue?
Does anyone know a solution for this problem?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.