Skip to content
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

runtime/lib/query/Join.php:540 gives warnings in PHP7.4 #1079

Open
michalmagic42 opened this issue Feb 27, 2020 · 0 comments
Open

runtime/lib/query/Join.php:540 gives warnings in PHP7.4 #1079

michalmagic42 opened this issue Feb 27, 2020 · 0 comments

Comments

@michalmagic42
Copy link

Issue: runtime/lib/query/Join.php:540 gives warnings in PHP7.4

The reason is that the implode() method is used against standard:
$joinCondition = sprintf('(%s)', implode($conditions, ' AND '));

For historical reasons, the implode() function supports passing the $glue and $pieces parameters in reverse order from the documented order of arguments. This is inconsistent and makes the argument handling non-standard.

Fix: change the line runtime/lib/query/Join.php:540
From: $joinCondition = sprintf('(%s)', implode($conditions, ' AND '));
To: $joinCondition = sprintf('(%s)', implode(' AND ', $conditions));

michalmagic42 added a commit to michalmagic42/Propel that referenced this issue Mar 16, 2020
* 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)
michalmagic42 added a commit to michalmagic42/Propel that referenced this issue Mar 16, 2020
* 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)
W0rma pushed a commit to W0rma/Propel that referenced this issue Oct 6, 2021
* 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)
jwong-dayspring added a commit to dayspring-tech/Propel that referenced this issue Dec 20, 2022
* 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 <michal.drozd@mobilefun.co.uk>
Co-authored-by: Luke Adamczewski <luke.adamczewski@jobleads.de>
Co-authored-by: Łukasz Adamczewski <tworzenieweb@gmail.com>
Co-authored-by: Jeffrey Wong <jwong@dayspringpartners.com>
Co-authored-by: Luke Adamczewski <luke.adamczewski@jobleads.com>
Co-authored-by: Paulo Magalhaes <mentalstring@gmail.com>
DanielFortuyn pushed a commit to DanielFortuyn/Propel that referenced this issue Feb 10, 2023
* 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 <michal.drozd@mobilefun.co.uk>
Co-authored-by: Luke Adamczewski <luke.adamczewski@jobleads.de>
Co-authored-by: Łukasz Adamczewski <tworzenieweb@gmail.com>
Co-authored-by: Jeffrey Wong <jwong@dayspringpartners.com>
Co-authored-by: Luke Adamczewski <luke.adamczewski@jobleads.com>
Co-authored-by: Paulo Magalhaes <mentalstring@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant