Skip to content

problem with named parameters?聽#9

Closed

Description

@mitelg

I tried the new version and now there is an issue with attributes and probably named parameters? 馃

-> https://github.com/shopware/shopware/blob/trunk/src/Core/Content/MeasurementSystem/DataAbstractionLayer/MeasurementSystemEntity.php#L40
-> https://github.com/shopware/shopware/blob/trunk/src/Core/Framework/DataAbstractionLayer/Attribute/OneToMany.php

PHP Fatal error: Uncaught TypePHP\Exception\TypeError: Shopware\Core\Framework\DataAbstractionLayer\Attribute\OneToMany::__construct(): Argument $onDelete must be of type (bool | array{admin-api: bool, store-api: bool}), Shopware\Core\Framework\DataAbstractionLayer\Attribute\OnDelete given in /home/runner/work/shopware/shopware/src/Core/Content/MeasurementSystem/DataAbstractionLayer/MeasurementSystemEntity.php:40

Activity

  1. rcalicdan commented on Aug 10, 2026

    @rcalicdan
    Member

    Hello @mitelg , you are indeed correct the i had look at the internal ast parsing of the library and it doesn't take into account on the positioning of name parameters in constructors and I had reproduce the same errors in my test suites. I will release a new version with this fix along with new features and performance improvements of the library later soon.

    I appreciate the help for submitting bugs.

  2. rcalicdan commented on Aug 10, 2026

    @rcalicdan
    Member

    Hello @mitelg

    I manage to fix your issue in #10 and 0.2.0 release and fix the reproduce errors in my test suites and added more edge cases tests..
    you can update the library version in composer now to see how it goes in your codebase.

    Thank you for submitting this bug report,, If you still find any problems feel free to submit or ask questions.

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

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions