Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b623752

Browse files
committed
Added a note about altering the PHP memory limit in the commands.
1 parent 5eed0a3 commit b623752

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

‎README.md‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ More specifically this includes:
1818

1919
## Usage
2020

21-
Note: This container does nothing when invoking it without a command, such as:
22-
23-
Windows users: The use of "$PWD" for present working directory will not work as expected, instead use the full path.
24-
Such as "//c/Users/adamculp/project".
21+
Note: This image does nothing when invoking it without a followup command, such as:
2522

2623
```
2724
$ cd </path/to/desired/directory>
2825
$ docker run -it --rm -v "$PWD":/app -w /app adamculp/php-code-quality:latest <desired-command-with-arguments>
2926
```
3027

28+
Windows users: The use of "$PWD" for present working directory will not work as expected, instead use the full path.
29+
Such as "//c/Users/adamculp/project".
30+
3131
In the example above, Docker runs an interactive terminal to be removed when all is completed, and mounts
3232
the current host directory ($PWD) inside the container, sets this as the current working directory, and then
3333
loads the image adamculp/php-code-quality. Following this the user can add any commands to be executed inside
@@ -51,11 +51,19 @@ Available commands provided by the adamculp/php-code-quality image:
5151
* vendor/bin/phpstan + args (more robust commands via config file)
5252
* sh (or any other command) + args
5353

54-
### Some possible example commands:
54+
### Some example commands:
5555

5656
NOTE: If using the commands below "as-is", please create a 'php_code_quality' folder within the project first.
5757
This will be used, by the commands, to contain the results of the various tools. Modify as desired.
5858

59+
IMPORTANT: If you run into memory issues, where the output states the process ran out of memory, you can alter the amount
60+
of memory the PHP process uses for a given command by adding the -d flag to the PHP command. Note that the following example
61+
is for extreme cases since the image already sets the memory limit to 512M.
62+
63+
```
64+
php -d memory_limit=1G
65+
```
66+
5967
#### PHP Lines of Code (PHPLoc)
6068

6169
See https://github.com/sebastianbergmann/phploc for more usage details of this tool.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /