Calling Developers!
We are reenergizing our code contribution process! Learn More

Generated orm classes are different from the provided ModelCriteria

Options
UK7KBE2JW
UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
edited June 2023 in Propel ORM

Hey there, 3 days ago the propel packages got updated and now using the latest propel/propel. Now the generated orm classes are different from the provided ModelCriteria. Can anyone confirm that?

Tagged:

Comments

  • Unknown
    Options

    Can you clarify what exactly you mean please?
    They are of course different, see changelog of released propel package. The added types for param and return, the overall strictness, for example for sure change it.

  • Serhii Chepela
    Serhii Chepela Application Architect @ Spryker Sprykee Posts: 48 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    Hey!
    Could you clarify your question please.

    Propel had a release last week. Spryker code was also updated on Friday.
    Propel release add more strict typhints for the generated models, so code should be re-generated.

    You might have issues with that. If so, please remove data/cache/propel/generated-conf/loadDatabase.php file first

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    Fatal error: Declaration of Orm\Zed\Customer\Persistence\Base\SpyCustomerQuery::exists(?Propel\Runtime\Connection\ConnectionInterface $con = NULL) must be compatible with Propel\Runtime\ActiveQuery\ModelCriteria::exists(?Propel\Runtime\Connection\ConnectionInterface $con = NULL): bool

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    for example

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    deleting loadDatabase.php also not working

  • Unknown
    Options

    Did you regenerate your models as per documented approach/guideline?

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    can you share link please?

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    thx

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    its strange, the loadDatabase.php is not git and will be generated every ci run

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    yeah its not in git, but will be generated on ci task run

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    so I dont geht why it fails

  • Unknown
    Options

    You did not yet regenerate your models and generated files as outlined above.

  • UK7KBE2JW
    UK7KBE2JW Posts: 463 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited July 2022
    Options

    https://github.com/fond-of/codeception-spryker handles the generation for us. but it seems it was a caching issue in github builds