Skip to content

Commit 7b68033

Browse files
committed
refactor: Deprecate at command in favor of host network
1 parent d5f207e commit 7b68033

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ phpctl sh echo 'Hello, World!' # To run arbitrary sh commands inside the contain
5858
|-----------------------------|---------------------------------------------------------------------------------------------|
5959
| `php` | **Runs PHP commands** (`phpctl php -v` or `phpctl php -m`). |
6060
| `composer` | Runs Composer commands (`phpctl composer install` or `pctl composer validate`). |
61-
| `at [port] [command]` | Runs commands within a bound port (default port is `80`). |
6261
| `server [port] [directory]` | Runs PHP's built-in web-server (default port is `80` and default directory is current `.`). |
6362

6463
### Useful

examples/server/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php phpinfo();

src/help.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ help() {
2020
echo -e "\033[0;33mAvailable commands:\033[0m"
2121
echo -e "\033[0;32m php \033[0m Runs PHP commands"
2222
echo -e "\033[0;32m composer \033[0m Runs Composer commands"
23-
echo -e "\033[0;32m at [port] [command] \033[0m Runs commands within a bound port"
2423
echo -e "\033[0;32m server [port] [directory] \033[0m Runs PHP's built-in web server (default port is 80 and default directory is current .)"
2524
echo -e "\033[0;32m phpunit \033[0m Runs PHPUnit)"
2625
echo -e "\033[0;32m sh [commands] \033[0m Starts an interactive Shell session or runs sh commands"

src/php.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,12 @@ repl() {
1010
run -- psysh
1111
}
1212

13-
at() {
14-
run "-p$1:$1" ${@:2}
15-
}
16-
1713
server() {
1814
port=${1:-80}
1915
dir=${2:-.}
20-
at "$port" php -S 0.0.0.0:"$port" -t "$dir"
16+
run -- php -S 0.0.0.0:"$port" -t "$dir"
2117
}
2218

23-
2419
phpunit() {
2520
if [ ! -f vendor/bin/phpunit ]; then
2621
echo "PHPUnit not found. Installing..."

0 commit comments

Comments
 (0)