-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration to PHP 7.4 #1086
base: master
Are you sure you want to change the base?
Migration to PHP 7.4 #1086
Conversation
* runtime/lib/query/Join.php implode() was used against the definition (wrong PHP documentation * runtime/lib/query/ModelCriteria.php count() was used on non-countable variable (non-array)
The support for PHP 7.4 is very welcome - thank you for doing this! But from what I can see, this approach breaks the support for older versions of PHP. Perhaps this only makes sense as a separate branch? |
Does anyone know of a reliable fork that completely fixes php 7.4 compatibility without breaking compatibility with 5.x (or introducing lots of regressions)? Right now the most disastrous bc-breaking change in PHP 7.4 that I'm observing that completely breaks Propel 1 is this: |
This does NOT fix compatibility with PHP 7.4. With 7.3 maybe, but this does not address https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.spl |
May it be merged as a separate version? |
@teo1978 Tests for 7.4 are passing and I must admit this fork is running fine on a commercial project for almost a year without issues. We are doing a slow migration to Doctrine in the meantime. I am planning to start migrating it towards 8.0 this month. |
Any news with regard to 8.0 support? I might consider helping out as I have a project running on propel as well. |
We've been using @tworzenieweb changes for supporting for PHP 7.4 for a long while now and haven't had any issues. 👍 @tworzenieweb Did you do any progress on the support for PHP 8.0 since then? I might give a hand towards that if I find the time, but would be best to avoid duplicate work. |
* Correct deprecated methods in PHP7.4 (propelorm#1079) * runtime/lib/query/Join.php implode() was used against the definition (wrong PHP documentation * runtime/lib/query/ModelCriteria.php count() was used on non-countable variable (non-array) * 7.4 and phpunit9 changes. Tests are passing * Compatibility changes * Added docker setup * updated travis * added correct path * 7.4 final travis setup * propelorm#1086: Code review suggestions applying * remove dependency on docker mysql * remove 5.6 and 7.2 from test matrix; add 8.0 and 8.1 * Upgraded PHP version and removed some deprecations * Migrated phpunit.xml.dist * Switched to PHP8.0 in Dockerfile * Removed usage of ReflectionClass->getClass in favor of ReflectionClass->getType * Changed order of arguments in ModelCriteriaTest.php and ModelCriteriaWithNamespaceTest.php * Fixed signatures of PropelOnDemandCollection::asort and PropelOnDemandCollection::ksort * Removed require_once from all the classes because we have autoloading via composer * Rector automated upgrade to PHP8 * Fixed invalid handling of resource type for binded value in DebugPDOStatement.php * Fixed invalid way of checking if method exists in delegated class via is_callable. Switched to method_exists * Replaced order of params because of failed tests * [STYLE]: Added simplified usage because of version support dropping * Fix use of abs() with string on PHP8.0 Can happen when using Yaml's multiline syntax * specify minimum version of phing for php8 * drop php 7.3 from test matrix * update to ubuntu-20.04 * fork propel/propel1 for versions >=1.8 Co-authored-by: Michal Drozd <[email protected]> Co-authored-by: Luke Adamczewski <[email protected]> Co-authored-by: Łukasz Adamczewski <[email protected]> Co-authored-by: Jeffrey Wong <[email protected]> Co-authored-by: Luke Adamczewski <[email protected]> Co-authored-by: Paulo Magalhaes <[email protected]>
@tworzenieweb Thanks for your work on this! We used this as the basis for our fork with PHP 8.0 support. @mentalstring @DanielFortuyn We published https://packagist.org/packages/dayspring-tech/propel-bundle#1.8.0 as a drop-in replacement with PHP 8.0 compatibility. |
* Correct deprecated methods in PHP7.4 (propelorm#1079) * runtime/lib/query/Join.php implode() was used against the definition (wrong PHP documentation * runtime/lib/query/ModelCriteria.php count() was used on non-countable variable (non-array) * 7.4 and phpunit9 changes. Tests are passing * Compatibility changes * Added docker setup * updated travis * added correct path * 7.4 final travis setup * propelorm#1086: Code review suggestions applying * remove dependency on docker mysql * remove 5.6 and 7.2 from test matrix; add 8.0 and 8.1 * Upgraded PHP version and removed some deprecations * Migrated phpunit.xml.dist * Switched to PHP8.0 in Dockerfile * Removed usage of ReflectionClass->getClass in favor of ReflectionClass->getType * Changed order of arguments in ModelCriteriaTest.php and ModelCriteriaWithNamespaceTest.php * Fixed signatures of PropelOnDemandCollection::asort and PropelOnDemandCollection::ksort * Removed require_once from all the classes because we have autoloading via composer * Rector automated upgrade to PHP8 * Fixed invalid handling of resource type for binded value in DebugPDOStatement.php * Fixed invalid way of checking if method exists in delegated class via is_callable. Switched to method_exists * Replaced order of params because of failed tests * [STYLE]: Added simplified usage because of version support dropping * Fix use of abs() with string on PHP8.0 Can happen when using Yaml's multiline syntax * specify minimum version of phing for php8 * drop php 7.3 from test matrix * update to ubuntu-20.04 * fork propel/propel1 for versions >=1.8 Co-authored-by: Michal Drozd <[email protected]> Co-authored-by: Luke Adamczewski <[email protected]> Co-authored-by: Łukasz Adamczewski <[email protected]> Co-authored-by: Jeffrey Wong <[email protected]> Co-authored-by: Luke Adamczewski <[email protected]> Co-authored-by: Paulo Magalhaes <[email protected]>
A lot of small changes applied to ensure that code works with PHP7.4, any help and thoughts are highly appreciated.