Jump to content

[docker] Warning: count(): Parameter must be an array or an object that implements Countable


block34

Recommended Posts

$ docker run --rm -v $(pwd):/data phpdoc/phpdoc -d src -t docs
# show the output web page (see attachment)
$ firefox docs/classes/Examples.Example.html

Because into the output web page, it appears

Warning: count(): Parameter must be an array or an object that implements Countable......

bBe9I.png

Link to comment
Share on other sites

14 hours ago, requinix said:

Get a Docker container that has PHP 7.2.

$ docker run \
    --rm \
    -v $(pwd):/:/data phpdoc/phpdoc:7.2 \
    --directory src \
    --target docs
Unable to find image 'phpdoc/phpdoc:7.2' locally
docker: Error response from daemon: manifest for phpdoc/phpdoc:7.2 not found.
See 'docker run --help'.

 

Link to comment
Share on other sites

On 11/20/2019 at 9:43 AM, block34 said:

$ docker run \
    --rm \
    -v $(pwd):/:/data phpdoc/phpdoc:7.2 \
    --directory src \
    --target docs
Unable to find image 'phpdoc/phpdoc:7.2' locally
docker: Error response from daemon: manifest for phpdoc/phpdoc:7.2 not found.
See 'docker run --help'.

 

@requinix you are there?

Link to comment
Share on other sites

17 hours ago, requinix said:

Still here. Still don't have anything to add other than you need a Docker container with PHP version 7.2.

The problem is that I don't speak English very well (I apologize).
Could you explain yourself a little better?
Besides the phpdoc / phpdoc container should I use a container with PHP 7.2?
Could you give a practical example?

Link to comment
Share on other sites

The version of phpDoc you have needs PHP 7.2.

If you are using an official Docker image from phpDoc then they did something wrong.
If you are using a Docker image you created yourself then you need to create a new one that has PHP 7.2 and then add phpDoc to it.

Link to comment
Share on other sites

On 11/28/2019 at 6:50 PM, maxxd said:
$ docker run \
    --rm \
    -v $(pwd):/data \
    phpdockerio/php72-fpm \
    --directory src \
    --target docs
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"--directory\": executable file not found in $PATH": unknown.
ERRO[0000] error waiting for container: context canceled 

But does it work for you?
Can't you do some tests?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.