You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recent composer update (amongst other things) has bumped phinx to the 0.15.x release. There are a few breaking changes introduced here, some of which are documented and which I have resolved locally. What I struggled with in particular is working out how getQueryBuilder() works. For starters, it requires a parameter for the query type (e.g. 'select', 'update' etc.)
Typehinting is also wrong; whilst getQueryBuilder() returns Cake\Database\Query, the IDE doesn't recognise methods belonging to the relevant child class, for example Cake\Database\UpdateQuery which has the methods update() and set():
Whilst I appreciate that this typehinting is probably an issue with cakephp\database, it would be great to see some official documentation for 0.15 detailing these changes. There is of course every chance that I'm now using getQueryBuilder incorrectly but I can't see the alternative.
The text was updated successfully, but these errors were encountered:
Taking inspiration from cakephp/database, why not replace the getQueryBuilder(string $type) method with type-specific methods, returning the appropriate data type?
Where is the "official" documentation for 0.15?
We've been using 0.13.x for some time now, for which there's great documentation at https://book.cakephp.org/phinx/0/en/index.html.
A recent
composer update
(amongst other things) has bumped phinx to the 0.15.x release. There are a few breaking changes introduced here, some of which are documented and which I have resolved locally. What I struggled with in particular is working out howgetQueryBuilder()
works. For starters, it requires a parameter for the query type (e.g. 'select', 'update' etc.)phinx/src/Phinx/Db/Adapter/AdapterInterface.php
Line 288 in ccbb7f2
Typehinting is also wrong; whilst
getQueryBuilder()
returnsCake\Database\Query
, the IDE doesn't recognise methods belonging to the relevant child class, for exampleCake\Database\UpdateQuery
which has the methodsupdate()
andset()
:Whilst I appreciate that this typehinting is probably an issue with cakephp\database, it would be great to see some official documentation for 0.15 detailing these changes. There is of course every chance that I'm now using getQueryBuilder incorrectly but I can't see the alternative.
The text was updated successfully, but these errors were encountered: