Generated orm classes are different from the provided ModelCriteria

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

  • 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

    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

    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

    for example

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

    deleting loadDatabase.php also not working

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

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

    can you share link please?

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

    thx

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

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

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

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

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

    so I dont geht why it fails

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

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

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