# |
Jun 13th 2019, 08:29 |
office |
Well that API worked a year ago. And now i come back to see that. IS it possible that it worked with composer installed? |
# |
Jun 13th 2019, 08:28 |
conehead |
Maybe composer is not installed at all? |
# |
Jun 13th 2019, 08:27 |
office |
@conehead composer update bash: composer: command not found php composer.phar update Could not open input file: composer.phar |
# |
Jun 13th 2019, 08:25 |
neon1024 |
Morning all :wave: |
# |
Jun 13th 2019, 08:22 |
conehead |
Then run `composer update` (or `php composer.phar update` respectively). But to be honest I do not think that just updating this library will work |
# |
Jun 13th 2019, 08:22 |
conehead |
You could update this. |
# |
Jun 13th 2019, 08:21 |
conehead |
`"friendsofcake/crud":"~4.0"`` |
# |
Jun 13th 2019, 08:21 |
conehead |
Well there you go |
# |
Jun 13th 2019, 08:21 |
office |
And although i am on php 7.2 i do not need to touch composer.json which looks "require": { `"php": ">=5.5.9", "cakephp/cakephp": "~3.2", "mobiledetect/mobiledetectlib": "2.", "cakephp/migrations": "~1.0", "cakephp/plugin-installer": "", "friendsofcake/crud":"~4.0"` |
# |
Jun 13th 2019, 08:20 |
conehead |
But you can just run it to see what happens |
# |
Jun 13th 2019, 08:19 |
conehead |
It depends on the setup. `php composer.phar` might be the same as `composer` |
# |
Jun 13th 2019, 08:19 |
office |
@conehead I use Cake PHP is 2.10.16. So i acess via SSH and run `php composer.phar`? |
# |
Jun 13th 2019, 08:15 |
conehead |
and `composer update` should only be run in your root folder as well |
# |
Jun 13th 2019, 08:15 |
conehead |
Would be nice to know which cake version you are currently using |
# |
Jun 13th 2019, 08:14 |
conehead |
Only update the composer.json in your root folder (or in your own plugins if applicable) |
# |
Jun 13th 2019, 08:13 |
conehead |
But you should not update composer.json in the vendor folder |
# |
Jun 13th 2019, 08:13 |
conehead |
@office try `php composer.phar` instead of `composer` |
# |
Jun 13th 2019, 08:11 |
noel |
oh cool. Good to know. |
# |
Jun 13th 2019, 08:10 |
conehead |
@noel Guess that is not 100% correct. You actually can specify a given commit. I have done it with a package that it not maintained anymore, but someone still created a PR. `"jpgraph/jpgraph": "4.x-dev#934753128231805c1feacddd131f37fa92be3430",` GitHub :`https://github.com/ztec/JpGraph/pull/20/commits/934753128231805c1feacddd131f37fa92be3430` |
# |
Jun 13th 2019, 08:05 |
noel |
Or you might be able to use composer: https://stackoverflow.com/questions/12954051/use-php-composer-to-clone-git-repo |
# |
Jun 13th 2019, 08:03 |
noel |
@office you can't update to a PR (pull request) on github using composer. Composer links to packagist.org, so you can only update to new releases on that site. If you want bleeding edge then you have to manually update the vendor files. |
# |
Jun 13th 2019, 07:57 |
slackebot1 |
and here is the response ```bash: composer: command not found``` |
# |
Jun 13th 2019, 07:57 |
slackebot1 |
href='http://php.net/function.count'>function.count</a>]: Parameter must be an array or an object that implements Countable [CORE/src/Database/QueryCompiler.php, line 128]``` I have no idea how to update the vendor. I updated line 2 of *composer.json* in *vendor/friendsofcake/crud* from *"name":"friendsofcake/crud"* > *"name":"friendsofcake/crud":"~5.2.0"* Then acessed via SSH and opened the the sub directory whre the api is and ran `composer update` |
# |
Jun 13th 2019, 07:57 |
office |
Hello, i hope so can give me a tip where to start from. I am lower than beginner. I read i need to update *FriendsOfCake* and i already changed Object to BaseObject as given here https://github.com/FriendsOfCake/crud/pull/549 This is the warning i see ```Warning (2): count(): Parameter must be an array or an object that implements Countable [CORE/src/Database/QueryCompiler.php, line 128] Warning (2): count() [<a |
# |
Jun 13th 2019, 06:47 |
admad |
ah |
# |
Jun 13th 2019, 06:46 |
lars.ebert |
Off topic: That uses the default installed version of php (which is 5.something on my OS). Thats why I prepend `php`, which is aliased to the correct version. |
# |
Jun 13th 2019, 06:43 |
admad |
it's already an executable |
# |
Jun 13th 2019, 06:43 |
admad |
@lars.ebert no idea about the error but you should just use `vendor/bin/phpunit` |
# |
Jun 13th 2019, 06:43 |
kk |
okay will try admad. Thanks for your time so far |
# |
Jun 13th 2019, 06:42 |
lars.ebert |
I have a question: I am trying to run the phpunit tests that come with cakephp/cakephp but keep running into an error “failed to open stream: Too many open files”. Am I doing something wrong? I just run `php vendor/bin/phpunit`. |
# |
Jun 13th 2019, 06:42 |
admad |
if it exists in repo then run `composer install` |
# |
Jun 13th 2019, 06:41 |
admad |
ideally the composer.lock should also have been commited for the app which would have avoided such problems |
# |
Jun 13th 2019, 06:40 |
kk |
will try. Thanks! |
# |
Jun 13th 2019, 06:40 |
kk |
alright sounds good |
# |
Jun 13th 2019, 06:40 |
admad |
try removing it and then run `composer update`. If it succeeds then re-add it using `composer require elboletaire/twbs-cake-plugin` |
# |
Jun 13th 2019, 06:39 |
admad |
the problem is most likely `elboletaire/twbs-cake-plugin` |
# |
Jun 13th 2019, 06:39 |
admad |
don't upgrade cakephp without reading the migration guide |
# |
Jun 13th 2019, 06:39 |
kk |
or rather... what exactly does the command do? |
# |
Jun 13th 2019, 06:38 |
kk |
just for my understanding... why do we use cakephp 3.7.*? I was thinking i should try to install cakephp 3.1.0? |
# |
Jun 13th 2019, 06:33 |
kk |
no worries :) its early for me too |
# |
Jun 13th 2019, 06:33 |
conehead |
composer not php |