Skip to content

Commit a3f5548

Browse files
author
DKravtsov
committedAug 21, 2024·
Updated composer dependencies, added fish shell, bash completion.
1 parent 5c5d5a3 commit a3f5548

29 files changed

+2422
-1996
lines changed
 

Diff for: ‎.idea/codeception.xml

-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎.idea/htdocs.iml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎.idea/php-test-framework.xml

-14
This file was deleted.

Diff for: ‎.idea/php.xml

+116-117
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎.idea/phpspec.xml

-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ RUN if [ "$BUILD_ARGUMENT_ENV" = "default" ]; then echo "Set BUILD_ARGUMENT_ENV
2525

2626
# install all the dependencies and enable PHP modules
2727
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
28+
bash-completion \
29+
fish \
2830
procps \
2931
nano \
3032
git \
@@ -82,6 +84,9 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
8284
RUN chmod +x /usr/bin/composer
8385
ENV COMPOSER_ALLOW_SUPERUSER 1
8486

87+
# Enable Composer autocompletion
88+
RUN composer completion bash > /etc/bash_completion.d/composer
89+
8590
# add supervisor
8691
RUN mkdir -p /var/log/supervisor
8792
COPY --chown=root:root ./docker/general/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
@@ -97,6 +102,15 @@ WORKDIR $APP_HOME
97102

98103
USER ${USERNAME}
99104

105+
# Add necessary stuff to bash autocomplete
106+
RUN echo 'source /usr/share/bash-completion/bash_completion' >> /home/${USERNAME}/.bashrc \
107+
&& echo 'alias artisan="php /var/www/html/artisan"' >> /home/${USERNAME}/.bashrc
108+
109+
# copy fish configs
110+
COPY --chown=${USERNAME}:${USERNAME} ./docker/fish/completions/ /home/${USERNAME}/.config/fish/completions/
111+
COPY --chown=${USERNAME}:${USERNAME} ./docker/fish/functions/ /home/${USERNAME}/.config/fish/functions/
112+
COPY --chown=${USERNAME}:${USERNAME} ./docker/fish/config.fish /home/${USERNAME}/.config/fish/config.fish
113+
100114
# copy source files and config file
101115
COPY --chown=${USERNAME}:${USERNAME} . $APP_HOME/
102116
COPY --chown=${USERNAME}:${USERNAME} .env.$ENV $APP_HOME/.env

Diff for: ‎Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ else
172172
$(ERROR_ONLY_FOR_HOST)
173173
endif
174174

175+
fish: ## Get fish shell inside laravel docker container
176+
ifeq ($(INSIDE_DOCKER_CONTAINER), 0)
177+
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) WEB_PORT_HTTP=$(WEB_PORT_HTTP) WEB_PORT_SSL=$(WEB_PORT_SSL) XDEBUG_CONFIG=$(XDEBUG_CONFIG) XDEBUG_VERSION=$(XDEBUG_VERSION) MYSQL_VERSION=$(MYSQL_VERSION) INNODB_USE_NATIVE_AIO=$(INNODB_USE_NATIVE_AIO) SQL_MODE=$(SQL_MODE) docker compose $(PROJECT_NAME) exec $(OPTION_T) $(PHP_USER) laravel fish
178+
else
179+
$(ERROR_ONLY_FOR_HOST)
180+
endif
181+
175182
ssh-supervisord: ## Get bash inside supervisord docker container (cron jobs running there, etc...)
176183
ifeq ($(INSIDE_DOCKER_CONTAINER), 0)
177184
@HOST_UID=$(HOST_UID) HOST_GID=$(HOST_GID) WEB_PORT_HTTP=$(WEB_PORT_HTTP) WEB_PORT_SSL=$(WEB_PORT_SSL) XDEBUG_CONFIG=$(XDEBUG_CONFIG) XDEBUG_VERSION=$(XDEBUG_VERSION) MYSQL_VERSION=$(MYSQL_VERSION) INNODB_USE_NATIVE_AIO=$(INNODB_USE_NATIVE_AIO) SQL_MODE=$(SQL_MODE) docker compose $(PROJECT_NAME) exec supervisord bash

Diff for: ‎app/Models/User.php

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
class User extends Authenticatable
1212
{
13+
/** @use HasFactory<\Database\Factories\UserFactory> */
1314
use HasFactory;
1415
use Notifiable;
1516

Diff for: ‎composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
},
3434
"require-dev": {
3535
"bamarni/composer-bin-plugin": "^1.8",
36-
"barryvdh/laravel-ide-helper": "^3.0",
36+
"barryvdh/laravel-ide-helper": "^3.1",
3737
"fakerphp/faker": "^1.23",
3838
"laravel/pint": "^1.13",
3939
"laravel/sail": "^1.26",
4040
"mockery/mockery": "^1.6",
4141
"neronmoon/scriptsdev": "^0.1",
4242
"nunomaduro/collision": "^8.0",
43-
"phpunit/phpunit": "11.2.*",
43+
"phpunit/phpunit": "11.3.*",
4444
"roave/security-advisories": "dev-latest"
4545
},
4646
"config": {

Diff for: ‎composer.lock

+497-474
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎docker/fish/completions/artisan.fish

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function __fish_artisan_commands_with_descriptions
2+
begin
3+
php artisan list --raw 2>/dev/null
4+
or return
5+
end | grep -vE '^ ' | string replace -r '\s+' '\t'
6+
end
7+
8+
function __fish_artisan_commands
9+
__fish_artisan_commands_with_descriptions | cut -f 1
10+
end
11+
12+
complete -c artisan -f -n 'test -f artisan; and __fish_use_subcommand' -a '(__fish_artisan_commands_with_descriptions)'
13+
complete -c artisan -f -n 'test -f artisan; and __fish_seen_subcommand_from help' -a '(__fish_artisan_commands)'

Diff for: ‎docker/fish/completions/composer.fish

+341
Large diffs are not rendered by default.

Diff for: ‎docker/fish/config.fish

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source /home/www-data/.config/fish/completions/artisan.fish
2+
3+
if status is-interactive
4+
# Commands to run in interactive sessions can go here
5+
end

Diff for: ‎docker/fish/functions/artisan.fish

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function artisan --description 'Alias that helps fish recognize artisan as a command that should be completed'
2+
php /var/www/html/artisan $argv
3+
end

Diff for: ‎docs/commands.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ make env-test-ci # Creates config for test/ci environment
3838

3939
make ssh # Get bash inside laravel docker container
4040
make ssh-root # Get bash as root user inside laravel docker container
41+
make fish # Get fish shell inside laravel docker container (https://www.youtube.com/watch?v=C2a7jJTh3kU)
4142
make ssh-supervisord # Get bash inside supervisord docker container (cron jobs running there, etc...)
4243
make ssh-mysql # Get bash inside mysql docker container
4344

Diff for: ‎readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ make env-test-ci
210210

211211
make ssh
212212
make ssh-root
213+
make fish
213214
make ssh-supervisord
214215
make ssh-mysql
215216

Diff for: ‎tools/01_phpunit/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"php": "^8.3.0"
66
},
77
"require-dev": {
8-
"phpunit/phpunit": "11.2.*",
8+
"phpunit/phpunit": "11.3.*",
99
"roave/security-advisories": "dev-latest"
1010
},
1111
"config": {

Diff for: ‎tools/01_phpunit/composer.lock

+209-195
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎tools/02_phpstan/composer.lock

+310-296
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎tools/03_ecs/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"php": "^8.3.0"
66
},
77
"require-dev": {
8-
"friendsofphp/php-cs-fixer": "3.58.*",
9-
"symplify/easy-coding-standard": "12.2.*",
8+
"friendsofphp/php-cs-fixer": "3.62.*",
9+
"symplify/easy-coding-standard": "12.3.*",
1010
"roave/security-advisories": "dev-latest"
1111
},
1212
"config": {

Diff for: ‎tools/03_ecs/composer.lock

+188-163
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎tools/04_php-coveralls/composer.lock

+122-108
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎tools/05_phpinsights/composer.lock

+196-179
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎tools/06_phpmd/composer.lock

+107-85
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎tools/07_phpmetrics/composer.lock

+55-41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎tools/08_rector/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"php": "^8.3.0"
66
},
77
"require-dev": {
8-
"rector/rector": "1.1.*",
8+
"rector/rector": "1.2.*",
99
"driftingly/rector-laravel": "1.2.*",
1010
"roave/security-advisories": "dev-latest"
1111
},

Diff for: ‎tools/08_rector/composer.lock

+74-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎tools/09_composer/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"php": "^8.3.0"
66
},
77
"require-dev": {
8-
"ergebnis/composer-normalize": "^2.42",
8+
"ergebnis/composer-normalize": "^2.43",
99
"icanhazstring/composer-unused": "^0.8",
1010
"maglnet/composer-require-checker": "^4.11",
1111
"roave/security-advisories": "dev-latest"

Diff for: ‎tools/09_composer/composer.lock

+154-226
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.